Using Chrome Driver with WebDrive and Selenium 2.4
I am trying to run google chroome with webdrive but i always get error
java -jar ..\..\Selenium\selenium-server-2.4.0\selenium-server-standalone-2.4.0.jar -role webdriver -hub http://localhost:4444/grid/register -Dwebdriver.chrome.driver=..\..\Selenium\Driver\GoogleChroome\chromedriver.exe
but i get this error:
D:\PROJEKTI\crawler\WebCrawlerSuite\DLL\RunSelenium\Grid2>java -jar ..\..\Seleni
um\selenium-server-2.4.0\selenium-server-standalone-2.4.0.jar -role webdriver -h
ub http://localhost:4444/grid/register -Dwebdriver.chrome.driver=D:\PROJEKTI\cra
wler\WebCrawlerSuite\DLL\Selenium\Driver\GoogleChroome\chromedriver.exe
23.8.2011 21:04:32 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid node
Exception in thread "main" 开发者_JAVA百科java.lang.ArrayIndexOutOfBoundsException: 5
at org.openqa.grid.common.CommandLineOptionHelper.getParamValue(CommandL
ineOptionHelper.java:45)
at org.openqa.grid.common.RegistrationRequest.loadFromCommandLine(Regist
rationRequest.java:389)
at org.openqa.grid.common.RegistrationRequest.build(RegistrationRequest.
java:351)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:57)
What i am doing wrong?
I was getting the same error and solved it by moving the -Dwebdriver.chrome.driver argument to the front
java -jar ..\..\Selenium\selenium-server-2.4.0\selenium-server-standalone-2.4.0.jar -Dwebdriver.chrome.driver=..\..\Selenium\Driver\GoogleChroome\chromedriver.exe -role webdriver -hub http://localhost:4444/grid/register
精彩评论