在Nunit测试套件中运行持续集成,每次第一个测试用例都失败并出现以下错误:
SetUp : OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:7055/hub/session/384a1a60-4ed3-4cac-8143-265aa63ec980/url timed out after 60 seconds.
----> System.Net.WebException : The operation has timed out
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.]]>
服务器有Windows8服务器和Mozilla firefox v 21
代码是:
#region TestSetup
[SetUp]
public void Setup()
{
browser = ConfigurationHelper.GetWebDriver();
browser.Navigate().GoToUrl(ConfigurationHelper.GetConsumerBankingURL());
browser.Manage().Window.Maximize();
loginPage = new LoginPage(browser);
user = VoyagerHelper.EnrollUser();
//The user should be able to successfully logged into the system. The default destination page shows up
financialOverviewPage = loginPage.Login(user.UserName, ConfigurationBase.DefaultPassword) as FinancialOverviewPage;
accountNumbers = financialOverviewPage.GetAccountNumber();
}
#endregion
#region TestTearDown
[TearDown]
public void TearDown()
{
try
{
financialOverviewPage.Logout();
}
finally
{
browser.Quit();
}
}
#endregion