I would like to reload the page whenever the page doesn\'t load properly or encounters a problem. I tried page.reload() but it doesn\'t work.
fo
I manage to solve it using a while loop.
for (let appUrl of appUrls) {
var count = i++;
while(true){
try{
await page.goto(appUrl);
const appName = await page.$eval('div.det-name-int', div => div.innerText.trim());
console.log('\n' + count);
console.log('Name: ' , appName);
break;
} catch(e){
console.log('\n' + count);
console.log('ERROR');
await page.reload(appUrl);
continue;
}
}