Skip to content

Protractor

Polina Soshnin edited this page Jan 21, 2016 · 8 revisions

Reasons to use Protractor

  • One of the main reasons to use a tool like Protractor is so that you can test your application in multiple browsers.

Prerequisites to getting Protractor to work locally:

Protractor provides a wrapper around WebDriverJS, the JavaScript bindings for Selenium Webdriver, to run end to end tests against an AngularJS application running live in a browser.

You will need Chrome and Java JDK installed.

  • npm install -g protractor
  • webdriver-manager update
  • webdriver-manager start
  • Leave the webdriver server running. Open another tab and run gulp e2e

Interactive Mode

A great way to play around with Protractor is to use the interactive element explorer. Check out elementor.

Using Protractor with Travis: work in progress

$ travis login
$ travis encrypt SAUCE_USERNAME= --add
$ travis encrypt SAUCE_ACCESS_KEY= --add
$ travis env list

Sauce Connect on your local machine

  • bin/sc -u YOUR_USERNAME -k YOUR_ACCESS_KEY
  • protractor client/test/e2e/config/sauce.conf.js
Clone this wiki locally