Skip to main content
Presses a software keyboard key. The simplified form takes the key name as a single string.

Parameters

ParameterTypeRequiredDescription
keyenumYesKey to press: enter, backspace, or close_keyboard.
repeatnumberNoNumber of times to press the key. Default 1.
delaynumberNoMilliseconds to wait between repeated presses. Default 0.
saveAsstringNoVariable to store this step’s return value on env.<name>.
retriesnumberNoTimes to retry the step on failure before failing the test.
skippedbooleanNoSkip this step at execution time.

Shorthand

Key name as a single string.
- pressKey: enter

Examples

- pressKey:
    key: close_keyboard # dismiss the on-screen keyboard
Hold a key down by repeating it with a delay, for example to clear a field:
- pressKey:
    key: backspace
    repeat: 12 # delete up to 12 characters
    delay: 80 # wait 80ms between presses