在Windows 7中使用C#运行Selenium测试时出现“IEDriverServer不存在”错误

我正在使用带有C#的WebDriver开发Automation框架。它与Firefox一起工作正常,但不适用于IE。

我收到以下错误:

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 07000

我使用的是IE 9和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();

也可以看看 。

Per Jim Evans(曾在IEDriverServer工作)

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.

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.

https://groups.google.com/forum/?fromgroups#!topic/webdriver/EvTyEPYchxE

相关文章

文章浏览阅读2.2k次,点赞6次,收藏20次。在我们平时办公工作...
文章浏览阅读1k次。解决 Windows make command not found 和...
文章浏览阅读3.2k次,点赞2次,收藏6次。2、鼠标依次点击“计...
文章浏览阅读1.3w次。蓝光版属于高清版的一种。BD英文全名是...
文章浏览阅读974次,点赞7次,收藏8次。提供了更强大的功能,...
文章浏览阅读1.4w次,点赞5次,收藏22次。如果使用iterator的...