open
Open a combobox panel, optionally picking in the same step
Open a custom combobox panel without picking, or open and pick in one step.
Syntax
When I open "<combobox>"
When I open "<combobox>" and pick "<option-or-list>"Qualifiers
| Qualifier | Role | Example |
|---|---|---|
and pick | Pick after open (single or comma multi) | open "Country" and pick "Canada" |
Requirements
| Item | Contract |
|---|---|
| Element / control shape | Trigger: [role=combobox] and/or button[aria-haspopup] (id, data-testid, aria-label, button text, label + combobox, input[role=combobox]). Panel after open: visible [role=listbox] or [role=menu] (prefer trigger aria-controls / aria-owns). Options: [role=option] or li inside that panel |
| How the label binds | Combobox trigger strategies only — a plain element with only an id that is not combobox-shaped is not enough |
| Qualifiers that change resolve | Bare open opens panel; and pick opens then picks (distinct errors per phase) |
| Platform | Web |
| Wrong shape → use instead | Native <select> → select. Radix / Headless menu (role=menuitem) → click trigger by id + item by id. Do not use open … and pick for those menus. |
When it fails
- Trigger not found — control lacks combobox /
aria-haspopupshape. - Panel did not open / multiple open panels — missing listbox/menu roles or ownership.
- Option missing — text not inside the open panel (page-wide text is ignored).
See also UI contracts.
Examples
When I open "Tags"
Then I should see "Red"
When I pick "Red,Blue,Green"
When I open "Country" and pick "Canada"
When I open "Tags" and pick "Red,Blue,Green"Notes
openalone opens the panel; follow with bare pick for multi-select flows.open … and pickhas distinct errors at each phase (open vs pick).- Prefer select for native
<select>elements.