Using Wait for window action
Use the Wait for window action to wait for the specified window to open or close before executing the next action.
For example, a Human Resources (HR) personnel automating leave-management tasks might require the attendance application to open before they enter the user credentials. This action enables the automation task to wait until the application window opens.
- In the Actions palette, double-click or drag the Wait for window action from the Wait package.
In the Wait for window field, select the option you want
the automation to wait for:
- Wait for window to open
- Wait for window to close
Select an application window:
Option Steps Application From the drop-down list, select the window title from the open applications.
- The Window title field displays the title
of the application window you have selected.
Insert a wildcard character (*) in the Window title field to search for window titles that can change. You can specify one or more wildcards (*) at the start, middle, or end of the value. For example, to perform an operation on any window that has Microsoft in the title, use a wildcard to indicate any string by adding it before or after the value: *Microsoft*. The bot first searches for the exact window title (Microsoft), and if it does not find a match, it searches for windows with the term Microsoft anywhere in the title.
You can use a regular expression (regex) to identify a window title. Select the regular expression either as a String or Pattern for each regular expression condition and enter the value. By default, the Window title field is case-sensitive. You can enable Case insensitive regex flag to identify a window title that is not case-sensitive.
For example, you can enter the String value as ((\w*)-Notepad for all the window title names starting with
((\w*)-Notepad, or use Pattern such as ((\w)\s)*document-Notepad for only those window titles that match this pattern.
- The Executable field displays the complete path of the executable file to identify the right window.
Browser Select from a list of supported browser tabs.Note: This option supports Google Chrome, Chromium-based Microsoft Edge, and Internet Explorer browsers. Variable Use a window variable to specify the application window you want to use.
- The Window title field displays the title of the application window you have selected.
In the How long you would like to wait for this condition to be
true? field, specify the wait time (in seconds) for the window
to open or close.
If the window does not open or close within the time you specify, the task proceeds to execute the next set of actions.
Select the Throw an exception if wait for window is
unsuccessful option to show an error message and terminate the
bot if the window does not open or close within the specified
amount of time.
If the option is deselected and the window does not open or close within the specified amount of time, the task proceeds with the next action.
- Click Save.