Having trouble with `await page.select` in Puppeteer? Need help with dropdown selection!

7 Replies, 2005 Views

Hey there! I’ve been using Puppeteer for a while, and `await page.select puppeteer` can be tricky with dynamic content. One thing that often gets overlooked is whether the dropdown is actually a `<select>` element. Some sites use custom dropdowns made with divs or other elements, which `page.select` won’t work on.

If it’s a custom dropdown, you’ll need to simulate clicks or use `page.evaluate` to set the value. Check the DOM to confirm the element type. If it’s a standard `<select>`, then yeah, waiting for the options to load is key.

Messages In This Thread



Users browsing this thread: 2 Guest(s)