在应用程序中加载了一系列 URL。页面加载后会触发页面就绪事件。但是,在酱实验室上运行时,该事件不会在随机页面上触发并且测试失败。
如果事件没有触发,有什么方法可以继续测试?
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);
}, []);
})