-2

Now, I am started to learn Selenium WebDriver.I have got the following error.

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases.

Does anyone know how to resolve this error?

ple103
  • 2,080
  • 6
  • 35
  • 50
Aarthi
  • 505
  • 1
  • 4
  • 10
  • 1
    Provide more info: 1. What are your exact testing steps? 2. What worked for you? Show code. 3. Where are you stuck? Provide error stack trace. – undetected Selenium May 02 '17 at 09:04
  • Did you google the error? What did you find? What have you tried to resolve the issue on your own? – JeffC May 02 '17 at 14:44
  • http://stackoverflow.com/questions/38676719/selenium-using-java-the-path-to-the-driver-executable-must-be-set-by-the-webdr – JeffC May 02 '17 at 14:45

1 Answers1

0

It seems like you are using latest version of selenium. Unlike older versions, wherein you don't need to set system property for browser driver executable in case of firefox, the System.setProperty("path to geckodriver.exe") is required to be mentioned in code. This should resolve your issue