React Testing Library · Method
userEvent.selectOptions
selectOptions selects one or more options in a select element or listbox. Identify options by value, visible text, or option element.
Last updated
Syntax
selectOptions(element: Element, values: HTMLElement | HTMLElement[] | string[] | string): Promise<void>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
deselectOptionscleartypeupload