Web Image-based Testing
Katalon Studio provides an image locator method to associate test objects with images. With this method, you can perform image-based testing when elements of the web application under tests (AUT) retain their appearance even though the underlying structures have changed.
This guide shows you how to configure image-based object recognition, capture screenshots, and reduce the chance of failures in image-based testing.
Requirements
- An active Katalon Studio Enterprise license.
Enable Image-based object recognition
Image-based object recognition is enabled by default for web test execution in Project Settings > Self-Healing > WebUI.
Capture screenshots for object recognition
Here we use the Spy Web Utility to capture screenshots. Follow these steps:
Add image locator to objects
Reduce image-based testing failures
Since reliable image-based testing depends on image comparison, you can reduce the chance of failures in two ways:
-
Screen Resolution: The screen resolutions of screenshot capturing devices and test executing devices can affect the accuracy of image comparison. We recommend capturing screenshots and executing tests on the same device for the best results.
-
Capture tool: We recommend using built-in capture tools in Web Recorder and Spy utility since they automatically resize the captured images.
See also: