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

[🚀 Feature]: Use Environment Variables to set driver locations #14045

Open
titusfortner opened this issue May 28, 2024 · 10 comments
Open

[🚀 Feature]: Use Environment Variables to set driver locations #14045

titusfortner opened this issue May 28, 2024 · 10 comments

Comments

@titusfortner
Copy link
Member

Feature and motivation

We discussed in the Selenium Dev Summit about having the ability to set driver location system-wide using environment variables, similar to how Java currently uses System Properties.

See #13806

Usage example

If we match Java System Properties, it would look like:

os.environ["WEBDRIVER_GECKO_DRIVER"] = path_to_geckodriver
@pujagani
Copy link
Contributor

This is a nit. But why is Java label added to this issue? I might be missing something.

@diemol
Copy link
Member

diemol commented May 29, 2024

The idea is to leave a path for users who want to avoid Selenium Manager completely. The decision was to implement an env var that the service would use. I guess we can keep the system properties in Java instead of implementing the env var.

@titusfortner
Copy link
Member Author

I included it intentionally because perhaps Java should look for the System Property and the Environment Variable?
Is there a scenario where you have a VM where you want to run multiple bindings and only set things one way? /shrug

@titusfortner
Copy link
Member Author

Actually, which convention do we want to match?

For instance in Java:
System Property: webdriver.gecko.driver
Java wrapper for property: GeckoDriverService.GECKO_DRIVER_EXE_PROPERTY

Options:
Match property convention: WEBDRIVER_GECKO_DRIVER
Match env convention: SE_GECKODRIVER

@pujagani
Copy link
Contributor

I am in favour of having a consistent way across bindings, if that is possible.

@pujagani
Copy link
Contributor

Match env convention: SE_GECKODRIVER I think this. But I don't have any strong opinions about this. I would prefer that this is the convention we use for other env variables example: SE_EDGE_PATH. It is might be easier for users to identify/set Selenium related environment variables.

@aguspe
Copy link
Contributor

aguspe commented Jul 20, 2024

@pujagani @titusfortner I'm working on this hopefully I will put it for review this weekend :)

@p0deje
Copy link
Member

p0deje commented Sep 16, 2024

#14287 added Ruby part and the following variables:

  • SE_CHROMEDRIVER
  • SE_EDGEDRIVER
  • SE_GECKODRIVER
  • SE_IEDRIVER
  • SE_SAFARIDRIVER

@p0deje p0deje removed the C-rb label Sep 16, 2024
@Delta456
Copy link
Contributor

I can work on the Python functionality.

@Delta456
Copy link
Contributor

Delta456 commented Oct 4, 2024

The python part has also been implemented. In a2cacc1 and uses the same environment variables as Ruby.

@harsha509 harsha509 removed the C-py label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Low
Development

No branches or pull requests

7 participants