I'm getting following error while executing the automation script on TFS Error,
Error message:
OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:59508/session/b655773d161676bad7ab56591cce3cf2/element/1560281f-e8b2-4bd7-a6c7-7eba3a94adc9/click timed out after 90 seconds.
----> System.Net.WebException : The operation has timed out
Stack trace:
at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Click()
at QuotOMatic.Test.UI.Pages.Login.LogIn() in D:\B\2\2\s\QuotOMatic.Test.UI\Pages\Login.cs:line 117
at QuotOMatic.Test.UI.Tests.TC418369_Broker_Authentication_SmokeTest._Login() in D:\B\2\2\s\QuotOMatic.Test.UI\Tests\TC418369_Broker_Authentication_SmokeTest.cs:line 29
--WebException
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
I did the following work around to resolve this :
- Used 'Submit' instead of 'Click'
- Created process to identify open chrome instances on server and closed (Kill PID's) them
Code trials:
ChromeOptions options = new ChromeOptions(); options.AddArgument("no-sandbox"); _driver = new ChromeDriver(chromeService, options, TimeSpan.FromSeconds(120));
Could you please guide me resolve this ???