use ui window.md

Use UI Window

The Use UI Window building block switches focus to a specific desktop application window during Desktop UI automation. It finds the target window either by criteria you define (such as title, process name, or execution path) or by limiting the search to a provided source element. When the window is found, the block focuses it and exposes a window handle you can reuse in later steps.

Fully expanded, the Use UI Window 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

  1. Drag Use UI Window onto the canvas.

  2. Connect the block in the flow, then set Source and identify the target window:

    • If Source = Define, click Capture and select the target UI window, then review and adjust the captured criteria if needed (for example Where, Method, and Value).
    • If Source = Element, provide the target via Source element so the block uses the injected element information.
  3. Run the flow when it's ready.

Building block parameters

Parameters

Resources

Topic Description
Flows FAQ Common questions about creating, running, and managing flows in Leapwork.
Flows Troubleshooting Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.