From 52e35063f4f95c7e23fe6af0b0303e171dec93ad Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 14 Jul 2015 09:55:29 -0400 Subject: [PATCH] Ensure Selenium binaries are installed before use. --- index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 2b9a83d..c3f9755 100644 --- a/index.js +++ b/index.js @@ -74,8 +74,14 @@ app.use(proxy('localhost', { } })); -selenium.start({ spawnOptions: {}}, function() { - console.log("Persistent selenium listening on port 4443"); - app.listen(4443); +selenium.install({ logger: function(msg) { console.log(msg); }}, function(err) { + selenium.start({ spawnOptions: {}}, function(err) { + if (err) { + console.log(err); + } else { + console.log("Persistent selenium listening on port 4443"); + app.listen(4443); + } + }); });