Definition and Usage
Before automating a specific window, you must first retrieve its window object. This command allows you to capture a reference to a window based on different selection methods, which can then be used in subsequent automation actions.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
Get window by | Specify the way to get window | Currently active window, Title or class, Desktop window, Window UI element | Yes | The method used to identify the target window |
Title | Select or enter the window title |
| Conditional | Required when "Title or class" is selected |
Specify window class | Specify window class |
| Optional | Checkbox to enable class-based window selection |
Class name | Select or enter the class name |
| Conditional | Required when "Specify window class" is checked |
Use RegEx | Use regular expressions like ^abc (starts with abc), \d+ (any numbers), or .*.csv$ (ends with .csv) to match specific text formats. |
| Optional | Enables pattern matching for window titles or class names |
Element | Select or capture an element to operate on |
| Conditional | Required when "Window UI element" is selected |
Save window object to | Get a window and store it in a new variable |
| Yes | Defines the variable name to store the window reference |
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 produces a window object variable as specified in the "Save window object to" parameter. This variable can be used in subsequent actions that require a window reference.
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 class names based on previously defined variables. For example, you could use a variable to store a dynamic window title that changes based on user input or application state.
Notes
The "Currently active window" option selects the window that is currently in focus.
When using "Title or class", ensure the window is open before executing this command.
Regular expressions (RegEx) can be useful for matching windows with dynamic titles.
The window object obtained through this command is essential for other window-related operations like clicking elements, reading text, or interacting with UI elements.
If the specified window cannot be found, an error will be triggered according to your error handling settings.