I work on a project were behat tests used to run on a local selenium-standalone-server (3.141.59). This tests work fine (Chrome 121.0):
java -Dwebdriver.chromedriver=chrommedriver -jar selenium-server-standalone-3.141.59.jar
APP_ENV=dev vendor/bin/behat -f progress -o std --strict --tags @mep
I'd like to use the selenium docker image, so I run this :
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:latest
But it seems like behat can't get any response from the container. The logs don't say a lot :
14:17:11.035 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "af7e82019c29c4f4fd4970eedf09d55c","eventTime": 1707229031033518825,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue","http.host": "localhost:4444","http.method": "POST","http.request_content_length": "351","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession"}}
Here is my behat config :
extensions:
Behat\Symfony2Extension:
kernel: ~
Behat\MinkExtension:
base_url: https://recette.sider.biz
browser_name: 'chrome'
sessions:
default:
selenium2:
capabilities:
browser: "chrome"
version: "*"
chrome:
switches:
- "--headless"
# - "--window-size=1920,1080"
extra_capabilities:
acceptInsecureCerts: true
chromeOptions:
w3c: false
I tried to downgrade the selenium image, but I need to keep a recent version of chrome.