Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
547 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...