Install
You will need to have Node.js and NPM installed on your machine.
Check out their project websites for more instructions. If you want to have WebdriverIO integrated into your test
suite, then install it locally with:
1
| $ npm install webdriverio
|
Since v3
WebdriverIO comes with an own test runner. If you want to run your integration tests with it, install
WebdriverIO globally calling:
1
| $ npm install -g webdriverio
|
The test runner is called wdio
and should be available after the install was successful:
Set up your Selenium environment
There are two ways of setting up your Selenium environment: as a standalone package or by installing the
server and browser driver separately.
Use of existing standalone package
The simplest way to get started is to use one of the NPM selenium standalone
packages like: vvo/selenium-standalone. After installing
it (globally) you can run your server by executing:
1
| $ selenium-standalone start
|
To install the Selenium Server and Chromedriver (if necessary) separately:
First you must run a selenium standalone server on your machine. You will get the newest
version here. Just download the jar file somewhere on your system.
After that start your terminal and execute the file via
1
| $ java -jar /your/download/directory/selenium-server-standalone-2.42.2.jar
|
The standalone server comes with some integrated drivers (for Firefox, Opera and Safari) which enhance your
installed browser to get navigated through the server by the JSONWire protocol.
Setup Chromedriver
Chromedriver is a standalone server which
implements WebDriver’s wire protocol for Chromium. It is being developed by members of the Chromium and
WebDriver teams. For running Chrome browser tests on your local machine you need to download ChromeDriver
from the project website and make it available on your machine by setting the PATH to the ChromeDriver
executable.