Impossible de lancer Selenium IE Driver après la mise à niveau vers la version 3.9

Après la mise à jour vers IEDriverServer 3.9 pour 64 bits à partir de maintenant, je reçois l’exception suivante lorsque je tente d’exécuter des tests avec IE (version: 11.0.9600.17842, Win8.1). Est-ce que quelqu’un sait comment résoudre ce problème ou devrais-je simplement revenir à la version 3.8?

OpenQA.Selenium.WebDriverException: une exception avec une réponse null a été émise en envoyant une requête HTTP au serveur WebDriver distant pour l’URL http: // localhost: 53379 / session .

Le statut de l’exception était ReceiveFailure et le message était le suivant: La connexion sous-jacente était fermée: une erreur inattendue s’est produite lors d’une réception. —->

System.Net.WebException: La connexion sous-jacente a été fermée: une erreur inattendue s’est produite lors d’une réception. —-> System.IO.IOException: Impossible de lire les données de la connexion de transport: une connexion existante a été fermée de force par l’hôte distant. —-> System.Net.Sockets.SocketException: une connexion existante a été fermée de force par l’hôte distant TearDown: System.NullReferenceException: la référence d’object n’est pas définie sur une instance d’object.

La trace de la stack est la suivante:

Résultat StackTrace: à OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttp (Requête de Requête (HttpRequest Info) à la classe de Remote.RemoteWebDriver.Execute (Ssortingng driverCommandToExecute, Dictionary`2 parameters) à OpenQA.Selenium.RemoteWebDriver.StartSession (ICapabilities souhaités) à OpenQA.Selenium.Remote.RemoteWebDriver..cteur (ICommandExecutor) .IE.InternetExplorerDriver..ctor (InternetExplorerDriverService service, options InternetExplorerOptions) à l’adresse OpenQA.Selenium.IE.InternetExplorerDriver..ctor () –WebException à System.Net.HttpWebRequest.GetResponse () à OpenQA.Selenium.R (HttpRequestInfo requestInfo) –IOException à System.Net.Sockets.NetworkStream.Read (tampon Byte [], décalage Int32, Taille Int32) à System.Net.PooledStream.Read (tampon Byte [], décalage Int32, taille Int32) à System.Net.Connection.SyncRead (demande HttpWebRequest, utilisateur booléenResortingevedStream, Boolean probeRead) –SocketException à System.Net.Sockets .Socket.Receive (tampon Byte [], offset Int32, taille Int32, socketFlags socketFlags) sur System.Net.Sockets.NetworkStream.Read (tampon Byte [], offset Int32, taille Int32)

Utilisation de IEDriverServer 3.9.0.0 pour Windows 64 bits à partir de http://selenium-release.storage.googleapis.com Je suis en mesure de reproduire le problème avec IEDriverServer_x64_3.9.0 .

Trace d’erreur de stack:

 Started InternetExplorerDriver server (64-bit) 3.9.0.0 Listening on port 28286 Only local connections are allowed Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:28286 Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:28.403Z' System info: host: 'ATECHM-03', ip: '192.168.1.35', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.8.0_144' Driver info: driver.version: InternetExplorerDriver at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219) at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:223) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:215) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:152) at demo.A_IE_simple.main(A_IE_simple.java:13) Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:28286 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) at okhttp3.RealCall.execute(RealCall.java:77) at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:104) at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:54) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) ... 6 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at okhttp3.internal.platform.Platform.connectSocket(Platform.java:125) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238) ... 29 more 

Bien qu’un test rapide avec IEDriverServer_Win32_3.9.0 ne montre aucune erreur. Bien que IEDriverServer_Win32_3.9.0 et IEDriverServer_x64_3.9.0 soient mis en place, ils n’ont jamais été explicitement mis à la disposition / publiés pour être disponibles sur l’onglet Télécharger de la page seleniumhq.org .

Le CHANGELOG de IEDriverServer.exe mentionne clairement l’avertissement suivant:

 The "major" and "minor" fields are synchronized to releases of the Selenium project. Changes in the "build" field indicate interim releases made publicly available via the project downloads page. Changes in "revision" field indicate private releases checked into the prebuilts directory of the source tree, but not made generally available on the downloads page. 

De plus, le CHANGELOG de IEDriverServer.exe v3.9.0.1 mentionne l’avertissement suivant:

 Finally, there is every chance that, despite all efforts to the contrary, it's possible that there are new regressions introduced by this change. Multiple test suites have been run using this change, and none have failed thus far due to the changes herein. Claims that this change is causing a specific failure should be accompanied by a full test case, or issues reported against this change will be summarily closed. 

Solution

La solution simple serait soit de:

  • Utilisez IEDriverServer_Win32_3.9.0 sur les plates-formes 32 bits et 64 bits.
  • Revenez à IEDriverServer_x64_3.8.0