我有一个自定义爬虫,它重定向到应用程序中的所有页面并截取屏幕截图。页面加载在 Firefox 中运行良好。但是在 Chrome 中,页面无法正确加载,因此大多数屏幕截图都是空白的。
return remote.get(newAddress)
.then(pollUntil('return document.readyState==="complete";', [], 30000))
.takeScreenshot().then(function(data) {
recordImage(newAddress, data);
})