StrikekitStrikekit

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

QualifierRoleExample
and pickPick after open (single or comma multi)open "Country" and pick "Canada"

Requirements

ItemContract
Element / control shapeTrigger: [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 bindsCombobox trigger strategies only — a plain element with only an id that is not combobox-shaped is not enough
Qualifiers that change resolveBare open opens panel; and pick opens then picks (distinct errors per phase)
PlatformWeb
Wrong shape → use insteadNative <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-haspopup shape.
  • 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

  • open alone opens the panel; follow with bare pick for multi-select flows.
  • open … and pick has distinct errors at each phase (open vs pick).
  • Prefer select for native <select> elements.

On this page