我有两个程序有和没有maven。没有maven代码就能启动firefox。但是maven无法启动firefox。我已经设置了环境变量。我正在使用eclipse IDE,当我尝试运行JUnit测试时,firefox无法启动。 Firefox版本11.0。我正在使用硒RC。 包括日志:
[Apr 03 12:48:45] DEBUG (HttpServer.java:893) - Contexts at /selenium-server/driver/: [/selenium-server/driver/*=[HttpContext[/selenium-server/driver,/selenium-server /driver]], /selenium-server/*=[HttpContext[/selenium-server,/selenium-server]], /=[HttpContext[/,/]]]
[Apr 03 12:48:45] DEBUG (HttpServer.java:907) - Try HttpContext[/selenium-server/driver,/selenium-server/driver],0
[Apr 03 12:48:45] DEBUG (HttpServer.java:907) - Try HttpContext[/selenium-server,/selenium-server],0
[Apr 03 12:48:45] DEBUG (HttpContext.java:1529) - Handler org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-server,/selenium-server]
[Apr 03 12:48:45] DEBUG (HttpContext.java:1529) - Handler org.openqa.selenium.server.StaticContentHandler in HttpContext[/selenium-server,/selenium-server]
[Apr 03 12:48:45] DEBUG (ResourceHandler.java:239) - PATH=/driver/ RESOURCE=file:/E:/Automation/Selenium/Eclipse_Workspace/AutomationBuildTest9WithMaven/MISSING%20RESOURCE
[Apr 03 12:48:45] DEBUG (ResourceHandler.java:287) - Looking for file:/E:/Automation/Selenium/Eclipse_Workspace/AutomationBuildTest9WithMaven/MISSING%20RESOURCE
[Apr 03 12:48:45] DEBUG (HttpContext.java:1529) - Handler org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/selenium-server,/selenium-server]
[Apr 03 12:48:45] DEBUG (HttpContext.java:1529) - Handler org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler in HttpContext[/selenium-server,/selenium-server]
[Apr 03 12:48:45] DEBUG (HttpContext.java:1529) - Handler org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler@19efb05
[Apr 03 12:48:45] DEBUG (HttpContext.java:1529) - Handler org.openqa.selenium.server.CachedContentTestHandler@22c95b
[Apr 03 12:48:45] DEBUG (HttpContext.java:1529) - Handler org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server]
[Apr 03 12:49:45] DEBUG (LogSupport.java:36) - IGNORED
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:450)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.openqa.jetty.util.ThreadedServer.acceptSocket(ThreadedServer.java:432)
at org.openqa.jetty.util.ThreadedServer$Acceptor.run(ThreadedServer.java:634)
它陷入了...... 启动Firefox
答案 0 :(得分:0)
Selenium还不支持Firefox 11.应该会发布2.21版本,但它还没有(完全)准备就绪。如果您现在需要,请返回Firefox 10.
答案 1 :(得分:0)
您是否更新了pom.xml中的selenium版本。如果没有更新,请更新到selnium服务器版本2.21并尝试