3

Note: I am not asking about setting the path of the chromedriver.

I want to run a Selenium node with a specific version of Chromium as opposed to the default Chrome installed on the system. The webdriver doc says I would need to pass a ChromeOptions object, but this is obviosuly impossible to do on the command line.

I've tried manually adding a JSON that represents ChromeOptions to the command line (like below), but it does not have any effect.

java.exe -jar selenium-server-standalone-2.47.1.jar -role node -hub http://localhost:4444/grid/register -browser browserName="chrome",version=ANY,platform=WINDOWS,maxInstances=5,chromeOptions={binary:./chromium/chrome.exe} -Dwebdriver.chrome.driver=chromedriver.exe

(I've tried all different ways of quoting the JSON, but it is simply not used.)

billc.cn
  • 7,187
  • 3
  • 39
  • 79

1 Answers1

2

What has not been made clear in the bug filed for this nor the documentation is that a new capability key "chrome_binary" has been added to specifically support this. See commit 41a9d29.

This key can be used in the -browser argument used to start a node and the node will build the ChromeOption for you.

Richard Neish
  • 8,414
  • 4
  • 39
  • 69
billc.cn
  • 7,187
  • 3
  • 39
  • 79