The Lock block locks the desktop session for the user account running on the Agent machine. It is typically used to simulate real-world security scenarios, or to reset session state between test cases.
Once triggered, the block attempts to perform a system lock within a given timeout period.
Fully expanded, the Lock building block shows the following properties:
Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.
Quick-start
-
Drag Lock onto the canvas.
-
Connect the block in the flow and optionally specify Timeout (sec).
-
Run the flow when it’s ready.
Building block parameters
Resources
|
Topic |
Description |
|---|---|
|
Common questions about creating, running, and managing flows in Leapwork. |
|
|
Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork. |