Forms & input
Task-first recipes for forms & input.
Fill and submit a form
Fill fields by their label, check options, submit, and assert the result the user sees.
Select a dropdown option
Choose options in a native select by value, label, or index, handle multi-selects, and drive custom dropdowns.
Check a checkbox or radio
Toggle checkboxes and radios by their label, then assert the checked state instead of the click.
Hover to reveal a menu
Hover over a trigger, then act on the item it reveals without letting the menu close.
Press keyboard shortcuts
Send key combinations and special keys with press, and know when to use fill instead.
Drag and drop
Drag one element onto another with dragTo, and fall back to low-level mouse steps when needed.
Scroll to load more content
Let actions scroll for you, reveal a known element, or drive infinite scroll and wait for new items.
Pick a date from a date picker
Fill a native date input directly, or navigate a custom widget by role when there is no input.