How can I console.log something inside the page.evaluate, passing it to node and using it during the evaluation of the page?
I actually want to log
I share this solution for future readers who would more like to know how to get the returned value of an evaluation instead.
const element = await page.$("a selector"); const text = await page.evaluate(element => element.textContent);