Skip to content

Commit

Permalink
chore(error): improve error message for local and direct driver provi…
Browse files Browse the repository at this point in the history
…ders (angular#3850)

closes angular#1017
  • Loading branch information
cnishina authored Dec 20, 2016
1 parent 83694f5 commit 075a512
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion lib/driverProviders/direct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ export class Direct extends DriverProvider {
let chromeDriverFile = this.config_.chromeDriver || defaultChromeDriverPath;

if (!fs.existsSync(chromeDriverFile)) {
throw new BrowserError(logger, 'Could not find chromedriver at ' + chromeDriverFile);
throw new BrowserError(
logger,
'Could not find chromedriver at ' + chromeDriverFile +
'. Run \'webdriver-manager update\' to download binaries.');
}

let service = new ChromeServiceBuilder(chromeDriverFile).build();
Expand Down
9 changes: 5 additions & 4 deletions lib/driverProviders/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ export class Local extends DriverProvider {
if (!fs.existsSync(this.config_.seleniumServerJar)) {
throw new BrowserError(
logger,
'No selenium server jar found at the specified ' +
'location (' + this.config_.seleniumServerJar +
'). Check that the version number is up to date.');
'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) {
Expand All @@ -64,7 +63,9 @@ export class Local extends DriverProvider {
this.config_.chromeDriver += '.exe';
} else {
throw new BrowserError(
logger, 'Could not find chromedriver at ' + this.config_.chromeDriver);
logger,
'Could not find chromedriver at ' + this.config_.chromeDriver +
'. Run \'webdriver-manager update\' to download binaries.'););
}
}
}
Expand Down

0 comments on commit 075a512

Please sign in to comment.