-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hey,
So i've been playing with this for two days, running into issues with once. The basic idea i'm trying to achieve is to detect a redirect on page load and exit out of the flow.
When i put once after open i get: TypeError: Cannot read property 'render' of null
When i put once at the end of the chain i get: TimeoutError: operation timed out
return pha
.viewport(1360, 960)
.open('http://' + link[0] + link[1])
.once('onLoadFinished', function(status) {
if(status === 301){
console.log('redirect')
reject();
}
resolve();
})
.screenshot(cleanSlashes + '.png')
.catch(function (e) {
console.log('error in scrapurl', e)
})
.finally(function () {
pha.exit();
console.log('finally! single url');
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels