Запуск google-chrome через Selenium в системе безголового Debian - PullRequest
3 голосов
/ 21 июня 2011

Я пытаюсь запустить браузер Google-Chrome в отключенном режиме веб-безопасности.Журнал селена говорит:

15:36:33.526 INFO - Command request: getNewBrowserSession[*googlechrome, <a href="http://www.myurl.de" rel="nofollow">http://www.myurl.de</a>, , 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)

Selenium запускается с помощью роботизированной фреймворка robotframework-maven-plugin.Также xvfb запускается сценарием сборки maven для имитации отображения.Но конфигурация запуска, похоже, не является проблемой.Все начинается нормально, просто браузер не встает.

Надеюсь, кто-нибудь может мне помочь.

1 Ответ

0 голосов
/ 22 ноября 2013

Убедитесь, что у учетной записи пользователя, которая запускает браузер, есть домашний каталог.В противном случае создание профиля браузера не удастся.

...