Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Selenium Manager doesn't use exact browser version unless force-browser-download is enabled #15517

Open
Piedone opened this issue Mar 26, 2025 · 1 comment
Labels
C-rust Rust code is mostly Selenium Manager I-defect Something is not working as intended

Comments

@Piedone
Copy link

Piedone commented Mar 26, 2025

What happened?

E.g. when I have Chrome 134.0.6998.178 preinstalled on the system, and I instruct Selenium Manager to use Chrome 134.0.6998.165, it'll only download (and thus the tests I presume, will only use) the requested version of ChromeDriver. The version of Chrome, however, won't be downloaded and used unless force-browser-download is set.

I guess this is only the case when the versions are deemed compatible (like only the last segment of the version number is different). However, in our experiences, this can still cause inconsistencies between environments. Only using force-browser-download resulted in our test runs to consistently yield the same results, even between different operating systems (and local/CI environments).

I'd expect that when the exact version is specified, then indeed that version will be used.

This might be a Chrome-only issue, as I only tested this with Chrome.

How can we reproduce the issue?

  1. Start with a system that has Chrome preinstalled and .cache\selenium empty. In my example, the Chrome version is the current latest 134.0.6998.178.
  2. Instruct Selenium Manager to use a slightly different version, in my example 134.0.6998.165, with the following command: .\selenium-manager.exe --browser chrome --browser-version 134.0.6998.165.
  3. Observe that .cache\selenium only contains the corresponding ChromeDriver version, but not Chrome. When setting the browser version via the .NET API of Selenium.WebDriver, this also results in the local Chrome version being used to run UI tests.
  4. Now run .\selenium-manager.exe --browser chrome --browser-version 134.0.6998.165 --force-browser-download.
  5. Observe that .cache\selenium now contains both the corresponding ChromeDriver and Chrome executables. When setting the browser version via the .NET API of Selenium.WebDriver, this also results in the local Chrome version being used to run UI tests.

Note that while the repro steps above are with CLI commands of Selenium Manager, since this is the minimal repro, I'm not actually using Selenium Manager directly; rather, my app uses the .NET Selenium.WebDriver NuGet package.

Relevant log output

Output of .\selenium-manager.exe --browser chrome --browser-version 134.0.6998.165 --debug:

[2025-03-26T16:29:04.649Z DEBUG] chromedriver not found in PATH
[2025-03-26T16:29:04.649Z DEBUG] chrome detected at C:\Program Files\Google\Chrome\Application\chrome.exe
[2025-03-26T16:29:04.649Z DEBUG] Running command: wmic datafile where name='C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe' get Version /value
[2025-03-26T16:29:04.744Z DEBUG] Output: "\r\r\n\r\r\nVersion=134.0.6998.178\r\r\n\r\r\n\r\r\n\r"
[2025-03-26T16:29:04.745Z DEBUG] Detected browser: chrome 134.0.6998.178
[2025-03-26T16:29:04.746Z DEBUG] Required driver: chromedriver 134.0.6998.165
[2025-03-26T16:29:04.747Z DEBUG] Acquiring lock: C:\Users\lehoc\.cache\selenium\chromedriver\win64\134.0.6998.165\sm.lock
[2025-03-26T16:29:04.747Z DEBUG] Discovering versions from https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json
[2025-03-26T16:29:04.957Z DEBUG] Downloading chromedriver 134.0.6998.165 from https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.165/win64/chromedriver-win64.zip
[2025-03-26T16:29:05.748Z INFO ] Driver path: C:\Users\lehoc\.cache\selenium\chromedriver\win64\134.0.6998.165\chromedriver.exe
[2025-03-26T16:29:05.748Z INFO ] Browser path: C:\Program Files\Google\Chrome\Application\chrome.exe

Output of .\selenium-manager.exe --browser chrome --browser-version 134.0.6998.165 --force-browser-download --debug:

[2025-03-26T16:30:15.603Z DEBUG] chromedriver not found in PATH
[2025-03-26T16:30:15.604Z DEBUG] Required browser: chrome 134.0.6998.165
[2025-03-26T16:30:15.605Z DEBUG] Acquiring lock: C:\Users\lehoc\.cache\selenium\chrome\win64\134.0.6998.165\sm.lock
[2025-03-26T16:30:15.605Z DEBUG] Discovering versions from https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json
[2025-03-26T16:30:15.836Z DEBUG] Downloading chrome 134.0.6998.165 from https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.165/win64/chrome-win64.zip
[2025-03-26T16:30:23.768Z DEBUG] chrome 134.0.6998.165 is available at C:\Users\lehoc\.cache\selenium\chrome\win64\134.0.6998.165\chrome.exe
[2025-03-26T16:30:23.769Z DEBUG] Required driver: chromedriver 134.0.6998.165
[2025-03-26T16:30:23.770Z DEBUG] Acquiring lock: C:\Users\lehoc\.cache\selenium\chromedriver\win64\134.0.6998.165\sm.lock
[2025-03-26T16:30:23.770Z DEBUG] Discovering versions from https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json
[2025-03-26T16:30:24.019Z DEBUG] Downloading chromedriver 134.0.6998.165 from https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.165/win64/chromedriver-win64.zip
[2025-03-26T16:30:24.573Z INFO ] Driver path: C:\Users\lehoc\.cache\selenium\chromedriver\win64\134.0.6998.165\chromedriver.exe
[2025-03-26T16:30:24.573Z INFO ] Browser path: C:\Users\lehoc\.cache\selenium\chrome\win64\134.0.6998.165\chrome.exe

Operating System

Windows 11, presumably also Ubuntu 24.04 because we've seen issues in GitHub Actions with that too

Selenium version

.NET Selenium.WebDriver 4.28.0

What are the browser(s) and version(s) where you see this issue?

Chrome 134.0.6998.x

What are the browser driver(s) and version(s) where you see this issue?

ChromeDrvier 134.0.6998.x

Are you using Selenium Grid?

no

@Piedone Piedone added I-defect Something is not working as intended A-needs-triaging A Selenium member will evaluate this soon! labels Mar 26, 2025
Copy link

@Piedone, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@titusfortner titusfortner added C-rust Rust code is mostly Selenium Manager I-defect Something is not working as intended and removed I-defect Something is not working as intended A-needs-triaging A Selenium member will evaluate this soon! labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-rust Rust code is mostly Selenium Manager I-defect Something is not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants