Skip to content

an example on setting up selenium on a windows vm using vagrant

Notifications You must be signed in to change notification settings

AbimbolaE/Vagrant-selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant-Selenium

Last edited on 3rd, July 2015 by Abimbola Esuruoso

This is a project for attaching selenium nodes from a guest OS (which is managed by Vagrant) to a selenium hub on a host machine.

Follow the tutorial below to create and install a windows base box on your system. It is important to note that steps 1-3 are only necessary because the modern ie base boxes at present do not have Windows Remote Management service (winrm) enabled by default.

After that, simply run vagrant up to start the vm and connect the node to selenium grid on your local machine (Obviously, you should start selenium grid as a hub for that to work!).

How To Create A Windows Base Box for Vagrant

This guide was made following instructions on the Vagrant website and two other tutorials:

Note: You need to download Vagrant from the Vagrant website (http://www.vagrantup.com/downloads.html) ... the PPA distribution has some known issues

Note: The modern ie images do not have ssh or winrm configured by default. You will need to enable and configure winrm via the Virtualbox gui as explained in Step 3.

Instructions

  1. Download the windows image from the Modern IE website

  2. Add the image to Virtual box and give it a name:

    File -> Import Appliance -> /path/to/image

  3. Start the VM, follow ALL the instructions at this tutorial for the required setup steps for a windows box

    Note: Powershell scripting is disabled by default on Windows.

    To enable it, open a command prompt in administrator mode and run the following command:

    set-executionpolicy remotesigned

  4. Shutdown the VM and create the Vagrant base box using the following command:

    vagrant package --base [name of the image in Virtual box]

    See: http://docs.vagrantup.com/v2/virtualbox/boxes.html for more info..

    Search for: "packaging the box"

  5. Add the box to Vagrant's list of base boxes:

    vagrant box add [name of the box] /path/to/the/new.box

    See: http://docs.vagrantup.com/v2/boxes/base.html for more info..

    Search for: "testing the box"

  6. Install the Vagrant vb-guest plugin using the following command:

    vagrant plugin install vagrant-vbguest

    See: https://github.com/dotless-de/vagrant-vbguest for more info..

  7. Create a directory for the vagrant box, and run the following from that directory

    vagrant init [name of box]

    See: http://docs.vagrantup.com/v2/boxes/base.html for more info..

    Search for: "testing the box"

  8. Run vagrant up to test the box, have fun!

About

an example on setting up selenium on a windows vm using vagrant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published