Behat/Mink with Selenium 2 throws "Could not open connection" Behat/Mink with Selenium 2 throws "Could not open connection" symfony symfony

Behat/Mink with Selenium 2 throws "Could not open connection"


I recently fought the same issue and managed to get it working with selenium grid.

The issue in my case was related to default capabilities Mink sends. The hub tries to find a proper node to run, which would accept requested capabilities. In my case issue was a browser version. It finally worked when I set it to an empty string:

# behat.ymldefault:  extensions:    Behat\MinkExtension\Extension:      base_url: 'http://localhost/'      browser_name: phantomjs      selenium2:        wd_host: http://127.0.0.1:4444/wd/hub        capabilities:          version: ''

Solution originally posted on: Running Behat in parallel with Selenium grid