Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
feat: show link to the BS session
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Dec 2, 2013
1 parent 7ae8470 commit 4a40589
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ var BrowserStackBrowser = function(id, emitter, args, logger,
this.url = url;
tunnel.then(function() {
client.createWorker(settings, function(error, worker) {
var sessionUrlShowed = false;

if (error) {
log.error('Can not start %s\n %s', browserName, formatError(error));
Expand All @@ -128,6 +129,14 @@ var BrowserStackBrowser = function(id, emitter, args, logger,
log.error('Can not get worker %s status %s\n %s', workerId, browserName, formatError(error));
return emitter.emit('browser_process_failure', self);
}

// TODO(vojta): show immediately in createClient callback once this gets fixed:
// https://github.com/browserstack/api/issues/10
if (!sessionUrlShowed) {
log.info('%s session at %s', browserName, w.browser_url);
sessionUrlShowed = true;
}

if (w.status === 'running') {
whenRunning();
} else {
Expand Down

0 comments on commit 4a40589

Please sign in to comment.