If you want to run it on phantomjs (a headless browser) you can add this profile to your behat.yml and you need phantomjs >= 1.8.0
phantomjs:
extensions:
Behat\MinkExtension\Extension:
base_url: http://dev.local
goutte: ~
selenium2:
wd_host: "http://localhost:8643/wd/hub"
formatter:
name: pretty,html
parameters:
output_path: null,jm_behat_report.html
start up the phantomjs web driver using:
$ phantomjs --webdriver=8643
then run using:
$ ./bin/behat -p phantomjs
Note: You don't need to have selenium running as it communicates directly with the webdriver server that phantomjs/ghostdriver starts
Note2: apparently there is also a way to have it run by registering with a selenium hub and requesting the browserName 'phantomjs' but I couldn't get it to work, see https://github.com/detro/ghostdriver#register-ghostdriver-with-a-selenium-grid-hub or the copied instructions below
========== copied from ghostdriver ============
- Launch the grid server, which listens on 4444 by default:
java -jar /path/to/selenium-server-standalone-2.25.0.jar -role hub
- Register with the hub:
phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://127.0.0.1:4444
- Now you can use your normal webdriver client with
http://127.0.0.1:4444
and just requestbrowserName: phantomjs
========== copied from ghostdriver ============