硒。 IEDriverServer.exe不存在?

时间:2012-05-04 14:07:01

标签: selenium

我收到错误:

文件功能[BrowserName =,IsJavaScriptEnabled = False,Platform = Any,Version =] \ IEDriverServer.exe不存在。可以在http://code.google.com/p/selenium/downloads/list`

下载驱动程序

我该怎么做才能解决这个错误,因为我找不到信息......

3 个答案:

答案 0 :(得分:6)

除非您从源代码构建Selenium项目,或者正在使用.NET绑定并在InternetExplorerOptions类中设置了特定选项,否则您不应该看到此消息。当前源代码在此特定区域中是易变的,因为该项目当前正在实施IE驱动程序的独立可执行服务器的使用,类似于当前针对Chrome驱动程序所发生的情况。如果您 从源构建,或者有兴趣使用此新功能,则应从异常消息中指定的URL下载独立的IE驱动程序服务器可执行文件。

答案 1 :(得分:0)

下载给定网址的IEDriver.exe

http://code.google.com/p/selenium/downloads/list

假设exe文件保存在E:\ IEdriver.exe中。

在Selenium中你必须设置IEDriver的属性,因为Selenium只有firefox驱动程序。

设置系统属性,然后调用IEDriver。

WebDriver driver;

System.setProperty("webdriver.ie.driver", "E:\\IEdriver.exe");

//Selenium will not support single slash, so we are providing double slash in path.

driver = new InternetExplorerDriver();

// By this it will call the IEDriver and execute

由于

答案 2 :(得分:0)

分享的一个例子:

public static void main(String[] args) {


        System.setProperty("webdriver.ie.driver", "D:\\selenium\\IEDriverServer.exe");
        WebDriver driver = new InternetExplorerDriver();
        driver.get("www.google.com");
        driver.findElement(By.id("gbqfq")).sendKeys("abc");
        driver.close();

}

}