这个问题在这里已有答案:

我有这个错误:

Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\SeleniumProject\chromedriver.exe

我知道我的问题依赖于eclipse Inside my Package Explorer的这一部分 .

这是我在“测试”下使用的测试脚本

package test;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class PleaseWork {


    public static void main(String[] args) throws Exception {
        // TODO Auto-generated method stub

        System.setProperty("webdriver.chrome.driver","C:\\SeleniumProject\\chromedriver.exe");

        WebDriver driver = new ChromeDriver();

        driver.get("https://google.com");

        driver.manage().window().maximize();

        Thread.sleep(5000);

        //close
        driver.close();

    }

}