Install the appropriate ChromeDriver version based on the currently-installed version of Chrome
See original GitHub issueA 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:
- Created 5 years ago
- Reactions:8
- Comments:13 (5 by maintainers)
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?
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