Selenium 3 - IllegalStateException

23 views
Skip to first unread message

Harish Dhage

unread,
Jan 5, 2017, 12:49:46 PM1/5/17
to selendroid
Hi,

I am using JDK 7, Mozilla version 45.6.0 and selenium-server-standalone-3.0.1.jar. But with these versions I am getting below 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
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at org.openqa.selenium.firefox.GeckoDriverService.access$000(GeckoDriverService.java:37)
at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:95)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.firefox.FirefoxDriver.createCommandExecutor(FirefoxDriver.java:277)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
at com.library.commonLib.launchMozillaBrowser(commonLib.java:41)
at com.library.commonLib.loginApplication(commonLib.java:57)
at com.source.CreateTask.main(CreateTask.java:15)


My code as below
System.setProperty("webdriver.gecko.drive", "D:/Harish/Learning/ActiTime\\src/drivers/geckodriver.exe");
drive = new FirefoxDriver();

Please help me what could be the issue.

Thanks,
Harish

Ravindra Sharma

unread,
Jan 10, 2017, 1:06:06 AM1/10/17
to selendroid
seems like issue with your driver path. try this : D:\\Harish\\Learning\\ActiTime\\src\\drivers\\geckodriver.exe

~Ravindra
Reply all
Reply to author
Forward
0 new messages