I get error message when I run “First Test Case with Selenium WebDriver”: 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

mogharr Default Asked on September 4, 2016 in Selenium WebDriver.
Add Comment
3 Answer(s)

You have to configure selenium webdriver in your test as follows:

public static WebDriver driver;
System.setProperty(“webdriver.chrome.driver”,<Path to chrome driver executable file>);
driver=new ChromeDriver();

mohamedz Default Answered on September 4, 2016.
Add Comment

download the geckodriver.exe  and than add the above code.

atuldandin Train Answered on September 26, 2016.
Add Comment

I highly recommend The  Introduction to Selenium WebDriver – Selenium Tutorial: http://blog.testproject.io/2016/03/31/selenium-webdriver-tutorial/

DebbyStone Train Answered on October 13, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.