question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install the appropriate ChromeDriver version based on the currently-installed version of Chrome

See original GitHub issue

A project I work on recently got bitten by a version mismatch between ChromeDriver and the locally-installed version of Chrome. On my project, we have an automated build system that runs webdriver-manager update before running Selenium-based browser tests in Chrome so that the appropriate ChromeDriver bits are installed. However, we don’t have full control over the version of Chrome on the machine where the tests are running, whether that’s a hosted build agent in Microsoft VSTS or on an individual developer’s machine. As a result, the latest release of ChromeDriver was installed on a machine that had Chrome 68 installed, but the latest ChromeDriver is only compatible with Chrome 69+ and therefore caused the build to fail. It would be great if webdriver-manager update had an option to install the ChromeDriver version that is compatible with the locally-installed version of Chrome so there’s never a mismatch.

To get around the issue, I wrote a Node module that retrieves the local version of Chrome as well as the release notes for ChromeDriver, then parses the release notes and finds the version of ChromeDriver that’s compatible with the installed version of Chrome. I then pass this value to the webdriver-manager update command so that the correct ChromeDriver version is installed. You can find the repo for this Node module here. This solution is far from ideal as it depends on the release notes being formatted a specific way and hosted at specific URLs, so I’d be hesitant to say this exact solution is what should be implemented. However, I was hoping that it might be inspiration to get some folks thinking about solving this issue in a more robust way.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
zwingliernstcommented, Apr 30, 2019

Not sure, if it fits here, but since I updated webdriver-manager to its latest version (due to this issue 370 ), webdriver-manager downloads chromeDriver for Chrome Version 75. However, in my area of the world the latest Chrome Browser is Version 74.xyz Can you fix this and align to use chromeDriver versions only from released Chrome Versions?

4reactions
Blackbaud-PaulCrowdercommented, Oct 19, 2018

UPDATE: We ended up releasing an alpha version of the above-mentioned Node module, only this version uses a static list of compatible versions rather than parsing the release notes on every call. We believe this iteration will be stable enough for broad adoption. https://github.com/blackbaud/chromedriver-version-matcher

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatic download of appropriate chromedriver for Selenium ...
Automatically download and install chromedriver that supports the currently installed version of chrome. This installer supports Linux, MacOS and Windows ...
Read more >
WebDriver for Chrome - Version Selection
Here are the steps to select the version of ChromeDriver to download: First, find out which version of Chrome you are using. Let's...
Read more >
chromedriver-autoinstaller - PyPI
Automatically download and install chromedriver that supports the currently installed version of chrome. This installer supports Linux, MacOS and Windows ...
Read more >
Programmatically determine chrome browser version ...
It turns out the reason chromedriver knows where chrome is installed is it looks for it in the default installation locations.
Read more >
Need Help in Handling Chrome Version When Updating ...
So I have in our test automation setup a piece of code that always downloads the latest chromedriver for the currently installed version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found