lib/browser.js
function (browserName, config) {
    var browsers = config.get('browsers');

    // check if we couldnt find a configured alias,
    // set to defaults otherwise
    if (!browsers) {
      return {actAs: this.desiredCapabilities.browserName, version: this.desiredCapabilities['browser-version']};
    }
    var browser = config.get('browsers')[0][browserName] || null;
    // check if we couldnt find a configured alias,
    // check and apply if there is a default config
    if (!browser && this.browsers[browserName]) {
      browser = this.browsers[browserName];
    }

    // check if the actas property has been set, if not
    // use the given browser name
    if (!browser.actAs) {
      browser.actAs = browserName;
    }

    return browser;
  }
function (browserName, config) {
    var browsers = config.get('browsers');

    // check if we couldnt find a configured alias,
    // set to defaults otherwise
    if (!browsers) {
      return {actAs: this.desiredCapabilities.browserName, version: this.desiredCapabilities['browser-version']};
    }
    var browser = config.get('browsers')[0][browserName] || null;
    // check if we couldnt find a configured alias,
    // check and apply if there is a default config
    if (!browser && this.browsers[browserName]) {
      browser = this.browsers[browserName];
    }

    // check if the actas property has been set, if not
    // use the given browser name
    if (!browser.actAs) {
      browser.actAs = browserName;
    }

    return browser;
  }
function ( browserName , config ) { var browsers = config . get ( 'browsers' ) ; // check if we couldnt find a configured alias, // set to defaults otherwise if ( ! browsers ) { return { actAs : this . desiredCapabilities . browserName , version : this . desiredCapabilities [ 'browser-version' ] } ; } var browser = config . get ( 'browsers' ) [ 0 ] [ browserName ] || null ; // check if we couldnt find a configured alias, // check and apply if there is a default config if ( ! browser && this . browsers [ browserName ] ) { browser = this . browsers [ browserName ] ; } // check if the actas property has been set, if not // use the given browser name if ( ! browser . actAs ) { browser . actAs = browserName ; } return browser ; }
Verifies the browser config

@method _verfiyBrowserConfig
@param {string} browserName Name of the browser to verify
@param {object} config Daleks internal config helper
@return {object} Browser config
@private
Verifies the browser config