selva selva - 1 year ago 129
Java Question

Selenium Grid showing WebDriverException error

My Selenium Grid is showing an error:

org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the system property;

but I have specified it perfectly (according to my knowledge)

capability =;
System.setProperty("", "D:\\testing\\zip file\\chromedriver_win_26.0.1383.0\\chromedriver.exe");
driver = new ChromeDriver();

I don't know what went wrong. This same code worked perfectly last week but now it doesn't.

Answer Source

if you are running the Grid, you need to set up Chromedriver executable in the node:

 java -jar selenium-server-standalone-2.31.0.jar -role node -hub http://localhost:4444/grid/register -maxSession 15 -browser browserName="chrome",version=ANY,platform=WINDOWS,maxInstances=15\chromedriver.exe

the most important part is the -D switcher which goes right after the chrome browser setup.

also, if you are running more than one nodes, that path must direct to the chromedriver executable on the concrete computer (node). Thats why I have it as relative path and not as a absolute path...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download