Skip to main content

Close window

Sophie avatar
Written by Sophie
Updated over 2 weeks ago

Definition and Usage

This command allows you to close windows using different identification methods including window objects, title/class names, or UI elements.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Get window by

Select a window to close

Window object, Title or class, Window UI element

Yes

Determines how the window will be identified

Window

Select a window object that was obtained earlier

Yes (if "Window object" is selected)

Title

Enter the title of the window to close

Yes (if "Title or class" is selected)

Specify window class

Specify window class

No

Optional checkbox

Class name

Enter class name of the window

Yes (if "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.

No

Optional checkbox

Element

Select or capture an element to operate on

Yes (if "Window UI element" is selected)

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 set window titles or pass window objects obtained from previous steps in your workflow. Ensure that the variable type matches the expected parameter type for proper execution.


Notes

  • The "Window object" option requires a window object variable obtained from previous commands like "Get window" or similar actions.

  • When using "Title or class" option, you can use regular expressions for more flexible matching by checking the "Use RegEx" option.

  • If the specified window cannot be found or accessed, an error will occur unless handled by the error handling settings.

  • Multiple windows with the same title may cause unpredictable behavior; be as specific as possible when identifying windows.

Did this answer your question?