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

20 Replies, 1667 Views

Ugh, dropdowns are the worst. Have you tried forcing a click first? Like:

```javascript
await page.click('#dropdown');
await page.waitForTimeout(500); // tiny delay
await page.select('#dropdown', 'option_value');
```

If that fails, maybe the dropdown’s options aren’t actual `<option>` tags. Inspect the HTML—could be divs or something else.

Puppeteer’s `await page.select` only works with native `<select>` elements.

Messages In This Thread



Users browsing this thread: 1 Guest(s)