Selenium Rc - Firefox无法启动

时间:2010-08-11 14:05:15

标签: selenium-rc

我正在使用Selenium-Rc 1.0.3和Firefox 3.6.8。在为它创建不同的Firefox配置文件后,我使用-firefoxProfileTemplate选项启动了Selenium-Rc。每次我开始测试并检查服务器端日志时,都会收到此错误;

14:53:49.881 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - got condition? : false
14:53:49.881 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - waiting for window 'null' local frame 'null' for 810 more secs


15:07:20.273 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - got condition? : false
15:07:20.273 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - waiting for window 'null' local frame 'null' for 0 more secs
15:07:20.274 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - waiting for condition for 1000 more ms
15:07:21.274 ERROR - Failed to start new browser session, shutdown browser and clear all session data
org.openqa.selenium.server.RemoteCommandException: timed out waiting for window 'null' to appear
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:569)
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:526)
    at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:373)
    at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:124)
    at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:86)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:733)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:399)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:370)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:129)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:245)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
15:07:21.275 INFO - Killing Firefox...
15:07:21.285 INFO - Got result: Failed to start new browser session: Error while launching browser on session null
15:07:21.274 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - got condition? : false
15:07:21.274 ERROR [12] org.openqa.selenium.server.BrowserSessionFactory - Failed to start new browser session, shutdown browser and clear all session data
org.openqa.selenium.server.RemoteCommandException: timed out waiting for window 'null' to appear
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:569)
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:526)
    at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:373)
    at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:124)
    at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:86)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:733)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:399)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:370)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:129)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:245)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
15:07:21.275 INFO [12] org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher - Killing Firefox...
15:07:21.283 DEBUG [12] org.openqa.selenium.server.FrameGroupCommandQueueSet - clearing queue set
15:07:21.285 INFO [12] org.openqa.selenium.server.SeleniumDriverResourceHandler - Got result: Failed to start new browser session: Error while launching browser on session null
15:07:21.286 DEBUG [12] org.openqa.jetty.http.HttpContext - Handled by org.openqa.selenium.server.SeleniumDriverResourceHandler in HttpContext[/selenium-server,/selenium-server]
15:07:21.286 DEBUG [12] org.openqa.jetty.http.HttpConnection - RESPONSE:

请问,如何解决这个问题?我将非常感谢每一个有用的建议。

此致

Manjide

2 个答案:

答案 0 :(得分:2)

以交互模式运行selenium服务器。所以只需运行此命令 java -jar selenium-server-jar -interactive -singleWindow

答案 1 :(得分:0)

我在Ubuntu中也遇到过这个问题。暂时以root身份启动selenium服务器对我来说很有用:

sudo java -jar selenium-server.jar