var wait = await page3.evaluate(()=> {
$('.modal').hide()
setTimeout(()=>{
return true
}, 3000);
});
Ex: wait 3 second in evaulate
You return a promise and resolve it when you want. Returning a promise will make it wait until it's resolved.
var wait = await page3.evaluate(()=> {
return new Promise((resolve,reject)=>{
$('.modal').hide()
setTimeout(()=>{
resolve(true)
}, 3000);
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With