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