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

Commit 6a1c918

Browse files
jeffbcrossjuliemr
authored andcommitted
feat(runner): add error message for bad jar path
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.
1 parent 63ffc6f commit 6a1c918

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/runner.js

+6
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ var setUpSelenium = function() {
137137
config.seleniumArgs.push(
138138
'-Dwebdriver.chrome.driver=' + config.chromeDriver);
139139
}
140+
141+
if (config.seleniumServerJar && !fs.existsSync(config.seleniumServerJar)) {
142+
throw new Error('there\'s no selenium server jar at the specified location.'+
143+
'Do you have the correct version?');
144+
}
145+
140146
server = new remote.SeleniumServer(config.seleniumServerJar, {
141147
args: config.seleniumArgs,
142148
port: config.seleniumPort

0 commit comments

Comments
 (0)