Could not contact Selenium Server; have you started it on 'localhost:4444'
今天学习selenium RC例子的时候遇到一个问题:
java.lang.RuntimeException: Could not contact Selenium Server; have you started it on 'localhost:4444' ?
Connection refused: connect
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:86)
at com.src.tests.BookFlight.setUp(BookFlight.java:13)
at junit.framework.TestCase.runBare(TestCase.java:132)
at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:212)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
原因:selenium server未启动
解决方案:启动selenium server:java -jar selenium-server-standalone-2.24.1.jar
Could not contact Selenium Server; have you started it on 'localhost:4444'的更多相关文章
- GConf error:Failed to contact configuration server
Linux系统运行一直正常,但是图形界面使用root账号登录时遇到下面错误,第一次遇到这么怪异的状况 具体错误信息如下所示: GConf error:Failed to contact configu ...
- 利用selenium Server实现IE firefox 和 chrome兼容性测试
本文的主题是基于Selenium Server,使用 Java 语言编写网页交互流程, 实现多浏览器(IE Firefox Chrome)兼容性测试,为使用纪要. Selenium Selenium是 ...
- 【Selenium】【BugList11】启动selenium server报错:Unsupported major.minor version 52.0
[环境信息] python:3.6.5 平台:win7 selenium:3.11.0 selenium server:selenium-server-standalone-3.11.0.jar jd ...
- ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
[root@ldaptest openldap]# ldapadd -x -D "cn=admin,dc=ultrapower,dc=com" -W -f /tmp/base.ld ...
- Selenium 2.0 以后不在必须Selenium server了
does not require the Selenium Server to automate the browser.这个句话,解决了我很的疑惑,新版Selenium 可以直接操作浏览器了,还可以 ...
- selenium server在页面加载超时浏览器与driver通信失败时的妙用
事实上,WebDriver有两种方式“驱动”浏览器的方式.1. Selenium Server:和Selenium RC一样的,通过指定远端服务器IP地址和端口号,由这个远端服务器来驱动浏览器.2. ...
- Selenium私房菜系列7 -- 玩转Selenium Server
本篇主要是想更进一步介绍Selenium Server的工作原理,这次我们从Selenium Server的交互模式开始. 在<第一个Selenium RC测试案例>中,我们以命令“jav ...
- 重装系统后,重新搭建Selenium Server+Firefox环境
摘要:搭建Selenium自动化测试环境其实是非常简单的事情,在态度上我们不要把它当成难事:折腾起来是很愉快的,自然就成功了. 下面把这次安装的过程记录下来,一来是加深印象,二来可以给大家提供参考. ...
- web端自动化——Selenium Server环境配置
Selenium Server环境配置 下面下载.配置并运行Selenium Server. ① 下载 Selenium Server. 下载地址为:https://pypi.python.or ...
随机推荐
- 第十六周oj刷题——Problem I: 改错题:类中私有成员的訪问
Description 改错题: 设计一个日期类和时间类,并编写全局函数display用于显示日期和时间. 要求:display函数作为类外的普通函数,而不是成员函数 在主函数中调用display函数 ...
- QtGui.QProgressBar
A progress bar is a widget that is used when we process lengthy tasks. It is animated so that the us ...
- 30、Arrays工具类
1.查询元素 int binarySearch(type[] a,type key):使用二分法查询key元素值在a数组中出现的索引:如果a数组不包含key元素,则返回负数.调用该方法时要求数组中元素 ...
- Appium完整安装教程
Appium安装教程 发布时间: 2014-12-11 10:34 作者: 柒月 来源: 51Testing软件测试网采编 字体: 小 中 大 | 上一篇 下一篇 | 打印 | ...
- 【转帖】如何利用Spring Cloud构建起自我修复型分布式系统
http://zhidao.baidu.com/link?url=tSKwdn3wr8KUxWMteHmneFtY0KoNZBMK9Xy-RimsdISA4h2neAecgHqggBipz2w6nXr ...
- JS中的转义字符
http://www.cnblogs.com/wangpei/archive/2009/05/09/1453260.html \b 退格 \t TAB,水平 \v ...
- Dapper 中使用sql in 关键字查询
传统 sql in 写法是 SELECT * FROM dbo.Users s WHERE s.id IN (1,2,3) 在dapper因为安全性,不能直接用sql接接 要采用参数化, 开始我 ...
- tp配置+路由+基本操作
一.打开apache 的配置文件httpd_conf添加以下代码 <VirtualHost *:80>DocumentRoot "D:\wwwroot\thinkphp\publ ...
- android:scaleType="matrix"布局文件载入图片时候的显示方式
android:scaleType="center" 以原图的几何中心点和ImagView的几何中心点为基准,按图片的原来size居中显示,不缩放,当图片长/宽超过View的长/宽 ...
- 宏里面的(void)0
在<c标准库>实现assert.h中有一个语句: #define assert(test) ((test)?(void)0 : _Assert(__FILE__":"_ ...