2011-06-21 34 views
3

我試圖在禁用的Web安全模式下啓動google-chrome瀏覽器。硒日誌說:通過Selenium在無頭debian系統上啓動google-chrome

15:36:33.526 INFO - Command request: getNewBrowserSession[*googlechrome, http://www.myurl.de , , commandLineFlags=--disable-web-security] on session null

不管怎麼說,它只是掛起後

15:36:33.600 INFO - Launching Google Chrome...

這裏的堆棧跟蹤:

16:36:44.605 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:564) at org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:521) at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:374) at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:125) at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:87) at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:785) at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:422) at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:393) at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:146) 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:243) at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357) at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

硒被robotframework開始由robotframework - Maven的插件。此外,xvfb由maven構建腳本啓動以模擬顯示。但啓動配置似乎不成問題。一切都開始好,只是瀏覽器不會起來。

我希望任何人都可以幫助我。

+0

您正在運行哪個版本的RF SeleniumLibrary和google-chrome? – janne

+0

是否設置了DISPLAY環境變量? – Appleman1234

回答

0

確保啓動瀏覽器的用戶帳戶具有主目錄。否則,瀏覽器配置文件創建將失敗。

相關問題