TestProject Forum
Powered by leading experts in the test automation community

Getting ''HTTP request to the remote WebDriver server for URL ..Timeout error'' while executing tests on TFS server ''

I’m getting following error while executing the automation script on TFS server,

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 :

  1. Used ‘Submit’ instead of ‘Click’
  2. Created process to identify open chrome instances on server and closed (Kill PID’s) them
  3. Code trials:
ChromeOptions  options = new ChromeOptions();
options.AddArgument("no-sandbox");
_driver = new ChromeDriver(chromeService, options, TimeSpan.FromSeconds(120));

@TestProjectFourm Could you please guide me resolve this ???

Hi @ankit.myle,

Thanks for reaching out :slight_smile:
Could you please elaborate about the automation script from the TFS server?
How did you execute it? Using our API? What endpoint did you use?

Kind regards,
Amit

Thanks @amit.yahav for the quick response.

I’m doing UI Automation testing using Selenium with C#. I’m running my test script on TFS server.

I’m facing the above error while logging into the Application.

Explanation -

Below are steps which i’m executing -

  1. Opening Browser
  2. Enter- Url
  3. Enter- UserName
  4. Enter- Password
  5. Click on ‘SignIn’ button —> At this particular step, my browser serves the above mention error while running the tests from TFS server.

Let me know if you need more information on the same.

Hi @ankit.myle,

In your C# & Selenium project, did you use the TestProject C# SDK? Or just pure Selenium project?

@amit.yahav It’s just pure selenium project !!!

According to the error message, the driver didn’t respond within 90 seconds, which is the default timeout of Selenium. As a result of this, it was cancelled.

It would really help if you could send us the driver/Selenium server log:

var optn = new ChromeOptions();
var service = ChromeDriverService.CreateDefaultService(@"D:\Driver\"); 
service.LogPath = "chromedriver.log";
service.EnableVerboseLogging = true;
var driver = new ChromeDriver(service, optn);
driver.Navigate().GoToUrl("https://www.google.co.in/?gfe_rd=cr&ei=aWh0U7WHEJGAuASTuYHIAQ");

The ChromeOptions is for the browser process itself. Logging goes to the ChromeDriver by setting the ChromeDriverService variables.

Hi Amit,

Thanks for the response !!
I have logged the driver/Selenium server log but here i’m not able upload log file (.txt)
Please guide me how to do that ?
Could you please share your email id if possible ?

Hi,
I am also facing same error while running my script on TFS server,
Please guide me to resolve this

Hi @ankit.myle,
Send it to my email please: amit.yahav@testproject.io

Hi @vijay.jdk,

If you have the same issue, please follow my instructions above and send me the logs as well

Thanks Amit !!!

I have sent you couple of Chrome driver log files.
Please let me know if you needed more information on the same.

Thanks @ankit.myle, I just got the logs.
I’ll review them and let you know if I found something there.

Hi @ankit.myle,

We reviewed the logs and the only difference we could find is with the URL you are reaching.
In the successful scenario, you are using: https://DummyAppUrl.com
While in the failed scenario, you are using: https://DummyAppUrl/

Are you running this test on two different environments?

Hi Amit,

Thanks for reviewing the logs,
No, the environment is same in both cases.
Let me give one more try to capture the logs for same environment and same test case.
Please review your email id and share the feedback.

Thanks and Regards