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

20 Replies, 1615 Views

Pro tip: Use `page.$eval` to force the selection if `await page.select puppeteer` fails:

```javascript
await page.$eval('#dropdown', (el, value) => {
el.value = value;
el.dispatchEvent(new Event('change'));
}, 'your_value');
```

This mimics a real user change, which often works better.

Messages In This Thread



Users browsing this thread: 1 Guest(s)