Keyboard Shortcut Step
The Add Keyboard Shortcut step sends the specified keyboard shortcut combination (e.g., CTL + C) to the AUT during execution. The step can be created manually, by selecting it from the list of Predefined steps. The step supports playback on both Windows and Mac and it automatically translates the command to the appropriate operating system. So, for example, a CTL + C shortcut, which is recorded on Windows, is automatically translated to cmd + C when executed on a Mac.
If the test's Default Config specifies a different OS than the one used to execute the test, the keyboard action will be sent in accordance to the OS of the test config used.
Supported keyboard shortcuts
The following keyboard shortcuts are supported. Unsupported combinations will present the following error - “unsupported keyboard shortcut”
Keyboard Shortcut Combination | Windows Example | Mac Example |
---|---|---|
Alt/Ctrl modifier + char/number/special key | ALT + X CTRL + 1 | ⌥ Option + X |
Modifier + function key | Alt + F3 Ctrl + F10 | ⌥ Option + F3 ⌘ Command + F10 |
Modifier (*2) + char/number/special key | Alt + Ctrl + X Ctrl + Shift + 1 | ⌥ Option + ⌘ Command + X ⌘ Command + ⇧ Shift + 1 |
Modifier (*2) + function key | Alt + Ctrl + F12 Ctrl + Shift + F7 | ⌥ Option + ⌃ Control + F12 ⌘ Command + ⇧ Shift + F7 |
Manually adding the Add keyboard shortcut step
To manually add an Add keyboard shortcut step:
-
Hover over the + button where you want to add the new step and select Testim predefined steps.
-
Under Actions select the Add keyboard shortcut step.
-
In the step's Properties panel, under the Keyboard Shortcut section, do one of the following:
- If you are using Windows, place the cursor in the Windows field and press the shortcut keys (make sure all keys are pressed at once). The "translation" of the equivalent shortcut in Mac will appear in the Mac field. This translation will be used when the test is executed on a Mac machine.
- f you are using Mac, place the cursor in the Mac field and press the shortcut keys (make sure all keys are pressed at once). The "translation" of the equivalent shortcut in Windows will appear in the Windows field. This translation will be used when the test is executed on a Windows machine.
-
If you don't want the shortcut to be translated to the opposite OS shortcut combination, click the Unsync Fields button.
Updated 3 months ago