I have a set of automations that work fantastically in Firefox and Chrome, and I'd like to launch an instance of IEDriver as well.

I've set up IEDriver as per Selenium's Google Code wiki, with the correct path (if I change the path I get a different exception, so it's definitely correct). But for some reason it still can't launch, and just times out.

The code to launch it (the last line throws the exception):

        File ieDriver = new File("C:/Users/whatever/path/IEDriverServer.exe");
System.setProperty("webdriver.ie.driver", ieDriver.getAbsolutePath());
WebDriver ie = new InternetExplorerDriver(); And the exception is: Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time: '2013-05-22 12:00:17'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_21'
Driver info: driver.version: InternetExplorerDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:201)
at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:184)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:174)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:143)
at uk.co.know.kiteTest.WebDriverManager.<init>(WebDriverManager.java:52)
at uk.co.know.kiteTest.RunAutomations.main(RunAutomations.java:13)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time: '2013-05-22 12:00:17'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_21'
Driver info: driver.version: InternetExplorerDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:62)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
... 7 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:38622/status] to be available after 20014 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:163)
... 9 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:79)
... 10 more

org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser

出现这种异常的问题官方给了两种可能的原因:( 官方链接:http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/remote/UnreachableBrowserException.html)

Indicates there was a problem communicating with the browser being controlled or the Selenium server. The most common causes for this exception are:

    1.The provided server address to RemoteWebDriver is invalid, so the connection could not be established.
2.The browser has died mid-test.

第一种,是说远程ip可能有问题,所有连接不上,这个应该归为一大类,凡是连接其他PC都没有问题,唯独这台电脑有问题,那么毫无疑问,就是ip连接方面的问题。

第二种,浏览器的问题。

我的电脑是ping 都ping 不通,然后关闭掉远程连接的机器的防火墙,ping 的通之后,再连接一下就成功了。

当然也有可能是程序有问题,可参见http://www.cnblogs.com/amosli/p/3409024.html这篇文章。

[解决问题]selenium.remote.UnreachableBrowserException 异常分析并解决问题的更多相关文章

  1. org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or br

    WARN <init>, HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF R ...

  2. Canal 同步异常分析:Could not find first log file name in binary log index file

    文章首发于[博客园-陈树义],点击跳转到原文Canal同步异常分析:Could not find first log file name in binary log index file. 公司搜索相 ...

  3. maven webcollector java.lang.ClassNotFoundException: org.openqa.selenium.remote.SessionNotFoundException

    使用webcollector时出现了如下异常 分析是依赖的问题,不仅要添加selenium-java,还要添加htmlunit-driver的依赖,注意不要添加成selenium-htmlunit-d ...

  4. selenium Remote Server 实现原理

    selenium作为一个出色的web automation框架,被越来越多的企业采用究其原因,框架设计的比较remarkable, 作为一个开源的框架,能够开辟出一套协议,以至于针对app测试的app ...

  5. org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launch IE

    1.在启动ie浏览器前先加入属性设置一项: DesiredCapabilities ie = DesiredCapabilities.internetExplorer(); ie.setCapabil ...

  6. Linux Kernel Oops异常分析

    1.PowerPC小系统内核异常分析 1.1  异常打印 Unable to handle kernel paging request for data at address 0x36fef31eFa ...

  7. appium运行报错.<init>(Lorg/openqa/selenium/remote/ErrorCodes;Z)V

    最近这几天就在学习appium,搭建环境就耗费了很多时间,不得不承认自己够笨的了,然后我把环境搭建好,写完脚本的时候,就报这个错了,当时是从某个群里直接下载的demo,不得不吐槽说,够坑的,是能跑通, ...

  8. MySQL 外键异常分析

    外键约束异常现象 如下测例中,没有违反引用约束的插入失败. create database `a-b`; use `a-b`; SET FOREIGN_KEY_CHECKS=0; create tab ...

  9. java.net.SocketException:Software caused connection abort: recv failed 异常分析 +socket客户端&服务端代码

    java.net.SocketException:Software caused connection abort: recv failed 异常分析 分类: 很多的技术 2012-01-04 12: ...

随机推荐

  1. Anciroid的IPC机制-Binder原理

    Binder驱动的原理和实现 通过上一节的介绍,大家应该对Binder有了基本的认识了.任何上层应用程序接口和用户操作都需要底层硬件设备驱动的支持,并为其提供各种操作接口.本节首先从Binder的驱动 ...

  2. 【Scala】Scala-循环与遍历

    Scala-循环与遍历 scala for 1000_百度搜索 Scala 2.8的for表达式:性能与运行顺序的改进 - 51CTO.COM scala List集合的用法 - CSDN博客

  3. protobuf-c的学习总结

    1.前言 项目中用到protobuf-c进行数据序列化,好处在于后期程序扩展性非常好,只需要改动proto的定义就可以保持兼容,非常的灵活方便.关于protobuf-c的详细介绍可以参考google官 ...

  4. 使用Nexus管理maven仓库,setting文件理解

    来到新公司对很多陌生的技术一头雾水,以前在工作中没有真正使用过maven,于是强迫自己蛋定下来一个一个的突破,下面是我对maven的setting配置文件的理解,由于是现学的,难免可能会理解偏差,还请 ...

  5. maven 管理

    http://www.cnblogs.com/qq78292959/p/3711501.html

  6. java语言特性之一

    package java.util.Collections; public static int indexOfSubList(List<?> source, List<?> ...

  7. Java Web部署到tomcat后,使用动态编译无法找到相关类的解决方案

    一.问题 动态编译java文件时(这个java文件虽引用了第三方jar包),如果这个过程发生在java命令行程序中,则正常编译.如果发生在JavaWeb中,然后此Java部署到Tomcat之后,执行动 ...

  8. 【转】Window 通过cmd查看端口占用、相应进程、杀死进程等的命令

    转自:http://blog.csdn.net/jiangwei0910410003/article/details/18967441 一. 查看所有进程占用的端口  在开始-运行-cmd,输入:ne ...

  9. cocos2d-js 写日志log 查看日志log Android调试查看log

    1 输出日志的方式,当然是cc.log了 2 如何查看日志?        a)如果小程序可以先在浏览器上跑,例如用chrome,在控制台就可以看到输出的log:        b)如果在真机上调试, ...

  10. MySQL 加锁处理分析 ---非常牛逼

    http://hedengcheng.com/?p=771 mysql lock in share mode 和 select for update 2016年09月28日 10:23:32 阅读数: ...