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

Automatic chrome version matching #43

Closed xylix closed 3 years ago

xylix commented 3 years ago

Builds on https://github.com/rasjani/webdrivermanager/pull/22, adding linux and macos support for chrome installed version detection.

Questions before merging

osrjv commented 3 years ago

I cleaned up the PR a bit and added "compatible" option for chrome version in addition to "latest". Kept the latest as default so the change should be backwards compatible.

rasjani commented 3 years ago

Ill check this over the weekend and merge .. will probably make some refactoring afterwards..

osrjv commented 3 years ago

Cool, thanks. We can also use this directly from the fork if you have some reservations about merging as-is

rasjani commented 3 years ago

if you have some reservations about merging as-is

Point for refactoring is to make the "compatible" mode a generic feature of all browsers but only for now to implement it for chrome so it shouldn't block or break things for you.. Otherwise patch looks good for now.

rasjani commented 3 years ago
* Is it okay for just chromedriver to default to 'compatible'  instead of latest if no version is specified? 

Since wdm isnt "1.0" yet, i dont see a huge problem. I would assume that usecase of most people is "get the working one" and compatible is probably even better than the latest. I'll look around a bit on this matter. I would think that graceful fallback from compatible to latest, for example if the browser specific implementation does not know how to query the compatibility or all implemented cases do not find the browser or required information for them, using latest then shouldn't be a problem .

Would the API document that different drivers may default to different versions if no version is specified?

Lets see, I'll write something ...