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

24 Replies, 2274 Views

Dynamic dropdowns are the worst! I’ve found that sometimes `await page.select puppeteer` fails silently if the option value doesn’t match exactly. Try logging the dropdown options to see what’s available:

```javascript
const dropdown = await page.$('select#myDropdown');
const options = await dropdown.$$eval('option', opts => opts.map(o => o.value));
console.log(options);
```

This might help you spot any discrepancies.

Messages In This Thread



Users browsing this thread: 1 Guest(s)