How to run Protractor

These are the getting started docs:

https://github.com/angular/protractor/blob/master/docs/getting-started.md

You need to have node.js installed on your machine, as well as the npm node package. Once you have those two things installed you can follow the rest of the directions in the docs above.

It should only take about 5-10 mins of installation before you have Protractor up and running. Let me know if you're still stuck.


You can install Protractor globally via:

$ npm install -g protractor

Afterwards it should be available on the command line (Windows/Linux)

$ protractor protractor.conf.js

To install just for the current project:

$ npm install protractor --save-dev

It can be run via the node_modules like this (Windows/Linux):

$ ./node_modules/.bin/protractor protractor.conf.js

You can add it to your package.json for easier running:

"scripts": {
    "test": "./node_modules/.bin/protractor protractor.conf.js"
}

Then later:

$ npm test

You need to run it through node.

So from the base of your project;

node node_modules\protractor\bin\protractor test\myConf.js