Getting Going Quickly Windows, Behat and Selenium

Posted: 2016-05-03 17:21:11

Quick Install Steps

Vagrant and Homestead

This was easy I just followed these steps here and I was done. For me I used Vmware but Virtualbox is fine.

Windows in Selenium

Two easy steps

Step 1 Install Node.js SUPER EASY

https://nodejs.org/en/download/

Install the .exe, restart your console and you have node!

Step 2 Install Selenium

Just go here and you are done! https://www.npmjs.com/package/selenium-standalone

After those steps I run it in a powershell and the server is running and I am set to use it.

Final Touches

In my VM I "sudo vim /etc/hosts" and point it to my selenium on windows using the domain "selenium.dev"

192.168.7.57    selenium.dev

Then my behat.yml looks like this

So when I run this inside the VM it knows to talk to the exteral version of Selenium

default:
    suites:
        home_ui:
            paths: [ %paths.base%/features/home]
            contexts: [ HomePageUiContext ]
    extensions:
        Laracasts\Behat:
            env_path: .env.behat
        Behat\MinkExtension:
            default_session: laravel
            base_url: https://recipes.dev
            laravel: ~
            selenium2:
              wd_host: "http://selenium.dev:4444/wd/hub"
            browser_name: chrome

You can see more of it here


Tags:

bdd behat windows