Skip to content

Instantly share code, notes, and snippets.

@daleharvey
Created February 25, 2014 11:04
Show Gist options
  • Save daleharvey/9206935 to your computer and use it in GitHub Desktop.
Save daleharvey/9206935 to your computer and use it in GitHub Desktop.
function startTest() {
console.log('Starting', browser);
var opts = {
browserName: browser,
tunnelTimeout: testTimeout,
'max-duration': 60 * 30,
'command-timeout': 599,
'idle-timeout': 599
};
client.init(opts).get(testUrl, function () {
/* jshint evil: true */
var interval = setInterval(function () {
client.eval('window.results', function (err, results) {
if (err) {
clearInterval(interval);
testError(err);
} else if (results.completed) {
clearInterval(interval);
testComplete(results);
} else {
console.log('STILL RUNNING');
console.log(results);
}
});
}, 10 * 1000);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment