对于Java,Internet Explorer不是从selenium 2.48开放的

时间:2018-01-05 07:07:27

标签: java selenium

我使用的是selenium 2.48,windows 8.1,64(Bit)。 IEDriverServer.exe 2.48,JDK 1.7。连接很好。但我无法从selenium代码打开Internet Explorer 11。

它抛出以下错误:

  

启动InternetExplorerDriver服务器(64位)   2.48.0.0   听港口   org.openqa.selenium.remote.UnreachableBrowserException:无法启动新会话。可能的原因是远程服务器的无效地址或浏览器启动失败。

     

引起:org.apache.http.conn.HttpHostConnectException:连接到localhost:47177 [localhost / 127.0.0.1,localhost / 0:0:0:0:0:0:0:1]失败:连接定时出:连接       at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)       at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)       at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)       在org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)       在org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)       在org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)       在org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)       在org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)       在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)       在org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)       在org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:143)       在org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:89)       在org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)       在org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)       ... 9更多

有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

我刚刚切换到selenium 2.53.1和IEDriverServer 2.53.1.0。它奏效了。