Press key command
Clicks on a single or sequence of special device keys (either control or keyboard). You can hover over the device keys to identify them, then enter the Keys parameter according to the required syntax.
Common keys include: LEFT, RIGHT, UP, DOWN, OK, BACK, MENU, VOL_UP, VOL_DOWN, CAMERA, CLEAR
Presskey will always press the keyboard keys according to the default layout configuration.
To press on Enter/Submit/Search, as the Keys parameter value, enter the following (supported on Android and iOS):
- KEYBOARD_GO
- KEYBOARD_SEARCH
- KEYBOARD_SEND
- KEYBOARD_NEXT
- KEYBOARD_DONE
- KEYBOARD_PREVIOUS
- KEYBOARD_ENTER
- KEYBOARD_SUBMIT
To activate Siri, use the value LONGHOME.
Parameters
Name | Type | Possible values | Description |
---|---|---|---|
Device ID* |
String |
The device for this command. By default, this is the device under test (DUT). |
|
Keys* |
String |
OK | MENU | HOME | BACK | LEFT | RIGHT | UP | DOWN | VOL_UP | VOL_DOWN | CAMERA | CLEAR | APP_SWITCH I LONGHOME |
The physical device keys to press. You can select a sequence of comma-separated keys. To define a long key press, use a colon follow by the time, in milliseconds. For example: To embed a wait as part of the sequence, use WAIT= followed by the time, in milliseconds. For example: For multiple key presses, use an asterisk. Examples:
is the same as
For iOS, the only supported values are HOME and LONGHOME. |
Virtual keypad name |
String |
Specify the logical name of the virtual keypad to be used. A virtual keypad is defined as the keypad that pops up when user input is required. |
|
Comment |
String |
Adds a comment to the script. |
|
On-fail Result* |
Condition |
Ignore | Break | Continue | Abort | Catch |
The behavior when the command fails. |
* Mandatory parameter