I have a custom crawler that redirects to all pages in an application and takes screenshot. The page load works perfectly fine in Firefox. However in Chrome, the page does not load properly and as a result most of the screenshots come as blank.
return remote.get(newAddress)
.then(pollUntil('return document.readyState==="complete";', [], 30000))
.takeScreenshot().then(function(data) {
recordImage(newAddress, data);
})
false
is considered a value bypollUntil
. You need to returnnull
orundefined
if you want it to continue polling:From the docs: