3

I'm using Selenium 2.20 . Why does WebDriver InternetExplorerDriver throw this warning when launching browser? This is happening to me during a parameterized JUnit test. The warning is thrown each time I am invoking "new InternetExplorerDriver()" . After it retries, it succeeds on the second attempt of whatever it is doing. So, in other words, the tryExecute call has to run twice before my IE instance works in 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
djangofan
  • 28,471
  • 61
  • 196
  • 289

2 Answers2

5

This is a warning message. The native code (C++) component of the IE driver includes an HTTP server, since the driver uses the JSON Wire Protocol for its communications. That HTTP server takes a small amount of time to start and be ready to receive HTTP requests. However, the RemoteWebDriver's HTTP client (remember that InternetExplorerDriver is a subclass of 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're seeing this warning, it's only telling you that the internal HTTP server hasn't completed its initialization, and the HTTP client has lost the race. It should be harmless, and you should be able to safely ignore it.

JimEvans
  • 27,201
  • 7
  • 83
  • 108
  • Thank you. I suspected that but didn't know all of the details you provided. Thanks very much. – djangofan Apr 04 '12 at 02:27
  • [i'm getting this error only when i try to launch a nested `webdriver` instance, any idea???](https://stackoverflow.com/questions/51562067/nested-webdriver-causing-connection-to-abort-error-10053-an-established-connec) – oldboy Jul 27 '18 at 17:24
0

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

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

And a 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
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265