51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2782|回复: 2
打印 上一主题 下一主题

selenium出现报错,请帮我解决下,谢谢

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-8-9 16:41:53 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = https://i.doit.im/ Response_Code = -1 Error_Message = Request Error
        at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
        at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
        at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:335)
        at a.testUntitled(a.java:10)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:212)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2010-8-11 17:10:06 | 只看该作者

回复 2# 的帖子

我测的是https的,会不会是这个原因,如果知道,请教我一下。
回复 支持 反对

使用道具 举报

该用户从未签到

2#
发表于 2010-8-10 16:18:08 | 只看该作者
代码能否粘出来。
我google下。看下到有以下几种可能的原因!
1.try encoding the html, all those special characters could be limiting
what's actually getting passed to selenium - so & = & for example.
2.I have worked-around the problem by stopping all HEAD requests in
Apache:
http://techblog.zabuchy.net/2010/how-to-block-http-requests-for-speci...

3.You can try and check this out:

Unable to Load the Browser¶


Ok, not a friendly error message, sorry, but if the Selenium Server
cannot load the browser you will likley see this error.


(500) Internal Server Error


This could be caused by


    * Firefox (prior to Selenium 1.0) cannot start because the browser
is already open and you did not specify a separate profile. See the
section on Firefox profiles under Server Options.
    * The run mode you’re using doesn’t match any browser on your
machine. Check the parameters you passed to Selenium when you program
opens the browser.
    * You specified the path to the browser explicitly (using
“*custom”–see above) but the path is incorrect. Check to be sure the
path is correct. Also check the user group to be sure there are no
known issues with your browser and the “*custom” parameters.
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-28 09:06 , Processed in 0.084991 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表