Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
feat(runner): add error message for bad jar path
Browse files Browse the repository at this point in the history
Closes #259.
If a bad path was provided in the protractor
configuration, the runner would fail with an
ambiguous error.
This fix checks that a file exists at the
provided path, and throws an error if not,
suggesting that perhaps the version is
wrong in the configuration.
  • Loading branch information
jeffbcross authored and juliemr committed Nov 19, 2013
1 parent 63ffc6f commit 6a1c918
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ var setUpSelenium = function() {
config.seleniumArgs.push(
'-Dwebdriver.chrome.driver=' + config.chromeDriver);
}

if (config.seleniumServerJar && !fs.existsSync(config.seleniumServerJar)) {
throw new Error('there\'s no selenium server jar at the specified location.'+
'Do you have the correct version?');
}

server = new remote.SeleniumServer(config.seleniumServerJar, {
args: config.seleniumArgs,
port: config.seleniumPort
Expand Down

0 comments on commit 6a1c918

Please sign in to comment.