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
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();
_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,

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);

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 ?

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

Hi Amit

Greetings !!!

I’m still facing ‘The HTTP request to the remote WebDriver server Time out issue’.
I desperately need your help to handle this.
I sent you the original log files via email which you asked for.

Could you please look into this ? Will be grateful

Hi @ankit.myle,

I went through the logs that you’ve sent me.
In the failed scenario, I can see that there were 5 interactions with the element that causing this exception.

The first 4 interactions with it are involved with locating it, getting a response back and eventually clicking on it.
The fifth interaction is also a click action that failed after 90 seconds due to a timeout. Unfortunately, I couldn’t find any valuable information in the logs for why it failed. You can have a look at the stack trace and maybe try to debug it:

2020-01-23T04:02:22.0982756Z ##[error]   OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:13948/session/8d59ad6ffe0875b865a09b2f421538a8/element/3241f2e1-035d-4775-9418-9fe3780445f5/click timed out after 90 seconds.
2020-01-23T04:02:22.0992811Z ##[error]  ----> System.Net.WebException : The operation has timed out
2020-01-23T04:02:22.0992811Z ##[error]Stack Trace:
2020-01-23T04:02:22.0992811Z ##[error]   at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
2020-01-23T04:02:22.1002764Z ##[error]   at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
2020-01-23T04:02:22.1002764Z ##[error]   at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
2020-01-23T04:02:22.1002764Z ##[error]   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2020-01-23T04:02:22.1012815Z ##[error]   at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
2020-01-23T04:02:22.1012815Z ##[error]   at OpenQA.Selenium.Remote.RemoteWebElement.Click()
2020-01-23T04:02:22.1012815Z ##[error]   at OpenQA.Selenium.Remote.RemoteWebElement.Submit()
2020-01-23T04:02:22.1022764Z ##[error]   at QuotOMatic.Test.UI.Pages.Login.LogIn() in D:\B\1\1\s\QuotOMatic.Test.UI\Pages\Login.cs:line 117
2020-01-23T04:02:22.1022764Z ##[error]   at QuotOMatic.Test.UI.Tests.TC418369_Broker_Authentication_SmokeTest._Login() in D:\B\1\1\s\QuotOMatic.Test.UI\Tests\TC418369_Broker_Authentication_SmokeTest.cs:line 29
2020-01-23T04:02:22.1022764Z ##[error]--WebException
2020-01-23T04:02:22.1032803Z ##[error]   at System.Net.HttpWebRequest.GetResponse()
2020-01-23T04:02:26.0330211Z Information: NUnit Adapter Test execution complete
2020-01-23T04:02:26.0710262Z Results File: D:\B\3\103f9652c\TestResults\ENTP1TFSBA_SVC_ENTP1TFSBA03 2020-01-22 20_02_22.trx
2020-01-23T04:02:26.0720192Z Total tests: 3. Passed: 0. Failed: 1. Skipped: 0.
2020-01-23T04:02:26.0730192Z ##[error]   at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)Test Run Failed.
2020-01-23T04:02:26.0730192Z Test execution time: 2.1605 Minutes

Please let me know if you’ll need my help with that.

Kind regards,