How-to
Key press (press)
Key press (press)
Presses a key or chord in the Target context. Value is a Playwright key name, for example Enter or Control+A.
Step model
action_name | press |
| Group | Input |
| Target | Required |
| Value | Required (key) |
| expected_value | Unused |
| TEST_ACCOUNT | Allowed |
| Do not confuse with | type, fill |
Target/Value facts match the source-of-truth catalog and Autotest step.
Prerequisites
- Focus or Target points to an element that accepts the key.
Steps
- Add a
pressstep. - Set Target.
- In Value enter the key (
Enter,Escape,Tab,Control+Enter). - Save.
The step is stored on the autotest. Next - neighbouring steps or autotest run creation.
Examples
Submit with Enter
Fields in the UI:
| Field | Value |
|---|---|
action_name | press |
| Target | kind LABEL, value Password |
| Value | Enter |
| value_source_type | INLINE |
Step JSON fragment (copy-paste):
json
{
"action_name": "press",
"target": {
"kind": "LABEL",
"value": "Password"
},
"value_text": "Enter",
"value_source_type": "INLINE"
}Common mistakes
- Do not put a password string in Value - only the key name.
Screenshots
Screenshots of the step form for press will be added here in a later pass.
Did this page help?