我遇到此错误:
Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\SeleniumProject\chromedriver.exe
我知道我的问题与日食有关 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();
}
}