Windows installation guide
==========================

_For POSIX-compliant OSs, see the main [README](https://github.com/MattiSG/Watai/)._

### Node & NPM ###

Watai runs as a [Node.js](http://nodejs.org) module. You will therefore need the Node runtime (v0.6 through v0.10) and package manager (NPM).

[Download](http://nodejs.org/download) the Node+NPM package for your environment.

If you don’t have admin privileges, you might have to define `PATH` as a user environment variable and set it to `<install_drive>:\Program Files\nodejs`.

### Selenium Server ###

Watai uses Selenium-WebDriver to automate browsers. You will therefore need a Selenium _standalone server_ to send commands to the browsers.

[Download the latest JAR](https://code.google.com/p/selenium/downloads/list?can=3&q=selenium-server-standalone) and start it in a dedicated console:

	java -jar path\to\downloaded\selenium-server-standalone.jar

This will output many `INFO` lines over a few seconds. You know it is done when it says:

	… INFO - Started org.openqa.jetty.jetty.Server@…

You will obviously need Java (≥ 1.5). If you don’t have it yet (but you probably wouldn’t be reading this README), [download it now](http://java.com/download).

### Package ###

Once you have both Node and a Selenium server, you can consider installing Watai itself.

	npm install -g watai
	doskey watai=node "%APPDATA%\npm\node_modules\watai\src" $*

Note the `\src $*` at the end!

#### From behind a proxy ####

If your proxy configuration prevents you from using `npm install` properly (i.e. you get `ERRTIMEOUT` errors), download the latest Watai **with NPM dependencies** package from the [Releases](https://github.com/MattiSG/Watai/releases) tab, unzip it and:

	doskey watai=node path\to\unzipped\folder\src $*

Note the `\src $*` at the end!

### Validation ###

Let’s make sure you’re fully ready to use Watai by typing:

	watai --installed

### Then, [[get started with Watai|Tutorial]]! ###
