SCREEN Wait for image on screen function

The SCREEN Wait for image on screen function in RPA.

Help CentreBuilding Processes

This article describes the RPA Screen functionality to wait for an image to appear on the screen.

For a full list of available functions, please read SCREEN functions.


Description

The SCREEN Wait for image on screen function waits until a specified image appears on the screen, checking at regular intervals until the timeout is reached.


Setting it up

To use the SCREEN Wait for image on screen function, follow these instructions:

{{popups:rpas/add:action=screen-wait-for}}

Once on a process map:

  1. Navigate to the process where you would like to add the SCREEN Wait for image on screen function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the SCREEN Wait for image on screen option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
Image pathYesText-The file path to the reference image to wait for
TimeoutNoNumber (seconds)30Maximum time to wait for the image to appear
IntervalNoNumber (seconds)0.5Time between each check for the image
ConfidenceNoNumber (0.0-1.0)0.9The minimum confidence threshold for a match
RegionNoArray [x, y, w, h]-Restrict the search to a specific screen region
VariableNoTextlocationThe variable name to store the result

Output variables

The {location} variable contains an object with properties: x, y, width, height, center_x, center_y. Returns null if the image was not found within the timeout period.


Errors

ErrorDescription
Image file not foundThe specified image file path does not exist

Tips

  • This function returns null on timeout rather than raising an exception; check the variable for null to determine if the image was found

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.