Skip to content
Advertisement

Puppeteer: waitForSelector followed by click is not working

I am trying to scrape a dynamic site using puppeteer in node, but not able to click the required elements no matter what. Please help!

JavaScript

Tried this too, but no luck:

JavaScript

Advertisement

Answer

It’s a <select>, you probably don’t want to click on it, but choose an option instead:

JavaScript

Docs for page.select

Triggers a change and input event once all the provided options have been selected.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement