我在研究C#
中的selenium webdriver。当我的测试用例来测试浏览器IE
,那么这个错误运行:用IE浏览器运行测试用例时的C#中的硒
Test method AgileTravelUITests.GoogleSearchTest.TestIE threw exception: OpenQA.Selenium.DriverServiceNotFoundException: The IEDriverServer.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://selenium-release.storage.googleapis.com/index.html .
我尝试下载并安装IEDriverServer_x64_2.53.0.zip
夹,但没有奏效。
这是我的代码:
[TestMethod]
public void TestIE()
{
IWebDriver driver = new InternetExplorerDriver();
driver.Navigate().GoToUrl("http://www.google.com");
IWebElement element = driver.FindElement(By.Name("q"));
element.SendKeys("Hello Selenium WebDriver!");
element.Submit();
}
我的代码现在在IE工作的罚款。你可以按照这个链接Not able to launch IE browser using Selenium2 (Webdriver) with Java Java和C#是一样的。希望能帮助到你。
你能分享你的代码,你有没有试过?它是'.exe'不是'.zip' ..你需要解压缩这个zip .. –