Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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');