Пытаюсь запустить сессию selenium, но он открывает firefox и все. Подозреваю что он не может его перехватить или что-то в этом духе
В логах пишет - Exception: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Что странно, так как сервер selenium работает в порту 4444.
Вот вырезка лога с одного запуска через codeception
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
System info: host: 'machine', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-4-amd64', java.version: '1.7.0_91'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:130)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:197)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
... 13 more
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
9808301517 addons.xpi INFO Mapping langpack-ru@iceweasel.mozilla.org to /usr/lib/iceweasel/browser/extensions/langpack-ru@iceweasel.mozilla.org.xpi
1449808301517 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /usr/lib/iceweasel/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
1449808301521 addons.xpi DEBUG checkForChanges
1449808301523 addons.xpi DEBUG Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"/tmp/anonymous7508543852262525645webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.39.0","st":1449808298000,"mt":1449808298000}},"app-global":{"langpack-ru@iceweasel.mozilla.org":{"d":"/usr/lib/iceweasel/browser/extensions/langpack-ru@iceweasel.mozilla.org.xpi","e":true,"v":"38.4.0","st":1446597221000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/iceweasel/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"38.4.0","st":1449416308000,"mt":1446596930000}}}
1449808301526 addons.xpi DEBUG getModTime: Recursive scan of langpack-ru@iceweasel.mozilla.org
1449808301528 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1449808301529 addons.xpi DEBUG getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"/tmp/anonymous7508543852262525645webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.39.0","st":1449808298000,"mt":1449808298000}},"app-global":{"langpack-ru@iceweasel.mozilla.org":{"d":"/usr/lib/iceweasel/browser/extensions/langpack-ru@iceweasel.mozilla.org.xpi","e":true,"v":"38.4.0","st":1446597221000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/iceweasel/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"38.4.0","st":1449416308000,"mt":1446596930000}}}
1449808301534 addons.xpi DEBUG No changes found
1449808301535 addons.xpi DEBUG Registering manifest for /usr/lib/iceweasel/browser/extensions/langpack-ru@iceweasel.mozilla.org.xpi
1449808301538 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1449808301539 addons.manager DEBUG Provider finished startup: XPIProvider
1449808301540 addons.manager DEBUG Starting provider: LightweightThemeManager
1449808301540 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1449808301542 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1449808301542 addons.manager DEBUG Starting provider: GMPProvider
1449808301550 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1449808301551 addons.manager DEBUG Provider finished startup: GMPProvider
1449808301551 addons.manager DEBUG Starting provider: PluginProvider
1449808301551 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1449808301553 addons.manager DEBUG Provider finished startup: PluginProvider
1449808301553 addons.manager DEBUG Completed startup sequence
(firefox:6063): Gtk-WARNING **: Theme file for DMZ-Black has no directories
console.error:
[CustomizableUI]
Custom widget with id loop-button does not return a valid node
console.error:
[CustomizableUI]
Custom widget with id loop-button does not return a valid node
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
1449808303385 addons.manager DEBUG Starting provider: <unnamed-provider>
1449808303385 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1449808303387 addons.manager DEBUG Provider finished startup: <unnamed-provider>
1449808320027 addons.manager DEBUG shutdown
1449808320028 addons.manager DEBUG Calling shutdown blocker for XPIProvider
1449808320028 addons.xpi DEBUG shutdown
1449808320028 addons.xpi DEBUG Notifying XPI shutdown observers
1449808320029 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager
1449808320029 addons.manager DEBUG Calling shutdown blocker for GMPProvider
1449808320031 addons.manager DEBUG Calling shutdown blocker for PluginProvider
1449808320031 addons.manager DEBUG Calling shutdown blocker for <unnamed-provider>
1449808320036 addons.manager DEBUG Async provider shutdown done
Как видно - не может открыть адресс, а позже запускается пустым. С firefox я обманул и сделал ссылку на iceweasel. С фаером так же не рабоатет, пробовал несколько версий.
Код - acceptance.suit
class_name: WebGuy
modules:
enabled:
- WebDriver
- \Helper\Acceptance
config:
WebDriver:
browser: firefox
url: 'https://github.com'
И тест
<?php
$I = new WebGuy($scenario);
$I->wantTo('see GitHub word in title ');
$I->amOnPage('/');
$I->seeInTitle('YouTube');
?>
Тащемта, я все брал с офф. гайдов CodeCeption.
up:
Запуск selenium-server:
java -jar selenium-server-standalone-2.39.0.jar -Dwebdriver.firefox.bin=/usr/local/bin/firefox -Dwebdriver.firefox.port=7055 >> logs/selenium.log 2>&1 &
И ответ при смене порта codeception даёт вырезку из того же лога
[Facebook\WebDriver\Exception\UnknownServerException]
Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: