Knowledge base
Tips and tricks Best practice guides, FAQ & more
Find tutorials, guides and use case examples in the
Learning center
A Press key building block is used to press and hold a key on the keyboard. This can be useful for instance when needing to hold down a CTRL key and drag the mouse. It is typically used in combination with the Release key block. It should be noted that all keys are also released automatically when a case run is stopped or when a Type text block is used.
See the Press and hold a key lesson for an example of how this works.
Fully expanded, the Press key block shows the following properties:
The green input connector in the header is used to trigger the block to start executing, and the key to be pressed and held until released.
The green output connector in the header triggers when the key has been pressed.
The title of the block (“Press Key”) can be changed by double-clicking on it and typing in a new title.
A single key or a combination of keys to be held and pressed on the keyboard. Can only be entered by clicking the “Capture” button (see below).
Click to capture key combinations into the Keys value. This makes it easy to press and hold special key combinations such as CTRL+C, ENTER, etc.
Delay the key press until there has been no movement on the screen for a specific period of time — for instance 2 seconds.
This is useful when waiting for a screen update to occur, for instance a page loading in a browser window. Regardless of this checkbox, the key press will occur after waiting a maximum of 30 seconds.
The number of seconds the screen must have seen no movement before proceeding.
Updated February 1st 2017.
©2024, Leapwork. All rights reserved.