1

I am trying to select the first option in an html page that is roughly structured like this...

<select id="select">
 <option>sjdjdjs</option>
 <option>sjdjdjs</option>
 <option>sjdjdjs</option>
</select>

I've tried with options on the element and clicking the first index of the array that comes back

await page.evaluate(() => document.querySelector('#select').options[0].click())

it is not selected

N. Amin
  • 57
  • 1
  • 8

0 Answers0