Creating an Image Verification

You can create image verifications in one of the following ways:
  • By using the menu.
  • During recording.

To create a new image verification in the menu, perform the following steps:

  1. Click Silk4J > New Image Verification.
  2. Select the project, to which you want to add the new image verification, and type a meaningful name for the verification into the Name field.
  3. Click Finish. The image verification UI opens.
  4. Click Identify to identify the image that you want to verify in the application under test.
  5. Optional: If you want to recapture the same image from the application under test, because there is a change in comparison to the image that you had initially captured, click Recapture. If you are testing a Web application, you can select the browser on which you want to capture the image from the Select Browser window.
  6. Optional: You can click Verify to test if the image verification works. Silk4J searches for the image in the UI of the AUT, top-down and left to right, and highlights the first matching image.
  7. Optional: You can add an exclusion area to the image verification, which will not be considered when Silk4J compares the image verification to the UI of the application under test (AUT).
  8. Optional: You can set the option Client Area Only to define that only the part of the image that is actually part of the AUT is considered when Silk4J compares the image verification to the UI of the AUT.
  9. Specify the Accuracy Level. The accuracy level defines how much the image to be verified is allowed to be different to the image in the application under test, before Silk4J declares the images as different. This is helpful if you are testing multiple systems or browsers with different screen resolutions. We recommend to choose a high level of accuracy in order to prevent false positives. You can change the default accuracy level in the options.
    Note: When you set the Accuracy Level to less than five, the actual colors of the images are no longer considered for the comparison. Only the grayscale representations of the images are compared.
  10. Save the image verification.
The new image verification is listed in the Package Explorer, and you can use it to check if the image exists in the UI of your application under test.