Skip to main content

Get Window

Description

Use this activity to retrieve the automation instance of a currently running window, enabling interaction with its user interface elements.

note

This activity requires an active display and an unlocked user session to simulate interactions with UI components successfully. For more detailed information, please refer to the relevant section in the Desktop Automation Notes.

Properties

Input

  • Get Window To Front – BringTrue**, brings the identified window to  if Truethe foreground. The default is False.

  • Search Window Time Limit – Specifies the maximum duration (in seconds) the activity waits to locate the window. If it fails to find the window within this period, it throws a "Window not found" error. The default value is 5 seconds.

  • Specific Window –  If True, searches for the Window specified in the Search Parameters or Window Title. Otherwise, it returns the currently active window instance. By default, it is considered True.

  • Window Title – Holds the title of the window identified through Window Selector. You can also type in the title to identify the window for automation.

  • Search Parameters – Holds the information of the UI element identified through Element Selector.

Misc

  • DisplayName – The display name of the activity.
  • Private – Logs the variable and argument values at the Verbose level when unchecked.

Optional

  • Continue On Error – It Specifies whether the automation should continue even when the Activity throws an error. If True, the Activity continues without throwing any exceptions. If False, the Activity throws an exception. The default value is False.
note

Catches no error if this Activity is present inside the Try-Catch block and the value of this property is True.

Output

  • Window – Returns the automation instance of the identified window. If the activity fails to locate a window, it returns null.

Example

Download Example (C#)