-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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]: Manually invoke Selenium Manager to pre-install webdriver binary in Dockerfile #12168
Comments
@calebplum, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Right now it would run the first time you created a driver, then use the cached versions for everything after that. Getting this sorted as part of docker setup is a use case we've talked about. If we release Selenium Manager as a standalone artifact it won't be until we have a stable 1.0 release. Python code that will work without creating a session: webdriver.common.driver_finder.DriverFinder.get_path(
webdriver.chrome.service.Service(),
webdriver.chrome.options.Options()
) |
This is possible now and will be more straightforward with #13022 so no need to track this explicitly here. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature and motivation
I need to build a custom docker image to run some Python Selenium tests in. I'd like to pre-install the webdriver from inside the Dockerfile to reduce resource consumption at runtime.
With the latest version of Selenium, the easiest way to download the webdriver is to let Selenium handle it via Selenium Manager. However, my understanding is that Selenium Manager is only invoked when a webdriver session is spawned, for example with
driver = webdriver.Chrome()
.Is there any way to invoke Selenium Manager manually and instruct it to download the corresponding webdriver binary without spawning an instance of the webdriver? In my case this would be performed in my Dockerfile so any method using either Linux shell commands or Python would be suitable.
Usage example
A solution involving either shell command or Python code to download the webdriver binary without actually instantiating the webdriver.
The text was updated successfully, but these errors were encountered: