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.
SubscribeRelated
locator.selectOption()page.getByLabel()page.setDefaultTimeout()