Red*_*zon 4 selenium internet-explorer webdriver
我在VS2010测试项目中进行了简单的Selenium测试,如下所示.
[TestMethod]
public void MyTestInIE8()
{
IWebDriver driver = new InternetExplorerDriver();
try
{
driver.Navigate().GoToUrl("http://localhost/MyMVC/ABC/DoStuff");
driver.FindElement((By.Id("Name"))).SendKeys("John");
//... run rest of the test
}
finally
{
driver.Quit();
}
}
Run Code Online (Sandbox Code Playgroud)
这在本地服务器上运行良好.但是在构建服务器上它失败并显示以下消息....抛出异常:OpenQA.Selenium.WebDriverException:服务器没有响应url http:// localhost:4444/session/5e5e9b7a-e05c-40d8-9a20-9cab138b2b87.
问题似乎是在finally子句中调用Quit()方法.我试图传入一个已知的端口号,即InternetExplorerDriver(8080),但它没有任何区别.Firefox驱动程序在本地和构建服务器上运行良好.我发现有人报告了类似问题,但没有找到可行的解决方案.http://groups.google.com/group/webdriver/msg/4347971da4d96e97
这是我的配置.Windows 7专业版SP1,64位.
Webdriver - selenium-dotnet-2.0b2.
IE8.
我的构建服务器是带有IE8的Windows Server2008 R2 Standard.
谢谢.
归档时间: |
|
查看次数: |
7256 次 |
最近记录: |