-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
What happened?
This is a regression from #12789:
The original statement is still true:
The Selenium Manager documentation describes that the Manager's behavior can be influenced by a config file or environment variables. However, this does not appear to work.
In particular, I tried setting the browser and its path. However, I expect none of the options to work as documented, since I couldn't find any reference to ever reading env variables in the Selenium Manager source code. (I didn't explicitly look for reading the config file, but also didn't stumble upon it.)
I've noticed this in one of my Rails applications (using selenium-webdriver 4.29.1 and 4.30.1).
How can we reproduce the issue?
$ $GEM_HOME/gems/selenium-webdriver-4.30.1/bin/linux/selenium-manager --version
selenium-manager 0.4.30
$ $GEM_HOME/gems/selenium-webdriver-4.30.1/bin/linux/selenium-manager --debug
[2025-03-24T12:54:24.526Z ERROR] You need to specify a browser or driver
$ SE_BROWSER=chrome SE_BROWSER_PATH=/usr/bin/google-chrome-beta $GEM_HOME/gems/selenium-webdriver-4.30.1/bin/linux/selenium-manager --debug
[2025-03-24T12:57:34.499Z DEBUG] chromedriver not found in PATH
[2025-03-24T12:57:34.501Z DEBUG] Running command: /usr/bin/google-chrome-beta --version
[2025-03-24T12:57:34.522Z DEBUG] Output: "Google Chrome 135.0.7049.28 beta"
[2025-03-24T12:57:34.523Z DEBUG] Detected browser: chrome 135.0.7049.28
[2025-03-24T12:57:34.523Z DEBUG] Discovered chrome version (135) different to specified browser version (133)
[2025-03-24T12:57:34.524Z DEBUG] Required browser: chrome 133.0.6943.141
[2025-03-24T12:57:34.524Z DEBUG] chrome 133.0.6943.141 already exists
[2025-03-24T12:57:34.524Z DEBUG] chrome 133.0.6943.141 is available at $HOME/.cache/selenium/chrome/linux64/133.0.6943.141/chrome
[2025-03-24T12:57:34.525Z DEBUG] Required driver: chromedriver 133.0.6943.141
[2025-03-24T12:57:34.525Z DEBUG] chromedriver 133.0.6943.141 already in the cache
[2025-03-24T12:57:34.525Z INFO ] Driver path: $HOME/.cache/selenium/chromedriver/linux64/133.0.6943.141/chromedriver
[2025-03-24T12:57:34.525Z INFO ] Browser path: $HOME/.cache/selenium/chrome/linux64/133.0.6943.141/chrome
$ SE_BROWSER=chrome $GEM_HOME/gems/selenium-webdriver-4.30.1/bin/linux/selenium-manager --debug --browser-path /usr/bin/google-chrome-beta
[2025-03-24T13:00:27.327Z DEBUG] chromedriver not found in PATH
[2025-03-24T13:00:27.328Z DEBUG] Running command: /usr/bin/google-chrome-beta --version
[2025-03-24T13:00:27.348Z DEBUG] Output: "Google Chrome 135.0.7049.28 beta"
[2025-03-24T13:00:27.349Z DEBUG] Detected browser: chrome 135.0.7049.28
[2025-03-24T13:00:27.349Z DEBUG] Discovered chrome version (135) different to specified browser version (133)
[2025-03-24T13:00:27.350Z DEBUG] Required browser: chrome 133.0.6943.141
[2025-03-24T13:00:27.350Z DEBUG] chrome 133.0.6943.141 already exists
[2025-03-24T13:00:27.350Z DEBUG] chrome 133.0.6943.141 is available at $HOME/.cache/selenium/chrome/linux64/133.0.6943.141/chrome
[2025-03-24T13:00:27.351Z DEBUG] Required driver: chromedriver 133.0.6943.141
[2025-03-24T13:00:27.351Z DEBUG] chromedriver 133.0.6943.141 already in the cache
[2025-03-24T13:00:27.351Z INFO ] Driver path: $HOME/.cache/selenium/chromedriver/linux64/133.0.6943.141/chromedriver
[2025-03-24T13:00:27.351Z INFO ] Browser path: $HOME/.cache/selenium/chrome/linux64/133.0.6943.141/chrome
$# Also pinning to a particular browser version does not work:
$ SE_BROWSER=chrome SE_BROWSER_VERSION=135 $GEM_HOME/gems/selenium-webdriver-4.30.1/bin/linux/selenium-manager --debug
[2025-03-24T13:02:00.924Z DEBUG] chromedriver not found in PATH
[2025-03-24T13:02:00.924Z DEBUG] chrome detected at /usr/bin/google-chrome
[2025-03-24T13:02:00.925Z DEBUG] Running command: /usr/bin/google-chrome --version
[2025-03-24T13:02:00.948Z DEBUG] Output: "Google Chrome 134.0.6998.165 "
[2025-03-24T13:02:00.950Z DEBUG] Detected browser: chrome 134.0.6998.165
[2025-03-24T13:02:00.950Z DEBUG] Discovered chrome version (134) different to specified browser version (133)
[2025-03-24T13:02:00.950Z DEBUG] Required browser: chrome 133.0.6943.141
[2025-03-24T13:02:00.950Z DEBUG] chrome 133.0.6943.141 already exists
[2025-03-24T13:02:00.950Z DEBUG] chrome 133.0.6943.141 is available at $HOME/.cache/selenium/chrome/linux64/133.0.6943.141/chrome
[2025-03-24T13:02:00.951Z DEBUG] Required driver: chromedriver 133.0.6943.141
[2025-03-24T13:02:00.951Z DEBUG] chromedriver 133.0.6943.141 already in the cache
[2025-03-24T13:02:00.951Z INFO ] Driver path: $HOME/.cache/selenium/chromedriver/linux64/133.0.6943.141/chromedriver
[2025-03-24T13:02:00.951Z INFO ] Browser path: $HOME/.cache/selenium/chrome/linux64/133.0.6943.141/chromeOnly with CLI flag --browser-version 135, the correct browser is selected:
$ SE_BROWSER=chrome $GEM_HOME/gems/selenium-webdriver-4.30.1/bin/linux/selenium-manager --debug --browser-version 135
[2025-03-24T13:06:43.170Z DEBUG] chromedriver not found in PATH
[2025-03-24T13:06:43.170Z DEBUG] chrome detected at /usr/bin/google-chrome
[2025-03-24T13:06:43.171Z DEBUG] Running command: /usr/bin/google-chrome --version
[2025-03-24T13:06:43.191Z DEBUG] Output: "Google Chrome 134.0.6998.165 "
[2025-03-24T13:06:43.193Z DEBUG] Detected browser: chrome 134.0.6998.165
[2025-03-24T13:06:43.193Z DEBUG] Discovered chrome version (134) different to specified browser version (135)
[2025-03-24T13:06:43.194Z DEBUG] Required browser: chrome 135.0.7049.28
[2025-03-24T13:06:43.194Z DEBUG] chrome 135.0.7049.28 already exists
[2025-03-24T13:06:43.194Z DEBUG] chrome 135.0.7049.28 is available at $HOME/.cache/selenium/chrome/linux64/135.0.7049.28/chrome
[2025-03-24T13:06:43.195Z DEBUG] Required driver: chromedriver 135.0.7049.28
[2025-03-24T13:06:43.195Z DEBUG] chromedriver 135.0.7049.28 already in the cache
[2025-03-24T13:06:43.195Z INFO ] Driver path: $HOME/.cache/selenium/chromedriver/linux64/135.0.7049.28/chromedriver
[2025-03-24T13:06:43.195Z INFO ] Browser path: $HOME/.cache/selenium/chrome/linux64/135.0.7049.28/chromeRelevant log output
See above.Operating System
Debian 12/amd64
Selenium version
Ruby 4.30.1
What are the browser(s) and version(s) where you see this issue?
Chrome 135.0.7049.28 (or any other)
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 135.0.7049.28 (or any other)
Are you using Selenium Grid?
No response