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

34 Replies, 3043 Views

Hey! I’d recommend using `page.evaluate` to debug the dropdown. This way, you can manually check if the options are loaded:

```javascript
const options = await page.evaluate(() => {
const dropdown = document.querySelector('select#myDropdown');
return Array.from(dropdown.options).map(opt => opt.value);
});
console.log(options);
```

If the options are empty, you’ll know the dropdown isn’t loaded yet.

Messages In This Thread



Users browsing this thread: 1 Guest(s)