The driver
executable needs to be avaiable physically on node machine. You can set the path to exe while starting the node
Add this line in the command
-Dwebdriver.chrome.driver=./chromedriver.exe
I configure this from json file and found that's little easier
json file with name DefaultNode.json
{
"capabilities":
[
{
"browserName": "firefox",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"platform": "WINDOWS",
"browserName": "internet explorer",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"configuration":
{
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 5,
"port": 5555,
"host": ip,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": ip
}
}
To start the node with json config
java -jar selenium-server-standalone-2.45.0.jar -role webdriver -nodeConfig DefaultNode.json -Dwebdriver.ie.driver=.IEDriverServer.exe
Notice the IEDriverServer.exe is placed in same directory with json
file
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…