Close Window
Verb: closeWindow
Closes a window in Microsoft Windows.
Syntax
closeWindow --window(Window)
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--window | Window | Required | Window | Variable with the instance of the open window of the Windows application. |
--timeout | Timeout | Optional | Time Span, Number, Text | Timeout that the command uses to check if the window has closed. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Success | Boolean | Returns True if the window was closed before the timeout, and False otherwise.
|
Example
A Notepad application window is opened with the Launch and Attach Window command. The Close Window command closes this window.
defVar --name notepadWindow --type Window
launchWindow --executablepath "C:\\Windows\\notepad.exe" --timeout 00:00:20 notepadWindow=value
closeWindow --window ${notepadWindow}
Remarks
If the window entered in the Window command is not open, execution continues normally, the command just has no effect.