-1
尝试使用Selenium Webdriver运行基本测试代码时,出现IllegalStateException。java.lang.IllegalStateException:驱动程序可执行文件不存在 - Selenium Webdriver
这是我写的代码在Eclipse:
{
...
System.setProperty("webdriver.ie.driver","<Absolutepath>/IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver(); //This is the line which throws the exception
...
}
异常跟踪:
java.lang.IllegalStateException: The driver executable does not exist.
at com.google.common.base.Preconditions.checkState(Preconditions.java:518)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:123)
的IEDriverServer.exe已从SeleniumHQ下载页面下载并把我的系统(Windows 10)上。
当我尝试Chrome驱动程序时也发生同样的异常。
我已经通过类似的帖子,但找不到解决问题的东西。
在PATH中设置绝对路径没有帮助。对于镀铬汽油也同样例外。 – Elma