How to perform Keyboard shortcuts in the Leapwork flows
How to perform Keyboard shortcuts in the Leapwork flows
Introduction
While creating flows in Leapwork, many times users come across scenarios that require them to make use of keyboard shortcuts to perform some keystroke operations. This approach is very useful in the scenarios when functionality that is to be achieved using multiple blocks can be achieved by keyboard shortcuts thus reducing the complexity as well as the size of the flows along with contributing to the test flow execution speed.
To fulfill this kind of case, Leapwork has a dedicated category of Mouse and Keyboard which contains blocks like Type Text, Press Key and Release Key to perform the keyboard operations. Using these blocks, keyboard shortcuts can be performed as shown below.
Type Text Block
Type Text block can be used to perform keyboard shortcuts along with the textual values in combination. This can be done by clicking on the Capture to capture keystrokes. This makes it easy to use special keys and key combinations such as CTRL+C, ENTER, etc.
Press Key Block
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. Keyboard shortcuts can be performed by clicking on the Capture button to capture the keystrokes.
Type Web Text Block
A Type Web Text building block is used to type any text and captured keystrokes into an already opened browser window.
Note: This block can only be used for web applications to perform the keyboard shortcut on the element captured in the Type Web Text block.
For any clarification, contact our Priority Support.