Linux, Behat and installing ChromeDriver

Posted: 2015-01-19 00:09:19

Setting up Chrome driver with Behat and Selenium2

Side note for Mac

brew install chromedriver

ChromeDriver

Once you find the path Chrome was installed you place the driver in there. For Ubuntu 14.04 it was

/opt/google/chrome/chromedriver

I got the driver from https://code.google.com/p/selenium/wiki/ChromeDriver#Overriding_the_Chrome_binary_location

Starting Selenium

I still need to look up and try setting this in the behat.yml for now I just ran it this way

java -jar selenium-server-standalone-2.0rc2.jar -Dwebdriver.chrome.driver=/opt/google/chrome/chromedriver

That is it. Now it should work with Chrome when you behat.yml is set like this

default:
    formatter:
            name:                       pretty
            parameters:
                decorated:              true
                verbose:                false
                time:                   true
                language:               en
                output_path:            null
                multiline_arguments:    true
    paths:
        features: app/tests/acceptance/features
        bootstrap: app/tests/acceptance/contexts
    context:
      parameters:
        base_url: http://thehub.dev
    extensions:
      Behat\MinkExtension\Extension:
        goutte: null
        selenium2:
          wd_host: "http://192.168.10.1:4444/wd/hub"
        base_url: 'http://thehub.dev:8000/'
        browser_name: chrome

Tags:

note2self