code: function (deferred, desiredCapabilities, defaults) {
      var viewport = this.config.get('viewport');
  
      // start a session, transmit the desired capabilities
      var promise = this.webdriverClient.createSession({desiredCapabilities: desiredCapabilities});
      
      // set the default viewport if supported by the browser
      if (defaults.viewport) {
        promise = promise.then(this.webdriverClient.setWindowSize.bind(this.webdriverClient, viewport.width, viewport.height));
      }
  
      // get the driver status if supported by the browser
      if (defaults.status === true) {
        promise = promise
          .then(this.webdriverClient.status.bind(this.webdriverClient))
          .then(this._driverStatus.bind(this));
      } else {
        promise = promise.then(this._driverStatus.bind(this, JSON.stringify({value: defaults.status})));
      }
  
      // get the session info if supported by the browser
      if (defaults.sessionInfo === true) {
        promise = promise
          .then(this.webdriverClient.sessionInfo.bind(this.webdriverClient))
          .then(this._sessionStatus.bind(this));
      } else {
        promise = promise.then(this._driverStatus.bind(this, JSON.stringify({value: defaults.sessionInfo})));
      }
  
      // finally resolve the deferred
      promise.then(deferred.resolve);
      return this;
    }
docs: Creates a new webdriver session
  Gets the driver status
  Gets the session status
  Resolves the promise (e.g. let them tests run)
  
  @method _startBrowserSession
  @param {object} deferred Browser session deferred
  @chainable
  @private