Having trouble with await page.select in Puppeteer? How to fix dropdown selection issues? Alternatively:

20 Replies, 1677 Views

Had this issue with a Material-UI dropdown. `await page.select` didn’t work because it wasn’t a real `<select>`.

Ended up using:

```javascript
await page.click('.MuiSelect-select'); // opens dropdown
await page.click('li[data-value="your_value"]'); // clicks option
```

Might help if your dropdown’s a custom component!

Messages In This Thread



Users browsing this thread: 1 Guest(s)