selenium出现报错,请帮我解决下,谢谢
com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = https://i.doit.im/ Response_Code = -1 Error_Message = Request Errorat 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) 代码能否粘出来。
我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.
回复 2# 的帖子
我测的是https的,会不会是这个原因,如果知道,请教我一下。
页:
[1]