Skip to content

Instantly share code, notes, and snippets.

@tonetheman tonetheman/conf.js
Last active Apr 16, 2018

Embed
What would you like to do?
protractor setup for crossbrowsertesting.com
exports.config = {
// change this to your USERNAME and AUTHKEY
seleniumAddress: 'http://USERNAME:AUTHKEY@hub.crossbrowsertesting.com: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']
};
@marklagendijk

This comment has been minimized.

Copy link

marklagendijk commented Dec 9, 2014

There are two errors in this example:

  1. The record_video etc properties only work if you specify them as string.
  2. The required browserName property is missing.
exports.config = {

  // change this to your USERNAME and AUTHKEY
  seleniumAddress: 'http://USERNAME:AUTHKEY@hub.crossbrowsertesting.com: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
    browserName: 'firefox', // change this according to what browser you are using 'internet explorer', 'chrome' etc
    os_api_name : 'WinXPSP2-C2', // change this for the OS you are using
    screen_resolution : '1024x768', // change this for the resolution

    // 
    record_video : 'true',
    record_network : 'false',
    record_snapshot : 'false',

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

  },

  //
  specs: ['todo-spec.js']
};
@brunodacunha

This comment has been minimized.

Copy link

brunodacunha commented Aug 25, 2015

Hello,
I am trying to run my tests in my xbrowsertesting account but this following error is displayed after run my test:

"C:\Program Files (x86)\JetBrains\WebStorm 10.0.4\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" C:\Users\bcunha\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt --gruntfile C:\DeltaBravo\document_cloud_ui\Gruntfile.js protractor:continuous
Running "protractor:continuous" (protractor) task
Using the selenium server at http://email:pass@hub.crossbrowsertesting.com:8080/wd/hub
[launcher] Running 1 instances of WebDriver

C:\DeltaBravo\document_cloud_ui\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:145
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED

Here is my protracto,config file:

var helper = require('./helperFirefoxProfile.js');
exports.config = {
//getMultiCapabilities: helper.getFirefoxProfile,
seleniumAddress: 'http://mymail:mypass@hub.crossbrowsertesting.com:8080/wd/hub',

specs: ['test/e2e/features/EmployeeDocuments/UploadDocuments.feature'],
framework: 'cucumber',
chromeOnly: false,
capabilities: {
    name : 'Selenium Test Example',

    browserName : "firefox", // <---- this needs to be the browser type in lower case: firefox, internet explorer, chrome, opera, or safari
    browser_api_name : 'FF39',
    os_api_name : 'Win7x64-C1',
    screen_resolution : '1024x768',

    record_video : "false",
    record_network : "true",
    record_snapshot :  "false",



    username : "mymails",
    password : "mypass"

},
jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000
},

cucumberOpts: {
    require: 'test/e2e/features'
}

};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.