docs: function(options, doEachBrowser) {
  
      options = options || {};
  
      // Backwards compatibility
      options.webdriver = options.webdriver || {};
      if (!options.webdriver.sauce && !options.webdriver.local)
      {
          var sauce = extend({}, options.webdriver);
          var local = extend({}, options.webdriver);
          local.host = 'localhost';
          local.port = 4444;
          options.webdriver = { local: local, sauce: sauce };
      }
  
      this.browsers = [];
      this._browserActions = [];
      this._initialized = false;
      this._stopped = false;
  
      this.options = extend(true, {
              quiet: false,           // Silences the console output
              sauceUsername: process.env.SAUCE_USERNAME,
              sauceAccessKey: process.env.SAUCE_ACCESS_KEY,
              webdriver: {            // Array of options objects for selenium webdriver (webdriverio) to try
                  sauce: {
                      host: 'ondemand.saucelabs.com',
                      port: 80,
                      logLevel: 'silent',
                      desiredCapabilities: [] // Non-standard option; An array of desired capabilities instead of a single object
                  },
                  local: {
                      host: 'localhost',
                      port: 4444,
                      logLevel: 'silent',
                      desiredCapabilities: []
                  }
              },
              httpServer: {           // Options for local http server (npmjs.org/package/http-server)
                  disable: false,         // Non-standard option; used to skip launching the http server
                  port: 8080,             // Non-standard option; it is passed into the httpServer.listen() method
                  portConflict: 'exit'    // Non-standard option; determines how to handle port conflicts:
                                          //   'random': use a different random port
                                          //   'disable': disable the web server if port is in use
                                          //   'exit': terminate process if port is in use
              },
              sauceLabs: {            // Options for SauceLabs API wrapper (npmjs.org/package/saucelabs)
              },
              sauceConnect: {         // Options for SauceLabs Connect (npmjs.org/package/sauce-connect-launcher)
                  disable: false          // Non-standard option; used to disable sauce connect
              },
              selenium: {             // Options for Selenium Server (npmjs.org/package/selenium-standalone). Only used if you need Selenium running locally.
                  args: [],               // options to pass to `java -jar selenium-server-standalone-X.XX.X.jar`
                  portConflict: 'exit'    // Non-standard option; determines how to handle port conflicts:
                                          //   'disable': disable the web server if port is in use
                                          //   'exit': terminate process if port is in use
              }
          },
          options
      );
  
      this.options.webdriver.sauce.user = this.options.webdriver.sauce.user || this.options.sauceUsername;
      this.options.webdriver.sauce.key = this.options.webdriver.sauce.key || this.options.sauceAccessKey;
  
      if(!this.options.webdriver.sauce.user || !this.options.webdriver.sauce.key)
          this.options.webdriver = this.options.webdriver.local;
      else
          this.options.webdriver = this.options.webdriver.sauce;
  
      var webdriver = this.options.webdriver;
  
      if (webdriver.desiredCapabilities && webdriver.desiredCapabilities.constructor === Object)
          webdriver.desiredCapabilities = [webdriver.desiredCapabilities];
  
      var self = this;
  
      var allDesiredCapabilities = webdriver.desiredCapabilities;
      for (var i = 0, len = allDesiredCapabilities.length; i < len; i++)
      {
          webdriver.desiredCapabilities = allDesiredCapabilities[i];
          var browser = webdriverio.remote(webdriver);
          this.browsers.push(browser);
  
          browser._oldInit = browser.init;
          browser.init = function (complete) {
              self._initOnce(function (err) {
                  try {
                      if (err)
                          return complete(err);
                      this._oldInit().then(function() { complete(); }, complete);
                  } catch(e) {
                      self._doError(e);
                  }
              }.bind(this));
          }.bind(browser);
  
          browser._oldEnd = browser.end;
          browser.end = function (complete) {
              this._oldEnd().then(function() {
                  self.browsers.splice(self.browsers.indexOf(this), 1);
                  if (self.browsers.length == 0)
                      self._stop(complete);
                  else
                      complete();
              }.bind(this), complete);
          }.bind(browser);
  
          browser.passed = function(success, complete) {
              this.updateJob({ passed: success }, function() {
                  this.end(complete);
              }.bind(this));
          }.bind(browser);
  
          browser.updateJob = function(data, complete) {
              if (self.sauceLabs)
                  self.sauceLabs.updateJob(this.requestHandler.sessionID, data, complete);
              else
                  complete();
          }.bind(browser);
  
          doEachBrowser.call(this, browser);
      }
  }