0
rated 0 times
[
3]
[
3]
/ answers: 1 / hits: 18891
/ 5 Years ago, tue, april 16, 2019, 12:00:00
I'd like to simulate a click on a gallery (<div class=image>
) but when I try to run this code, I got document not defined error.
async function gallery(page) {
await page.waitFor(3000);
await page.click(document.querySelector('.div image'));
}
What's the problem here? How can I use document.querySelector correctly with puppeteer?
More From » node.js