Ошибка при использовании селена над Xvfb (без головы) - PullRequest
0 голосов
/ 21 марта 2012

У меня есть машина с Ubuntu под управлением Xvfb и автономного сервера Selenium (v2.20.0). Я пытаюсь запустить свой тест phpunit с селеном. Я вижу по журналу его стартовую сессию и пытаюсь открыть Google Chrome, но браузер не открывается и застрял в этом режиме

Mar 21, 2012 9:27:37 AM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
0 [main] INFO org.openqa.selenium.server.SeleniumServer - Java: Sun Microsystems Inc. 20.0-b12
0 [main] INFO org.openqa.selenium.server.SeleniumServer - OS: Linux 3.2.0-8-generic-pae i386
7 [main] INFO org.openqa.selenium.server.SeleniumServer - v2.20.0, with Core v2.20.0. Built from revision 16008
178 [main] INFO org.openqa.selenium.server.SeleniumServer - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
179 [main] INFO org.openqa.jetty.http.HttpServer - Version Jetty/5.1.x
180 [main] INFO org.openqa.jetty.util.Container - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
180 [main] INFO org.openqa.jetty.util.Container - Started HttpContext[/selenium-server,/selenium-server]
181 [main] INFO org.openqa.jetty.util.Container - Started HttpContext[/,/]
43119 [main] INFO org.openqa.jetty.util.Container - Started org.openqa.jetty.jetty.servlet.ServletHandler@1b3f8f6
43120 [main] INFO org.openqa.jetty.util.Container - Started HttpContext[/wd,/wd]
43127 [main] INFO org.openqa.jetty.http.SocketListener - Started SocketListener on 0.0.0.0:4444
43127 [main] INFO org.openqa.jetty.util.Container - Started org.openqa.jetty.jetty.Server@1006d75
108588 [SocketListener0-0] INFO org.openqa.jetty.util.Credential - Checking Resource aliases
09:29:26.205 INFO - Command request: getNewBrowserSession[googlechrome, http://localhost:8080/] on session null
09:29:26.208 INFO - creating new remote session
09:29:26.227 WARN - Caution: '/usr/bin/google-chrome': file is a script file, not a real executable.  The browser environment is no longer fully under RC control
09:29:26.230 INFO - Allocated session 20de5dfc1d1c492cba1e1cd26234cb14 for http://localhost:8080/, launching...
09:29:26.231 INFO - Launching Google Chrome...

То же самое происходит с Firefox.

А если я попытаюсь запустить firefox / chrome по команде Его работа. Почему я не могу запустить браузеры из Selenium?

1 Ответ

1 голос
/ 26 марта 2012

Посмотрите на исправление Ubuntu здесь:

https://github.com/cucumber/cucumber/wiki/Setting-up-Selenium/612fae3f39528be39594d145ec12a4747855e030

...