Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
546 views
in Technique[技术] by (71.8m points)

internet explorer - "IEDriverServer does not exist" error during running Selenium test with C# in Windows 7

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

I am getting the following error:

IEDriverServer.exe does not exist-The file c:usersadministratordocumentsvisual studio 2010projectsTestProject1TestProject1inDebugIEDriverServer.exe does not exist. The driver can be downloaded at http://code.google.com/p/selenium/downloads/list

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 this screenshot.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The IEDriverServer.exe (as well as ChromeDriver.exe) can be downloaded from:

http://selenium-release.storage.googleapis.com/index.html.

To get these to work with your Selenium tests, include the .exe in your test project, and set its properties to 'Copy Always'.

NOTE: You'll have to adjust the Add File dialog to display .exe files.

Doing this will resolve the error.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...