MarketSquare / webdrivermanager

Python module to facilitate downloading and deploying WebDriver binaries for Chrome, Firefox, Opera & Edge
https://pypi.org/project/webdrivermanager/
MIT License
100 stars 38 forks source link

Update webdrivermanager.py #22

Closed NMamm closed 3 years ago

NMamm commented 4 years ago

I had an issue today where the latest version of chromedriver was not compatible with my version of chrome. It got me thinking that in the event that machines have different versions of chrome (however unlikely given how chrome updates), it would be nice to help automate the specification of a compatible driver version.

I have added methods to the ChromeDriverManager class to infer the version of chromedriver compatible with the currently installed version of chrome running on windows.

Ideally, this functionality would be extended to other webdrivers and Operating Systems.

Example Use:

import webdrivermanager cdm = webdrivermanager.ChromeDriverManager() compatible_driver_version = cdm.get_matching_driver_version() cdm.download_and_install(version = compatible_driver_version)

rasjani commented 4 years ago

Ive been toying with the idea that wdm should be able to detect the browser version locally and this is partially that. However, i'd prefer things to be "cross platform" and this patch also works only in windows and only for chrome.

I created a issue https://github.com/rasjani/webdrivermanager/issues/23

If you are interested, i'll add more details into the ticket later and we can have a conversation there.