-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
C-rustRust code is mostly Selenium ManagerRust code is mostly Selenium Manager
Description
What happened?
I want to use SeleniumManager on a server without network access. I use the --offline mode, assuming that SeleniumManager will use the driver and browser from the cache folder.
For example:
./selenium-manager --browser chrome --browser-version 129 --language-binding java --trace
[2024-11-28T11:48:01.775Z TRACE] Reading metadata from /home/wojciech/.cache/selenium/se-metadata.json
[2024-11-28T11:48:01.776Z TRACE] Checking chromedriver in PATH
[2024-11-28T11:48:01.778Z DEBUG] chromedriver not found in PATH
[2024-11-28T11:48:01.778Z DEBUG] chrome detected at /usr/bin/google-chrome
[2024-11-28T11:48:01.779Z TRACE] Using shell command to find out chrome version
[2024-11-28T11:48:01.779Z DEBUG] Running command: /usr/bin/google-chrome --version
[2024-11-28T11:48:01.802Z DEBUG] Output: "Google Chrome 131.0.6778.69 "
[2024-11-28T11:48:01.804Z TRACE] The version of chrome is 131.0.6778.69
[2024-11-28T11:48:01.804Z DEBUG] Detected browser: chrome 131.0.6778.69
[2024-11-28T11:48:01.804Z DEBUG] Discovered chrome version (131) different to specified browser version (129)
[2024-11-28T11:48:01.804Z TRACE] Reading metadata from /home/wojciech/.cache/selenium/se-metadata.json
[2024-11-28T11:48:01.804Z TRACE] Browser with valid TTL. Getting chrome version from metadata
[2024-11-28T11:48:01.804Z DEBUG] Required browser: chrome 129.0.6668.100
[2024-11-28T11:48:01.804Z DEBUG] chrome 129.0.6668.100 already exists
[2024-11-28T11:48:01.804Z DEBUG] chrome 129.0.6668.100 is available at /home/wojciech/.cache/selenium/chrome/linux64/129.0.6668.100/chrome
[2024-11-28T11:48:01.804Z TRACE] Reading metadata from /home/wojciech/.cache/selenium/se-metadata.json
[2024-11-28T11:48:01.805Z TRACE] Driver TTL is valid. Getting chromedriver version from metadata
[2024-11-28T11:48:01.805Z DEBUG] Required driver: chromedriver 129.0.6668.100
[2024-11-28T11:48:01.805Z DEBUG] chromedriver 129.0.6668.100 already in the cache
[2024-11-28T11:48:01.805Z INFO ] Driver path: /home/wojciech/.cache/selenium/chromedriver/linux64/129.0.6668.100/chromedriver
[2024-11-28T11:48:01.805Z INFO ] Browser path: /home/wojciech/.cache/selenium/chrome/linux64/129.0.6668.100/chromeIn this case, the browser path is correctly determined and points to the browser located in the cache.
However, when I add the --offline parameter, SeleniumManager incorrectly points to the default Chrome installation with the wrong version.
./selenium-manager --browser chrome --browser-version 129 --language-binding java --trace --offline
[2024-11-28T11:52:10.209Z DEBUG] Offline flag set, but also asked not to avoid browser downloads. Honouring offline flag
[2024-11-28T11:52:10.209Z DEBUG] Using Selenium Manager in offline mode
[2024-11-28T11:52:10.209Z TRACE] Checking chromedriver in PATH
[2024-11-28T11:52:10.211Z DEBUG] chromedriver not found in PATH
[2024-11-28T11:52:10.211Z DEBUG] chrome detected at /usr/bin/google-chrome
[2024-11-28T11:52:10.213Z TRACE] Using shell command to find out chrome version
[2024-11-28T11:52:10.213Z DEBUG] Running command: /usr/bin/google-chrome --version
[2024-11-28T11:52:10.234Z DEBUG] Output: "Google Chrome 131.0.6778.69 "
[2024-11-28T11:52:10.236Z TRACE] The version of chrome is 131.0.6778.69
[2024-11-28T11:52:10.236Z DEBUG] Detected browser: chrome 131.0.6778.69
[2024-11-28T11:52:10.236Z DEBUG] Discovered chrome version (131) different to specified browser version (129)
[2024-11-28T11:52:10.236Z TRACE] Reading metadata from /home/wojciech/.cache/selenium/se-metadata.json
[2024-11-28T11:52:10.237Z TRACE] Driver TTL is valid. Getting chromedriver version from metadata
[2024-11-28T11:52:10.237Z DEBUG] Required driver: chromedriver 129.0.6668.100
[2024-11-28T11:52:10.237Z DEBUG] chromedriver 129.0.6668.100 already in the cache
[2024-11-28T11:52:10.237Z INFO ] Driver path: /home/wojciech/.cache/selenium/chromedriver/linux64/129.0.6668.100/chromedriver
[2024-11-28T11:52:10.237Z INFO ] Browser path: /usr/bin/google-chromeCould you please confirm if I understand the behavior of this parameter correctly? At the moment, it seems to me like a bug in SeleniumManager.
How can we reproduce the issue?
./selenium-manager --browser chrome --browser-version 129 --language-binding java --trace
./selenium-manager --browser chrome --browser-version 129 --language-binding java --trace --offline Steps to reproduce:
- Use SeleniumManager to download the browser in a specific version.
- Use SeleniumManager in offline mode (--offline).
Relevant log output
Logs are in description.Operating System
6.8.0-1016-oracle #17~22.04.1-Ubuntu
Selenium version
SM 0.4.26 Selenium 4.26.0
What are the browser(s) and version(s) where you see this issue?
All chrome versions
What are the browser driver(s) and version(s) where you see this issue?
All chrome driver versions
Are you using Selenium Grid?
No
Metadata
Metadata
Assignees
Labels
C-rustRust code is mostly Selenium ManagerRust code is mostly Selenium Manager