Wait for Window to Close
Verb: waitWindowClose
Waits for a window to close, according to defined timeout.
Syntax
waitWindowClose --window(Window) [--timeout(TimeSpan)] (Boolean)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--window | Window | Required | Window | Window that is awaited to close. |
--timeout | Timeout | Optional | Time Span, Number, Text | Maximum waiting time to execute the command. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Success | Boolean | Returns "True" if the window was closed, or "False" otherwise. |
Example
Starts the notepad, waits 5 seconds and it checks if the window was closed, then it shows the result in the IBM RPA Studio output console.
defVar --name notepadWindow --type Window
defVar --name result --type Boolean
launchWindow --executablepath "notepad.exe" notepadWindow=value
waitWindowClose --window ${notepadWindow} result=value
// The result displays in the console changes according to the window interaction, if it is closed by the user, the result is "True", otherwise it is "False"
logMessage --message "Closed window: ${result}" --type "Info""