GXtest UI Commands - CompareImage

Official Content
This documentation is valid for:


Compares the second image against the first one. Returns the percentage similarity as an integer number, returning 100 if the images are equal. Images must have similar scaling in order for the comparison can be performed.


  • OriginalImagePath (Character): the path of the image you want to compare the new image against.
  • NewImagePath (Character): the path of the image you want to compare against the original.


  • An integer value between 0 and 100 that represents the similarity percentage between the images compared. Equal images return 100.


&driver.Verify(&driver.CompareImage("C:\screenshot1.png","C:\screenshot2.png") > 95, true, "Comparing screenshots")


This command is available since GeneXus 17 upgrade 6.