Inside of this method that works with puppeteer, I want to use page
but I can't quite work out how to get it inside the Promise.
async scrollList( page ) {
let results = await page.evaluate( async () => {
results = await new Promise( async resolve => {
// next line fails :-(
await page.mouse.move( 100, 100 );
// do other stuff
return resolve( results );
});
});
console.log('Got results: ', results);
}
How can I do this? Right now I'm getting an error saying page
is undefined.