Skip to content

[🐛 Bug]: Selenium Manager does not use documented config file or environment variables #12789

@F30

Description

@F30

What happened?

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.)

How can we reproduce the issue?

~ $ .venv/lib/python3.11/site-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --browser-path /usr/bin/chromium-browser
INFO    Driver path: /usr/bin/chromedriver
INFO    Browser path: /usr/bin/chromium-browser

~ $ SE_BROWSER=chrome .venv/lib/python3.11/site-packages/selenium/webdriver/common/linux/selenium-manager
ERROR   You need to specify a browser or driver

~ $ export SE_BROWSER_PATH=/usr/bin/chromium-browser
~ $ .venv/lib/python3.11/site-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome
WARN    The chromedriver version (115.0.5790.170) detected in PATH at /usr/bin/chromedriver might not be compatible with the detected chrome version (117.0.5938.88); currently, chromedriver 117.0.5938.88 is recommended for chrome 117.*, so it is advised to delete the driver in PATH and retry
INFO    Driver path: /usr/bin/chromedriver
INFO    Browser path: /home/executor/.cache/selenium/chrome/linux64/117.0.5938.88/chrome

~ $ cat > ~/.cache/selenium/se-config.toml << EOF
> browser = "chrome"
> browser-path = "/usr/bin/chromium-browser"
> EOF
~ $ .venv/lib/python3.11/site-packages/selenium/webdriver/common/linux/selenium-manager
ERROR   You need to specify a browser or driver

Relevant log output

See above

Operating System

Alpine Linux

Selenium version

Selenium 4.12.0 (from PyPI), Python 3.11

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

Chromium 115.0.5790.170

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

ChromeDriver 115.0.5790.170

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-rustRust code is mostly Selenium ManagerI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions