Skip to content
masterclass Buddy

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.

Subscribe
  • deselectOptions
  • clear
  • type
  • upload

Source: Utility APIs | Testing Library. Checked 2026-11-03.