Skip to content
masterclass Buddy

Playwright · Method

page.selectOption

selectOption selects one or more options in a <select> element. Prefer locator.selectOption() for new code.

Last updated

Since
v1.9

Syntax

page.selectOption(selector, values[, options])

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • locator.selectOption()
  • page.getByLabel()
  • page.setDefaultTimeout()

Source: Page | Playwright. Checked 2026-11-03.