I got a time out error as on the below.
I have highlighted the most important area of the error message.
Test Name: Validate_Availability_Of_Valid_Completion_By_Date_And_Time_At_Workorder_Details
Test FullName: AppiumDTZ.Test.Test_WorkOrderDetails.Validate_Availability_Of_Valid_Completion_By_Date_And_Time_At_Workorder_Details
Test Source: e:\QA automation\appium\AppiumTFS\DTZAppium\AppiumDTZ\AppiumDTZ\Test\Test_WorkOrderDetails.cs : line 87
Test Outcome: Failed
Test Duration: 0:00:00
Result Message: Assembly Initialization method AppiumDTZ.Test_LandingPage.testinitialisation threw exception. OpenQA.Selenium.WebDriverException: OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session timed out after 60 seconds. ---> System.Net.WebException: The request was aborted: The operation has timed out.. Aborting test execution.
Result StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
--- End of inner exception stack trace ---
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
at AppiumDTZ.InitialiseAppium.AppiumSetupMethod() in e:\QA automation\appium\AppiumTFS\DTZAppium\AppiumDTZ\AppiumDTZ\InitialiseAppium.cs:line 41
at AppiumDTZ.Test_LandingPage.testinitialisation(TestContext context) in e:\QA automation\appium\AppiumTFS\DTZAppium\AppiumDTZ\AppiumDTZ\Test\Test_LandingPage.cs:line 24
The solution was add a time stamp to the place where you initialize the appium web driver or remote web driver or what ever the driver.
By default it has set to 60 seconds.
driver = new RemoteWebDriver (new Uri("http://127.0.0.1:4723/wd/hub"), capabilities,TimeSpan.FromSeconds(180));
I have highlighted the most important area of the error message.
Test Name: Validate_Availability_Of_Valid_Completion_By_Date_And_Time_At_Workorder_Details
Test FullName: AppiumDTZ.Test.Test_WorkOrderDetails.Validate_Availability_Of_Valid_Completion_By_Date_And_Time_At_Workorder_Details
Test Source: e:\QA automation\appium\AppiumTFS\DTZAppium\AppiumDTZ\AppiumDTZ\Test\Test_WorkOrderDetails.cs : line 87
Test Outcome: Failed
Test Duration: 0:00:00
Result Message: Assembly Initialization method AppiumDTZ.Test_LandingPage.testinitialisation threw exception. OpenQA.Selenium.WebDriverException: OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session timed out after 60 seconds. ---> System.Net.WebException: The request was aborted: The operation has timed out.. Aborting test execution.
Result StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
--- End of inner exception stack trace ---
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
at AppiumDTZ.InitialiseAppium.AppiumSetupMethod() in e:\QA automation\appium\AppiumTFS\DTZAppium\AppiumDTZ\AppiumDTZ\InitialiseAppium.cs:line 41
at AppiumDTZ.Test_LandingPage.testinitialisation(TestContext context) in e:\QA automation\appium\AppiumTFS\DTZAppium\AppiumDTZ\AppiumDTZ\Test\Test_LandingPage.cs:line 24
The solution was add a time stamp to the place where you initialize the appium web driver or remote web driver or what ever the driver.
By default it has set to 60 seconds.
driver = new RemoteWebDriver (new Uri("http://127.0.0.1:4723/wd/hub"), capabilities,TimeSpan.FromSeconds(180));
No comments:
Post a Comment