Skip to content

Commit d70658c

Browse files
committed
screenshot on worker timeout
1 parent 098bb4c commit d70658c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/runner.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ function launchBrowser(browser, url) {
125125
if (!worker.acknowledged) {
126126
var subject = "Worker inactive for too long: " + worker.string;
127127
var content = "Worker details:\n" + JSON.stringify(worker.config, null, 4);
128-
128+
client.takeScreenshot(worker.id, function(error, screenshot) {
129+
if (!error && screenshot.url) {
130+
console.log('[%s] Screenshot: %s', worker.string, screenshot.url);
131+
}
132+
});
129133
utils.alertBrowserStack(subject, content);
130134
}
131135
}, timeout * 1000);

0 commit comments

Comments
 (0)