WebDriver InternetExplorerDriver: Software caused connection interruption: recv failed?

I am using Selenium 2.20. Why is WebDriver InternetExplorerDriver throwing this warning when starting the browser? This happens during a parameterized JUnit test. The warning is thrown every time I call "new InternetExplorerDriver ()". After he tries again, he succeeds in a second attempt at what he does. In other words, the tryExecute call must be made twice before my IE instance can run in the WebDriver.

org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: 
        Software caused connection abort: recv failed
org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request

      

+3


source to share


2 answers


This is a warning message. The native code (C ++) component of the IE driver contains an HTTP server because the driver uses the JSON Wire protocol for its messages. This HTTP server takes a little time to get started and be ready to send HTTP requests. However, the RemoteWebDriver

HTTP client (remember that it InternetExplorerDriver

is a subclass RemoteWebDriver

) cannot know exactly when that server is available, so this causes a race condition. The HTTP client must poll the server until it receives a valid response. When you see this warning, it only tells you that the internal HTTP server has not completed its initialization and the HTTP client has lost the race. It should be harmless and you should be able to safely ignore it.



+5


source


Since this message will not be important in most cases, as it is a known race condition, you can configure java.util.logging to ignore it by passing in the custom log configuration using this Java code:

LogManager.getLogManager().readConfiguration(
  getClass().getResourceAsStream(
    "/META-INF/logger.properties"));

      



And the file META-INF/logger.properties

handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
org.apache.http.impl.client.DefaultHttpClient.level=WARNING

      

0


source







All Articles