0

I am using selenium selenium-server-standalone-3.4.0 and geckodriver-v0.18.0-win64 for selenium grid testing.

even after setting system.setProperty("webdriver.gecko.driver","path to firefox binary") it is giving me following error:

System.setProperty("webdriver.gecko.driver", "path to\\geckodriver.exe");   
  DesiredCapabilities desiredCapablities= DesiredCapabilities.firefox();
  desiredCapablities.setPlatform(Platform.WINDOWS);   
_driver = new RemoteWebDriver(new URL(remoteUrl),desiredCapablities);

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

  • Exception: org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.gecko.driver system property; – Mahesh Chaugule Jul 12 '17 at 09:18
  • The property "webdriver.gecko.driver" is meant to define the path to `geckodriver.exe` and not `firefox.exe`. Moreover, the remote server runs on a different JVM with a different set of properties, so you can't set this property with the client. – Florent B. Jul 12 '17 at 10:30

2 Answers2

0

You have to set the driver path while launch the selenium grid node like,

java -Dwebdriver.gecko.driver="driverpath" -jar selenium-server-standalone-3.4.0 -role node -hub http://gridip:port/grid/register
Murthi
  • 5,299
  • 1
  • 10
  • 15
0

Try adding the geckodriver.exe to the same directory that you are running the grid from.

You should not have to set the path when creating the remote driver for firefox.

smit9234
  • 361
  • 1
  • 7