異常線程「main」 java.lang.IllegalStateException:驅動程序 可執行文件不存在: /Users/Golcha/Desktop/Automation/geckodriver.exe
代碼:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class selenium{
private static WebDriver driver;
public static void main(String[]args){
System.setProperty("webdriver.gecko.driver","Users/Golcha/Desktop/Automation/geckodriver.exe");
setDriver(new FirefoxDriver());
}
public static WebDriver getDriver() {
return driver;
}
public static void setDriver(WebDriver driver) {
selenium.driver = driver;
}
}
請不要在標題中添加整個錯誤信息。 – demouser123