How to use the webdriver-manager.SeleniumServer function in webdriver-manager

To help you get started, we’ve selected a few webdriver-manager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular / protractor / lib / driverProviders / local.ts View on Github external
addDefaultBinaryLocs_(): void {
    if (!this.config_.seleniumServerJar) {
      logger.debug(
          'Attempting to find the SeleniumServerJar in the default ' +
          'location used by webdriver-manager');
      try {
        this.config_.seleniumServerJar = new WdmSeleniumServer().getBinaryPath();
      } catch (err) {
        throw new BrowserError(logger, 'Run \'webdriver-manager update\' to download binaries.');
      }
    }
    if (!fs.existsSync(this.config_.seleniumServerJar)) {
      throw new BrowserError(
          logger,
          'No selenium server jar found at ' + this.config_.seleniumServerJar +
              '. Run \'webdriver-manager update\' to download binaries.');
    }
    if (this.config_.capabilities.browserName === 'chrome') {
      if (!this.config_.chromeDriver) {
        logger.debug(
            'Attempting to find the chromedriver binary in the default ' +
            'location used by webdriver-manager');