Applies to CrossBrowserTesting SaaS, last modified on January 10, 2023

Protractor is a testing system for angular

The setup of protractor tests are driven by the conf.js file. At the gist listed below there is an example conf.js that will work with

exports.config = {
  // change this to your USERNAME and AUTHKEY
  seleniumAddress: 'http://USERNAME:[email protected]:80/wd/hub',

  capabilities : {

    name : 'protractor test', // this will show up in the UI
    // these are important :)
    browser_api_name : 'FF31', // change this according to what browser you are using
    os_api_name : 'WinXPSP2-C2', // change this for the OS you are using
    screen_resolution : '1024x768', // change this for the resolution
    record_video : false,
    record_network : false,
    record_snapshot : false,

    // change this to your USERNAME and AUTHKEY
    username : "USERNAME",
    password : "AUTHKEY"


  specs: ['todo-spec.js']

The capabilities object needs to include the extra information about which browser and operating system you are going to run on You can get these constants from the example script on the Selenium page.

The other change is you must include your username/authkey in the capabilities object. Those two fields are called username and password respectively.

You can also test more than one browser at a time by using the multicapabilties, see this tutorial on the protractor tutorial.

Also see this example of what a conf.js should look like for multicapabilities.

That example will run firefox32 and firefox31 on WinXPSP2 simultaneously. The simple todo-spec.js is here

See Also

Test Frameworks and Tools
About Selenium Testing
Selenium and JavaScript
WebDriverIO and CrossBrowserTesting

Highlight search results