press
Send keyboard input at page level or on a labeled element
Press a key or modifier chord. Use page-level press for shortcuts; use on to target a field.
Syntax
When I press "<key>"
When I press "<key>" on "<target>"Qualifiers
| Qualifier | Role | Example |
|---|---|---|
on | Optional target element | press "Enter" on "password" |
Requirements
| Item | Contract |
|---|---|
| Element / control shape | Bare press "Key" — no element (page keyboard). press … on — same as fill: input / textarea |
| How the label binds | With on: fill auto-find order. Without on: none |
| Qualifiers that change resolve | on switches from page press to field resolve |
| Platform | Web (page chords); field path follows fill |
| Wrong shape → use instead | Need a clickable control → click. Need to type text → fill |
When it fails
press … ontimeouts usually mean the field is not aninput/textareaor the label missed.
See also UI contracts.
Examples
When I press "Escape"
When I press "Control+S"
When I press "Enter" on "password"Notes
- Use
modifier+Keychords (for exampleControl+S). - The key string is a payload —
*is literal.