script giving error

package seltetst1;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class selpractice {

public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty(“webdriver.gecko.driver”, “D:\\MediaFiles\\geckodriver-v0.16.1-win64”);
WebDriver driver = new FirefoxDriver();
driver.get(“http://economictimes.indiatimes.com/”);
}

}

Default Asked on May 11, 2017 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    error —

    Exception in thread “main” java.lang.IllegalStateException: The driver executable is a directory: D:\MediaFiles\geckodriver-v0.16.1-win64
    at com.google.common.base.Preconditions.checkState(Preconditions.java:518)
    at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:138)
    at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:131)
    at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:41)
    at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:115)
    at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:330)
    at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:207)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:104)
    at seltetst1.selpractice.main(selpractice.java:11)

    Default Answered on May 11, 2017.
    Add Comment
  • Your Answer

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