Browse Source

Fail with a more informative error message if the browser executable path doesn't exist

Marco Castelluccio 10 years ago
parent
commit
fbae39983c
  1. 4
      test/webbrowser.js

4
test/webbrowser.js

@ -145,6 +145,10 @@ ChromiumBrowser.prototype.buildArguments = function (url) { @@ -145,6 +145,10 @@ ChromiumBrowser.prototype.buildArguments = function (url) {
WebBrowser.create = function (desc) {
var name = desc.name;
// Throws an exception if the path doesn't exist.
fs.statSync(desc.path);
if (/firefox/i.test(name)) {
return new FirefoxBrowser(desc.name, desc.path);
}

Loading…
Cancel
Save