Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
419 views
in Technique[技术] by (71.8m points)

eclipse - Java Selenium ChromeDriver executable does not exist

I looked everywhere and I don't know what am I doing wrong here. It would be really helpful if you could guys help me out.

Code:

System.setProperty("webdriver.chrome.driver","/Users/eshanmostafa/eclipse- 
        workspace/TestNG/chromedriver");
        WebDriver driver = new ChromeDriver();  
        driver.manage().window().fullscreen();
        driver.manage().deleteAllCookies();
        driver.manage().timeouts().pageLoadTimeout(40,TimeUnit.SECONDS);
        driver.manage().timeouts().implicitlyWait(40,TimeUnit.SECONDS);
}

Error Message:

FAILED CONFIGURATION: @BeforeMethod setUp
java.lang.IllegalStateException: The driver executable does not exist: /Users/eshanmostafa/eclipse-workspace/TestNG/chromedriver
    at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
    at 

question from:https://stackoverflow.com/questions/65836583/java-selenium-chromedriver-executable-does-not-exist

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Are you using macbook? you need to change driver exe file as executable file then refresh project and try again


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...