Graphic zone recognition
Agilitest uses graphic zone recognition in two ways:
- To perform actions such as clicking, text entry, etc. on recognized zones.
- To carry out graphic recognition checks on elements with the verification action.
Graphic recognition is performed when the "Capture" mode is open.
To do this, click on the "Capture" button below the project explorer.
Once the capture window is open, you can capture a graphic element using your mouse selection.
Hold down the left click of your mouse and define an area you want to capture,
Drop your element in the editor to the show captured element.
Three options are available:
- Open the element tree to generate a "Locator", i.e. a targeted element.
- Copy the image to your clipboard
- Save the image to your computer
Elements tree
When you click on "Element tree", Agilitest will display the software structure, or DOM, down to the smallest element that completely contains the selected image.
This operation will ensure unique identification of your image, which may be printed in several places in your software.
💡 Tip
It's best to select one or more attributes from the element tree. Otherwise, you may end up with an image present in several places in your application, as demonstrated by the "Statistics" tool.
When the parent elements and attributes of your graphic object are selected, an additional "Locator" is generated. Simply drag and drop your element into a new action in the Agilitest editor.
After dropping your element into the editor, a new action is generated and displayed.
This action contains a link to an image saved in your project's resources, which can be accessed from the Explorer's "Resource files" view.
Image recognition menu
The image recognition menu you get by clicking on the image in the editor allows you to add the following information:
- Use of a locator that is not unique to identify occurrences, selecting the image by an index in a unique way.
- You can influence the graphic recognition tolerance and the algorithm used. For the moment, only the ATS algorithm is available, and we recommend that you retain the default tolerance (0.5%).
Graphic affirmations
Occurrence checks will enable you to add checks on the presence of graphic elements in your applications, count them, generate timeouts, etc, by simply dropping the graphic element into an "Occurrence check" action.
To perform them, simply drop the graphic element into an "Occurrence check" action.
However, Agilitest will control images that are actually displayed on the page (unlike a DOM approach, which can potentially trace non-displayed objects).
In this case, you have to ensure that the window is correctly sized and displayed to allow full recognition of the elements.