5

I am using the latest Selenium WebDriver running using .NET/Microsoft Technology stack.

What I am observing these days is that all of my tests in the suite starts failing throwing this exception

Additional information: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:5557/wd/hub/session/c775e68e-c842-41b3-a1a6-44a88ef4c210/element. The status of the exception was KeepAliveFailure, and the message was: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.

I am not able to figure out what is the issue and what I need to do to resolve this issue. I am quite sure this is not to do with the coding.

The issue mainly occurs when I try clicking on a button or trying to enter some text in the input box.

Could any one please point me in the right direction as what I need to resolve this issue

Thanks

2
  • where you able to fix this? Commented Jul 19, 2018 at 12:46
  • 2
    I played around with the timeouts which resolved the issue. Due to larger timeout value, the connection between the hub and the client is getting lost. Thats the root cause of this issue... Commented Jul 21, 2018 at 20:08

1 Answer 1

2

This is old but thought I'd throw an answer here for anybody stumbling upon the same issue. Ran into this earlier today. I was able to get it to work by reducing the polling interval of the wait:

WebDriverWait myWait = new WebDriverWait(driver, TimeSpan.FromMinutes(5));
myWait.PollingInterval = TimeSpan.FromMilliseconds(500); //I reduced this from checking every 5 second to checking every half second and it started working.
bool waitOnUser = myWait.Until(t =>
            { ...});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.