" IEDriverServer不存在"在Windows 7中使用C#运行Selenium测试过程中的错误 [英] "IEDriverServer does not exist" error during running Selenium test with C# in Windows 7

查看:543
本文介绍了" IEDriverServer不存在"在Windows 7中使用C#运行Selenium测试过程中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用的webdriver用C#自动化框架。其工作罚款的Firefox,但不与IE浏览器。

I'm working on Automation framework using WebDriver with C#. Its working fine with Firefox but not with IE.

我收到以下错误:

IEDriverServer.exe不存在,该文件C:\\用户\\管理员\\文档\\ Visual Studio 2010的\\项目\\ TestProject1 \\ TestProject1 \\ BIN \\调试\\ IEDriverServer.exe不存在。驱动程序可以在<一个下载href=\"http://$c$c.google.com/p/selenium/downloads/list\">http://$c$c.google.com/p/selenium/downloads/list

IEDriverServer.exe does not exist-The file c:\users\administrator\documents\visual studio 2010\projects\TestProject1\TestProject1\bin\Debug\IEDriverServer.exe does not exist. The driver can be downloaded at http://code.google.com/p/selenium/downloads/list

我使用IE 9和Windows 7。

I am using IE 9 and Windows 7.

IWebDriver driver = new InternetExplorerDriver();
driver.Navigate().GoToUrl("http://www.google.co.uk");
IWebElement queryBox = driver.FindElement(By.Name("q"));
queryBox.SendKeys("The Automated Tester");
queryBox.SendKeys(Keys.ArrowDown);
queryBox.Submit();

另请参阅

See also .

推荐答案

每吉姆·埃文斯(谁在IEDriverServer工作)

Per Jim Evans (who works on IEDriverServer)

在.NET绑定不扫描的在%PATH%环境变量
  可执行文件。这意味着,对于.NET绑定的只有的中,
  IEDriverServer.exe预计在同一或者被发现
  目录作为.NET绑定集,也必须指定
  目录,它可以在构造函数中搜到
  InternetExplorerDriver类。

The .NET bindings don't scan the %PATH% environment variable for the executable. That means for the .NET bindings only, the IEDriverServer.exe is expected to either be found in the same directory as the .NET bindings assembly, or you must specify the directory where it can be found in the constructor to the InternetExplorerDriver class.

否则这些东西(或
  坐落在InternetExplorerOptions的UseInternalServer财产
  类)将导致.NET IE驱动程序实现抛出
  例外。这是严格的设计,因为我们希望人们开始
  使用独立IEDriverServer.exe,并以使用的能力
  内部或遗产的服务器版本将在被删除
  未来的版本。

Failure to do one of these things (or to set the UseInternalServer property in the InternetExplorerOptions class) will cause the .NET IE driver implementation to throw an exception. This is strictly by design, as we want people to begin using the standalone IEDriverServer.exe, and the ability to use an "internal" or "legacy" version of the server will be removed in a future release.

<一个href=\"https://groups.google.com/forum/?fromgroups#!topic/webdriver/EvTyEPYchxE\">https://groups.google.com/forum/?fromgroups#!topic/webdriver/EvTyEPYchxE

这篇关于&QUOT; IEDriverServer不存在&QUOT;在Windows 7中使用C#运行Selenium测试过程中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆