Much like every site on the internet, we use cookies to help analyze traffic and improve our website. As outlined in our privacy policy, any information is only used internally and is not shared with outside organizations.
Learn More

Image Element

Overview

An Image Element is rectangular area of the screen or other supported element that was identified using image-based matching techniques. This virtual element can be interacted with through many common Activities just like other, real elements.

Topics:

Working with Image Elements

Since a Web Alert blocks interaction with a page while it is displayed, it is important to handle alerts when they are displayed by a page or playback may fail. For any Activity that expects you to identify an element, refer to the Identification Techniques topic for how to indicate the target element of the Activity will be the Web Alert.

ScenarioInstructions
Click an image To clik on an image, use the Click Activity with the Web Image or Screen Image Element Identification Technique.
Wait for an imge to appear To pause execution while you want for an image to appear, use the the Wait until element displayed Activity with the Web Image or Screen Image Element Identification Technique.

Identification Techniques

The Web Image and Screen Image Element Identification techniques are the only techniques used to identify an Image Element. Refer to the Element Identification topic for more details on how to define the identification technique for an element.

Web and Screen Image Identification

The following configuration is displayed when Web Image or Screen Image is selected for the Identification Technique:

Screenshot Element Image Identification Technique

Note: The example screenshot above is from a pre-release version of AutoBloks and may differ slightly from the current product.

Certain Activities allow you to interact with visual elements on the screen. AutoBloks searches for the image you specify and then allows you to interact with the area of the screen where the image was found. The Web Image search only searches within the rendered page content of the web browser, while Screen Image will search the entire desktop.

You have the option to limit the search area for the image. A Web Image search starts at the upper-left corner of the browser page content, and a Screen Image search starts at the upper-left corner of the screen. From that position, the X Offset will move the search area the specified number of pixels to the right, and the Y Offset will move the search area the specified number of pixels down. Search will begin at this new offset, and the Width and Height then determine the size, in pixels, of the search area from that point.

Properties

The following properties are available when working with a Web Alert:

Property NameDescription
xThe x-coordinate of the upper-left corner of the element relative to the upper-left corner of the container used for image search (e.g. the desktop or browser page). (Read-only)
yThe y-coordinate of the upper-left corner of the element relative to the upper-left corner of the container used for image search (e.g. the desktop or browser page). (Read-only)
screenLeftThe x-coordinate of the upper-left corner of the element relative to the screen. (Read-only)
screenTopThe y-coordinate of the upper-left corner of the element relative to the screen. (Read-only)
widthThe width, in pixels, of the element. (Read-only)
heightThe height, in pixels, of the element. (Read-only)