加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

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

发布时间:2020-12-13 20:49:34 所属栏目:Windows 来源:网络整理
导读:我正在使用带有C#的WebDriver开发Automation框架。它与Firefox一起工作正常,但不适用于IE。 我收到以下错误: IEDriverServer.exe does not exist-The file c:usersadministratordocumentsvisual studio 2010projectsTestProject1TestProject1binD
我正在使用带有C#的WebDriver开发Automation框架。它与Firefox一起工作正常,但不适用于IE。

我收到以下错误:

IEDriverServer.exe does not exist-The file c:usersadministratordocumentsvisual studio 2010projectsTestProject1TestProject1binDebugIEDriverServer.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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读