There are array of URLs to load within an application. A page ready event is fired once the page load. However, when running on sauce labs, the event does not fire on a random page and test fails.
Is there any way to continue the tests if the event does not fire?
return remote.get(url)
.setExecuteAsyncTimeout(20000)
.then(function() {
var pageLoadEvent = conf.get("pageLoadEvent");
console.log("waiting for " + pageLoadEvent + " event to occur");
remote.executeAsync(function(done) {
window.addEventListener(pageLoadEvent, function() {
done();
}, false);
}, []);
})