Image Verifications

You can use an Image Verification to check if an image exists in the UI of the application under test (AUT) or not.

Image verifications consist of an image with some additional information that is required by Silk4J to work with the asset.

To execute an image verification, use the verifyAsset method.

Image verification assets must be located in the Verifications folder of the project. The .verification files must be embedded resources.

An image verification fails when Silk4J cannot find the image in the AUT. In this case the script breaks execution and throws a VerificationFailedException. To avoid this behavior, use the tryVerifyAsset method.

If the locator for the image verification is not found in the AUT, Silk4J throws an ObjectNotFoundException.

You can open a successful image verification in TrueLog Explorer by clicking Open Verification in the Info tab of the verification step. You can open a failed image verification in TrueLog Explorer by clicking Show Differences in the Info tab of the verification step. If a failed image verification would have been successful if a lower accuracy level had been used, the accuracy level that would have succeeded is suggested.