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

34 Replies, 3048 Views

Hey! I had a similar issue with `await page.select puppeteer` a while back. Turns out, the dropdown wasn't fully loaded when I tried to select the option. Try adding a waitForSelector before the select statement:

```javascript
await page.waitForSelector('select#myDropdown');
await page.select('select#myDropdown', 'optionValue');
```

This worked for me. If it's still not working, maybe check if the option value is correct?

Messages In This Thread



Users browsing this thread: 1 Guest(s)