Dynamically setting the chromedriver location path on a remote grid server

173 views
Skip to first unread message

Jamie Scott

unread,
Sep 5, 2023, 9:40:06 AM9/5/23
to Selenium Users
Hi all,

I'm aware of the existing
-Dwebdriver.chrome.driver=/path/to/chromedriver
argument passed when starting grid server, which is what I'm currently using to tell Selenium which chromedriver to use.

Many of my tests require different chromedriver binaries, at the moment I spin up grid server via a Python subprocess and when I need to change chromedriver, I restart grid with a different chromedriver path - this is rather cumbersome and means I can't use the same grid server for different Chrome versions (which require different chromedrivers).
I'm using the Python Selenium RemoteWebDriver for my tests, which runs the test code on a different machine to the browser. Is there a way to specify the path to the desired chromedriver remotely to avoid my current workaround of having to restart selenium with a different "webdriver.chrome.driver" property?

A bonus would be if it is also possible to specify the log file path as well as the driver path. Again at the moment I manage this with the "webdriver.chrome.logfile" property and restart my grid subprocess.

I've looked around the Selenium Python codebase for a parameter I can set somewhere to do this, but have only drawn blanks so far so I'm wondering if this is possible.

Many thanks!
Reply all
Reply to author
Forward
0 new messages