Я использую Selenium docker-compose со спецификациями:
ubuntu instance: 16.04
firefox browser version is 61.0
selenium version is 3.13.0
geckodriver version is 0.21.0.
Мой файл docker-compose.yml выглядит следующим образом:
version: "3"
services:
selenium-hub:
image: selenium/hub
container_name: selenium-hub
ports:
- "4444:4444"
chrome:
image: selenium/node-chrome
depends_on:
- selenium-hub
environment:
- HUB_PORT_4444_TCP_ADDR=selenium-hub
- HUB_PORT_4444_TCP_PORT=4444
firefox:
image: selenium/node-firefox
depends_on:
- selenium-hub
environment:
- HUB_PORT_4444_TCP_ADDR=selenium-hub
- HUB_PORT_4444_TCP_PORT=4444
Я запускаю тест с кнопкой, которая при нажатии открывает всплывающее окно. Это не предупреждение или другое окно. Дело в том, что когда я пытаюсь нажать на эту кнопку, браузер вылетает. со следующими исключениями:
(/opt/firefox-latest/firefox:142): dconf-CRITICAL **: unable to create directory '/home/seluser/.cache/dconf': Permission denied. dconf will not work properly.
[Parent 72, Gecko_IOThread] WARNING: pipe error (52): Connection reset by peer: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 353
###!!! [Parent][MessageChannel] Error: (msgtype=0x16007F,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down
*** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping
Дополнительная информация:
Структура HTML приложения, к которому я пытаюсь получить доступ через selenium-docker:
<a id=some_id href="javascript:void(0);" onclick="openPopup(true)" class="fancybox">
<img src=some_src.svg class=some_class title>
</a>
Я получил доступ к элементу, используя селектор xpath, class, css. Я не могу точно определить основную причину проблемы. Связан ли этот браузер или этот докер или драйвер?
ОБНОВЛЕНИЕ: трассировка стека в моей среде IDE:
org.openqa.selenium.SessionNotCreatedException: Tried to run command without establishing a connection
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
System info: host: 'SOME_HOST', ip: 'SOME_IP', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 61.0.1, javascriptEnabled: true, moz:accessibilityChecks: false, moz:headless: false, moz:processID: 255, moz:profile: /tmp/rust_mozprofile.IYBVxi..., moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 4.4.0-1061-aws, rotatable: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, webdriver.remote.sessionid: 51c21208-100f-4a04-947c-3f9...}
Session ID: 51c21208-100f-4a04-947c-3f99316b75e7
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:448)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)