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

Pat picture Pat · Jun 13, 2012 · Viewed 46.1k times · Source

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:\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

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.

Answer

Peter Bernier picture Peter Bernier · Jul 6, 2012

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.