我正在尝试使用Eclipse中的selenium框架执行基本测试程序,但是我收到java.lang.IllegalStateException
错误。我添加了所有jar文件,我使用的是selenium 3.0.0 beta(java)。
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class test {
public static void main(String[]args){
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.com");
}
}
Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: F:\JAVA\WebDriverTest1\<C Users MANOJ 6 Downloads gecko>
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:121)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:116)
at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:38)
at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:91)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.firefox.FirefoxDriver.createCommandExecutor(FirefoxDriver.java:244)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:219)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:214)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:210)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:123)
at Test1.Test.main(Test.java:11)