This article will explain how to create an automated visual test for a page that contains dynamic content.
For your convenience please find the video guide below:
Some of the tests that you will create might contain a dynamic content, causing the text and images to change every time the page gets refreshed:
If we compare our test to its baseline, it will fail, as a result of mismatches that were detected:
In order to resolve this issue, there are two available approaches:
1. Creating an Ignore region: by creating the ignore region, you can specify regions that will be ignored in the visual comparison.
To use the ignore region you simply click on the designated button and select the region (e.g images, text) you wish to omit from your visual test, as you can see below:
You can find the full ignore region guide here.
2. Changing the match level to layout option, as you can see below:
Layout is a great solution for pages that contain dynamic content, by allowing us to verify the layout of the page regardless it's specific content.