Definition and Usage
This command activates and brings to the foreground a specified window. It allows you to switch focus to a particular window during automation, making it the active window for subsequent operations.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
Get window by | Specify which window to activate | Window object, Title or class, Window UI element | Yes | Determines how to identify the target window |
Window | Select a window object that was obtained earlier | - | Yes (for "Window object") | Used when a window object has been previously stored |
Title | Enter title of the window | - | Yes (for "Title or class") | The window title to match |
Specify window class | Specify window class | - | No | Additional option to refine window selection |
Class name | Enter class name of the window | - | Yes (for "Specify window class" ) | Used to identify windows by their class name |
Use RegEx | Use regular expressions like ^abc (starts with abc), \d+ (any numbers), or .*.csv$ (ends with .csv) to match specific text formats | - | No | Enables pattern matching for window titles |
Element | Select or capture an element to operate on | - | Yes (for "Window UI element" is) | Used to identify a window by UI element |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
This action doesn't produce any variables.
Using Variables in Conditions
You can use variables in parameter fields where the {x} icon appears. This allows you to dynamically specify window titles or objects based on previously defined variables. For example, you could use a variable to store a window title that changes based on user input or system conditions.
Notes
Before using this command, ensure that the target window exists and is not minimized or hidden.
If using the "Title or class" option, partial matches may work, but using the exact window title is more reliable.
When using regular expressions with the "Use RegEx" option, make sure your pattern correctly matches the intended window titles.
If multiple windows match the specified criteria, the most recently active one will typically be selected.
Some windows may have security restrictions that prevent them from being activated programmatically.