Skip to content

Commit

Permalink
This addresses #76 - improving the error message when selenium fails …
Browse files Browse the repository at this point in the history
…to start due to missing java
  • Loading branch information
beatfactor committed Mar 17, 2014
1 parent 2ec6f24 commit 5061424
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runner/selenium.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ module.exports = new (function() {
seleniumProcess = spawn('java', cliOpts);
seleniumProcess.host = selenium_host;
seleniumProcess.port = selenium_port;
seleniumProcess.on('error', function(err) {
if (err.code == 'ENOENT') {
console.log(Logger.colors.red('\nAn error occured while trying to start Selenium. ' +
'Check if JAVA is installed on your machine.'));
console.log(util.inspect(err, false, 1, true));
}
});

seleniumProcess.stdout.on('data', function(data) {
output += data.toString();
Expand Down

0 comments on commit 5061424

Please sign in to comment.