Get Image similarity Percentage
This is a pre-built Action located under the Custom element. The functionality of this action in Avo Assure to compare and return the similarity percentage between the image specified in the input and the image provided through the image path, and store the result in given dynamic variable.
Syntax
Input Value:<ObjectType>;<VisibleText(optional)>;<Index>;<ImagePath>;<abs(optional)>
<ObjectType> (Required)
Specify the type of object (e.g., Image)
<VisibleText> (Optional)
Enter the visible text on the object
<Index> (Required)
Provide the index of the object inside the page
<ImagePath> (Required)
Path of the image to be compared
<abs>
(Optional)
If the abs is provided, the action is performed with absolute identification using the absolute X path
Note: If abs is included, the action will be executed by matching the object with absolute performance using the visible text.
To skip an optional input value, use an extra semicolon (;).
Output Value
<Dynamic Variable> (Required)
This variable holds the image similarity percentage
<Dynamic Variable> (Optional)
This dynamic variable stores the result of the verification as True or False
Example
Find the similarity percentage between a specified object's image and a reference image.
The Get Image Similarity Percentage action takes the value from the Input Value column (e.g., img;;0;C:\TestImages\ExpectedLogo.png) and compares the actual image on the application with the given image path. The similarity percentage is stored in the {Percentage} variable, while the execution status is stored in the {Status} variable, with the following possible values:
True – if the similarity calculation is successful.
False – if the similarity check fails.

Last updated
Was this helpful?