code: function getDriverInstance() {
  
      var driver;
  
      switch (browserName || '') {
  
          case 'firefox': {
              driver = new FireFoxDriver();
          }
              break;
  
          case 'phantomjs': {
              driver = new PhantomJSDriver();
          }
              break;
  
          case 'electron': {
              driver = new ElectronDriver();
          }
              break;
  
          case 'chrome': {
              driver = new ChromeDriver();
          }
              break;
  
          // try to load from file
          default: {
              var driverFileName = path.resolve(process.cwd(), browserName);
  
              if (!fs.isFileSync(driverFileName)) {
                  throw new Error('Could not find driver file: ' + driverFileName);
              }
  
              driver = require(driverFileName)();
          }
      }
  
      return driver;
  }
docs: create the selenium browser based on global var set in index.js
  @returns {ThenableWebDriver} selenium web driver