Skip to content

Commit 1d9750e

Browse files
committed
Screenshot url is printed on console, after test completes
1 parent d56410e commit 1d9750e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ exports.Server = function Server(bsClient, workers) {
109109
status += query.failed;
110110

111111
if (worker) {
112+
bsClient.takeScreenshot(worker.id,function(error,screenshot){
113+
if(!error && screenshot.url){
114+
console.log('[%s] Screenshot: %s', worker.string, screenshot.url);
115+
}
116+
112117
bsClient.terminateWorker(worker.id, function () {
113118
if (!workers[uuid]) {
114119
return;
@@ -129,6 +134,7 @@ exports.Server = function Server(bsClient, workers) {
129134
process.exit(status);
130135
}
131136
});
137+
});
132138
}
133139

134140
response.end();

0 commit comments

Comments
 (0)