Skip to content

Commit 72e3281

Browse files
committed
minor fix, 1 more ogging
1 parent 4b7a30e commit 72e3281

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

bin/runner.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function launchBrowser(browser, url) {
8989
}
9090

9191
client.createWorker(browser, function (err, worker) {
92+
console.log("Error from BrowserStack: ", err);
9293
if (err || typeof worker !== 'object') {
9394
utils.alertBrowserStack("Failed to launch worker",
9495
"Arguments: " + JSON.stringify({
@@ -135,6 +136,20 @@ function launchBrowser(browser, url) {
135136
});
136137
}
137138

139+
function launchBrowsers(config, browser) {
140+
setTimeout(function () {
141+
if(Object.prototype.toString.call(config.test_path) === '[object Array]'){
142+
config.test_path.forEach(function(path){
143+
var url = 'http://localhost:' + serverPort.toString() + '/' + path;
144+
launchBrowser(browser,url);
145+
});
146+
} else {
147+
var url = 'http://localhost:' + serverPort.toString() + '/' + config.test_path;
148+
launchBrowser(browser,url);
149+
}
150+
}, 100);
151+
}
152+
138153
if (config.browsers && config.browsers.length > 0) {
139154
tunnel = new Tunnel(config.key, serverPort, config.tunnelIdentifier, function () {
140155
console.log("Launching BrowserStack workers");
@@ -146,22 +161,11 @@ if (config.browsers && config.browsers.length > 0) {
146161
console.log("[%s] Version is %s.",
147162
utils.browserString(browser), version);
148163
browser.browser_version = version;
149-
150164
// So that all latest logs come in together
151-
setTimeout(function () {
152-
if(Object.prototype.toString.call(config.test_path) === '[object Array]'){
153-
config.test_path.forEach(function(path){
154-
var url = 'http://localhost:' + serverPort.toString() + '/' + path;
155-
launchBrowser(browser,url);
156-
});
157-
} else {
158-
var url = 'http://localhost:' + serverPort.toString() + '/' + config.test_path;
159-
launchBrowser(browser,url);
160-
}
161-
}, 100);
165+
launchBrowsers(config, browser);
162166
});
163167
} else {
164-
launchBrowser(browser);
168+
launchBrowsers(config, browser);
165169
}
166170
});
167171
});

0 commit comments

Comments
 (0)