Skip to content

Commit 08ef062

Browse files
committed
Tweak messaging on SafariDriver client page to better reflect what is happening.
Also added a log message pointing users to the toolbar button that opens the driver log page.
1 parent 31de201 commit 08ef062

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

javascript/safari-driver/client.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ goog.require('safaridriver.message.Connect');
1616
*/
1717
safaridriver.client.init = function() {
1818
var h2 = document.createElement('h2');
19-
h2.innerHTML = 'SafariDriver Client';
19+
h2.innerHTML = 'SafariDriver Launcher';
2020
document.body.appendChild(h2);
2121

2222
var div = document.createElement('div');
@@ -35,7 +35,9 @@ safaridriver.client.init = function() {
3535
}
3636
url = new goog.Uri(url);
3737

38-
log.info('Requesting connection at ' + url + '...');
38+
log.info('Connecting to SafariDriver browser extension...');
39+
log.info('Extension logs may be viewed by clicking the Selenium [\u2713] ' +
40+
'button on the Safari toolbar');
3941
var numAttempts = 0;
4042
var message = new safaridriver.message.Connect(url.toString());
4143
connect();
@@ -44,12 +46,14 @@ safaridriver.client.init = function() {
4446
numAttempts += 1;
4547
var acknowledged = message.sendSync(window);
4648
if (acknowledged) {
47-
log.info('Request acknowledged; connecting...');
49+
log.info('Connected to extension');
50+
log.info('Waiting for extension to connect to client at ' + url);
4851
} else if (numAttempts < 5) {
4952
var timeout = 250 * numAttempts;
5053
setTimeout(connect, timeout);
5154
} else {
52-
log.severe('Unable to establish a connection with the SafariDriver');
55+
log.severe(
56+
'Unable to establish a connection with the SafariDriver extension');
5357
}
5458
}
5559
};

0 commit comments

Comments
 (0)