From fbae39983c740a4a8daa6dedcda0a42b4da898cd Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 17 Apr 2015 16:12:13 +0200 Subject: [PATCH] Fail with a more informative error message if the browser executable path doesn't exist --- test/webbrowser.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/webbrowser.js b/test/webbrowser.js index 8c36432d4..c0cf38fc2 100644 --- a/test/webbrowser.js +++ b/test/webbrowser.js @@ -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); }