webdriver_manager icon indicating copy to clipboard operation
webdriver_manager copied to clipboard

ChromeDriver: Add support for "LATEST_RELEASE_"

Open roniemartinez opened this issue 3 years ago • 3 comments

There are extra rules to get the latest release specified in https://chromedriver.chromium.org/downloads/version-selection

As a summary, here are important notes taken from the link:

Take the Chrome version number, remove the last part, and append the result to URL "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_". For example, with Chrome version 72.0.3626.81, you'd get a URL "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_72.0.3626".

Use the URL created in the last step to retrieve a small file containing the version of ChromeDriver to use. For example, the above URL will get your a file containing "72.0.3626.69". (The actual number may change in the future, of course.)

Use the version number retrieved from the previous step to construct the URL to download ChromeDriver. With version 72.0.3626.69, the

There are more rules included in the link.

roniemartinez avatar Jun 03 '22 20:06 roniemartinez

For reference implementation:

https://github.com/roniemartinez/dude/blob/0247c3b0e65a504ca9a28e1a633a07d58d30fe7b/dude/optional/utils.py#L69-L87

roniemartinez avatar Jun 04 '22 12:06 roniemartinez

Could you please submit a PR for this?

SergeyPirogov avatar Jun 24 '22 18:06 SergeyPirogov

@SergeyPirogov Sure!

roniemartinez avatar Jun 25 '22 17:06 roniemartinez

Whats the purpouse? It already works underhood of webdriver-manager through the LATEST_RELEASE_<version>

aleksandr-kotlyar avatar Feb 05 '23 09:02 aleksandr-kotlyar

OK got a notification from the issue again but just making clear what the version selection was meant for.

As I've tested with several versions, webdrivers are not readily available for each version so you need to remove the last numbers in the version string. You can see the explanation from the link on the description.

We always provide ChromeDriver for the current Stable and Beta versions of Chrome. However, if you use Chrome from Dev or Canary channel, or build your own custom version of Chrome, It is possible that there is no available ChromeDriver that officially supports it.

I am not planning to reopen this issue as my code works for me. Thank you.

EDIT: This is also used to get driver patches so you need to strip the patch number from the version.

After the initial download, it is recommended that you occasionally go through the above process again to see if there are any bug fix releases.

roniemartinez avatar May 18 '23 13:05 roniemartinez