index.js
function (opts) {
  // get the browser configuration & the browser module
  var browserConf = {name: null};
  var browser = opts.browserMo;

  // prepare properties
  this._initializeProperties(opts);

  // create a new webdriver client instance
  this.webdriverClient = new WD(browser, this.events);

  // listen on browser events
  this._startBrowserEventListeners(browser);

  // assign the current browser name
  browserConf.name = this.browserName;

  // store desired capabilities of this session
  this.desiredCapabilities = browser.getDesiredCapabilities(this.browserName, this.config);
  this.browserDefaults = browser.driverDefaults;
  this.browserDefaults.status = browser.getStatusDefaults(this.desiredCapabilities);
  this.browserData = browser;

  // set auth data
  var driverConfig = this.config.get('driver.sauce');
  browser.setAuth(driverConfig.user, driverConfig.key);

  // launch the browser & when the browser launch
  // promise is fullfilled, issue the driver:ready event
  // for the particular browser
  browser
    .launch(browserConf, this.reporterEvents, this.config)
    .then(this.events.emit.bind(this.events, 'driver:ready:sauce:' + this.browserName, browser));
}
function (opts) {
  // get the browser configuration & the browser module
  var browserConf = {name: null};
  var browser = opts.browserMo;

  // prepare properties
  this._initializeProperties(opts);

  // create a new webdriver client instance
  this.webdriverClient = new WD(browser, this.events);

  // listen on browser events
  this._startBrowserEventListeners(browser);

  // assign the current browser name
  browserConf.name = this.browserName;

  // store desired capabilities of this session
  this.desiredCapabilities = browser.getDesiredCapabilities(this.browserName, this.config);
  this.browserDefaults = browser.driverDefaults;
  this.browserDefaults.status = browser.getStatusDefaults(this.desiredCapabilities);
  this.browserData = browser;

  // set auth data
  var driverConfig = this.config.get('driver.sauce');
  browser.setAuth(driverConfig.user, driverConfig.key);

  // launch the browser & when the browser launch
  // promise is fullfilled, issue the driver:ready event
  // for the particular browser
  browser
    .launch(browserConf, this.reporterEvents, this.config)
    .then(this.events.emit.bind(this.events, 'driver:ready:sauce:' + this.browserName, browser));
}
function ( opts ) { // get the browser configuration & the browser module var browserConf = { name : null } ; var browser = opts . browserMo ; // prepare properties this . _initializeProperties ( opts ) ; // create a new webdriver client instance this . webdriverClient = new WD ( browser , this . events ) ; // listen on browser events this . _startBrowserEventListeners ( browser ) ; // assign the current browser name browserConf . name = this . browserName ; // store desired capabilities of this session this . desiredCapabilities = browser . getDesiredCapabilities ( this . browserName , this . config ) ; this . browserDefaults = browser . driverDefaults ; this . browserDefaults . status = browser . getStatusDefaults ( this . desiredCapabilities ) ; this . browserData = browser ; // set auth data var driverConfig = this . config . get ( 'driver.sauce' ) ; browser . setAuth ( driverConfig . user , driverConfig . key ) ; // launch the browser & when the browser launch // promise is fullfilled, issue the driver:ready event // for the particular browser browser . launch ( browserConf , this . reporterEvents , this . config ) . then ( this . events . emit . bind ( this . events , 'driver:ready:sauce:' + this . browserName , browser ) ) ; }
Initializes the sauce labs driver & the remote browser instance

@param {object} opts Initializer options
@constructor
Initializes the sauce labs driver & the remote browser instance