Computer Vision
Introduction
You can use the Computer Vision capabilities of our platform to ensure every part of the UI is tested.
If something changes on the screen, you will be alerted in the test results.
This method is also known as Visual Testing or Screenshot Comparison.
You can visually verify your entire page or only certain elements.
Guide
You can use one of these two options:
- Page Matches Screenshot
- Full Page Matches Screenshot
- Element Matches Screenshot
The difference between Page Matches Screenshot
and Full Page Matches Screenshot
is that the first option refers to the viewport, while the second option refers to entire DOM.
You can find those options in the Add Assertion
and Start If Statement
actions.
You must provide a Baseline Screenshot URL
for those options.
How to obtain a Baseline Screenshot URL
:
- Add a
Take Screenshot
,Snipping Tool
orGenerate Full Page Screenshot
step in your test. - Execute the test.
- Get the URL of the screenshot from the Results section.
The Screenshot Tolerance (%)
from the Advanced Settings
can be configured to set the accuracy.
For example, if you select 5%, your assertion will fail if the difference between the screenshots is more than 5%.
If the screenshots have different sizes, the larger one will be automatically resized to match the smaller one.
The logs will display the baseline screenshot, the current screenshot and a third screenshot that highlights the visual differences: