page.evaluate pass arguments puppeteer code example
Example: puppeteer evaluate pass variable
const links = await page.evaluate((evalVar) => {
console.log(evalVar); // 2. should be defined now
…
}, evalVar); // 1. pass variable as an argument