Delay/Wait - How to
use
Examples
Delay
Wait For Window
Wait For Screen Change
Delay
If you want to wait for some time before the next action in the task, you can insert a delay.
You can either insert a specific delay by providing a number and selecting
milliseconds or seconds OR you can insert a random delay by providing the upper
and lower range of numbers for Automation Anywhere to generate a random number in the given
range.

Wait For Window
You can also use the Wait For Window command to wait for a particular window to open
or close and then perform the next action.

Wait For Screen Change

You can use this option to wait for a rectangular image on the screen to
change before performing subsequent actions.
- Let's say when you run the task, you want to wait for
a portion of your screen or an area within your application to change on the
screen before performing the next set of actions like mouse clicks or
keystrokes and that is the only way to identify that something has happened in
that window. It happens with a lot of windows where the text is not in a
selectable format to verify anything.
- In that case, you can mark that area using the capture
button in this option. It will show you the picture in the preview image
square so that you can verify if you have captured the right image.
- This image is not used to compare when the task runs.
It is only to verify when you capture the image while inserting the command
from editor.
- When the task runs and it comes to this command, Automation Anywhere takes the screenshot of the
area marked by the co-ordinates relative to the screen or window
selected in this command. Let's call it imageA.
- It will wait for the amount of seconds you specified
before it starts comparing the images to imageA. After that it continuously
compares the image in marked rectangular section to imageA. As soon as the
imageA and the current image differ, it stops comparing and goes to the next
command.
- However, if the images do not differ in the specified amount of time then
it either stops the task or goes to the next command as specified by you.