0

Here's simple batch file I wrote to start the node for selenium grid

 set webdriver.ie.driver=C:\selenium-server\IEDriverServer.exe
echo %webdriver.ie.driver%
set webdriver.chrome.driver=C:\selenium-server\chromedriver.exe
echo %webdriver.chrome.driver%
java -jar selenium-server-standalone-2.32.0.jar -role hub

Yes both drivers exist in that directory and I've even added that directory to my System's Path variable. When I try to create a remote web driver like thus:

Platform platform = Platform.WINDOWS; desiredCapabilities =new DesiredCapabilities("internet explorer", "9.0", platform); driver = new RemoteWebDriver(new URL(gridUrl), desiredCapabilities);

I'm still getting an exception stating:

Exception: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see htt
/p/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://code.google.com/p/selenium/downloads/list

I'm using the latest IEDriver and chromedriver and selenium server 2.32.0 (which I believe is the latest one too).

Running on windows 7. I've tried both the 32 and 64 bit drivers for IE. Get the same problem with the chrome driver.

tad604
  • 336
  • 1
  • 5
  • 18
  • This is always tricky. You need to install the correct browser version for the selenium to work perfectly. Check which browser version does that selenium server version support . cheers – hopper May 22 '13 at 01:58

1 Answers1

4

Adding this option at the end of the command to start my node got everything working. Is this just poorly documented? did I miss something obvious? or is there still something weird going on?

-Dwebdriver.ie.driver=C:\selenium-server\IEDriverServer.exe

tad604
  • 336
  • 1
  • 5
  • 18
  • You can also get this done by setting the PATH environment variable to the directory where drivers are present – Harshavardhan Konakanchi May 22 '13 at 08:15
  • 1
    You tried to use an environment variable (the "set" statements in your batch file). Environment variables and Java system properties are **not** interchangeable. The -D syntax is the proper way to set a Java system property from the command line. – JimEvans Jul 21 '14 at 14:45