Find an Element by Image

<< Click to Display Table of Contents >>

Navigation:  Actions > Mouse >

Find an Element by Image

Sometimes it is impossible to find the necessary element by the Caption or ClassName. The classic example is the web page in your browser. From point of view of the system, the web page is a single block with drawn on it elements and a text.

This action allows you to find a visible element on the screen by its image and move mouse pointer in the necessary dot of the found element.

Notice: it is necessary the searched element should be visible wholly on any place of a desktop. In another case, the action will not find it. For example: if this element is overlaid with another window or is outside the desktop. In this case, to correct the situation, it is necessary to use the actions Window Command and/or Window Set Size and position, to make the necessary element visible.




General tab

The search Image.

The image of the element which you need to find on the screen. You can select the necessary area on the screen pressing the button "Select the Image on the Screen". The editor will take a screenshot of the current screen and propose to select the necessary area on the received image.


Initial position of Element for Searching.

The position of the top-left corner of an element. The action begins to search the image on the desktop (screen) from this position. The nearer the element is to the initial position, the less time it takes to search for it. Generally speaking, the initial position can be any. If the element is on the screen, the action finds it, but the searching can take several seconds.


Put Mouse Cursor to Position on the Element

Specify the coordinates of the position of the mouse cursor relative to the upper left corner of the found element. You can specify the coordinates in the entry fields or on the image directly by right clicking in the necessary position on the element. You can also select the coordinates of mouse cursor pressing the button "Select Position On the Image".

The selected position is indicated on the image with a cross of an inverse color.



Additional parameters

Generate Error if Object Is Not Found

Switch on this checkbox if you want to generate an error when an object is not found. This option is enabled by default, but you can change it when you need, if it is necessary.


Save True or False to variable

If you want to save the result into a variable, switch on this checkbox and input the variable name. The action will save the value True if the element is found and False if not.



note Related Topics

Move to and Object