Activities that output an image file can have their results checked using an image comparison algorithm. The simplest of these is a pixel-by-pixel check for equality. More complex algorithms that take an error metric based threshold parameter can also be used. The latter are implemented using the Magick.NET library's Comparemethod.
RPA developers, although QAs can also use it to run image specific scenarios.
Drag and drop the Compare Two Image Files Pixel By Pixel activity from under the UIPathTeam >Imagesnode. Locate the two image files to be used in the comparison.
The activity returns a boolean that indicates whether or not the two inputted files are identical.
Drag and drop the Compare Two Image Files Using Threshold activity from under the UIPathTeam > Images node. Locate the two image files to be used in the comparison. Choose one of the available ErrorMetric values. An explanation regarding metrics can be found here. Set the required Threshold value. This represents the upper bound of the distortion based on the selected ErrorMetric for the two input images to be considered equal. The activity returns returns the computed Distortion. It also returns a boolean that indicates whether or not the two inputted files are equal based on the computed distortion and the Threshold value.