-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hey,
sorry I'm bombing you :) thanks for the help so far :)
i ran into another issue,essentially everything works but i get an error on each test at some random point (seems different in each trial):
node : events.js:72
At line:1 char:1
+ node hello3.js
+ ~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (events.js:72:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
listeners[i].call(self);
^
TypeError: Cannot read property 'call' of undefined
at emitNone (events.js:72:19)
at SockJSConnection.emit (events.js:166:7)
at cleanup (C:\Users\shai\node_modules\shoe\index.js:25:20)
at Session.stream._session.didTimeout (C:\Users\shai\node_modules\shoe\index.js:14:13)
at Session.timeout_cb [as _onTimeout] (C:\Users\shai\node_modules\sockjs\lib\transport.js:101:22)
at Timer.listOnTimeout (timers.js:92:15)
My Code:
ph.viewport(1360, 960)
.open(domain)
.screenshot(dir + '\\home.png')
.evaluate(function () {
return [].filter.call(document.querySelectorAll('a'), function (link) {
if(link.hostname === document.location.hostname) {
return link
}
}).map(function(link){
return [link.hostname, link.pathname];
})
})
.catch(function (e) {
console.log('error', e);
})
.finally(function (results) {
console.log('finally!');
ph.exit();
return results;
}).each(function(link){
return scrapUrl(link, dir)
})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels