I seem to have an issue with one of my sets of tests ONLY when running remotely and ONLY when trying to interact with a particular element. I am building and running this through VSTS.
The error:
OpenQA.Selenium.WebDriverException: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL (URL redacted, is a localhost URL). The status of the exception was ReceiveFailure, and the message was: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
The HTML for the element I'm trying to enter a number into (we are using knockout):
<input type="number" min="0" max="999" data-bind="value: redacted).extend({ min: 0, required: { message: 'redacted' } }), disable: redacted" name="redacted" id="redacted" title="redacted" required="required" class="">
Don't mind the redacted
. I wanted to leave all the properties there to show what properties are set for the element but the actual values are redacted.
This is the code I'm using to enter a value into the element:
IWebElement element = driver.FindElement(By.Id(elementID));
element.Clear();
element.SendKeys(value);
This is running with ChromeDriver. There are several other number fields that I'm successfully able to populate data into without issue.
Any ideas what could be going wrong here and how to fix it?
That looks some sort of SSL or internal network issue on VSTS build server, which is probably tricky to get more info on, because you shouldn't have full access to that machine.
We also have Selenium tests on our Continuous Integration, but we use a local build server bound to VSTS, much more control over builds and processes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With