webdrivermanager icon indicating copy to clipboard operation
webdrivermanager copied to clipboard

Add possibility to probe browser version and match that into webdriver version that should be downloaded

Open rasjani opened this issue 6 years ago • 2 comments

rasjani avatar Oct 09 '19 09:10 rasjani

For each operating system we need to define a way to detect the installed version of a given browser. On Windows, for example, this involves reading the registry to identify the location of the executable. I would not know how to do this on linux/mac. Once we have the executable's path, we can use pefile to read the version number on any os.

For each browser, we need to define a method for querying the matching driver version for a given browser version. download_and_install(version) will take over from there.

NMamm avatar Oct 09 '19 22:10 NMamm

I propose using subprocess and --version argument for detecting browser versions. It is a bit ugly but it will work on all operating systems. https://github.com/rasjani/webdrivermanager/pull/43 contains an implementation for Chrome.

xylix avatar Jan 18 '21 14:01 xylix