[Question] Visual testing: How can I ignore a specific region in Visual testing
[Question] Visual testing: How can I ignore a specific region in Visual testing, say I want to ignore a tag where there is dynamic content like visitor number to the page and timestamp when we visit the page. And there is another scenario where I will get the application number upon the submission of a form, I need to do the visual testing of the page by ignoring that tag which has data of application number.
Thanks in advance and kudos to all for the 1.20version release.
I can see there is a mask feature, will this work here? if this works is there any way that I can see that data without masking it?
Mask will work for you, but it'll hide the content. We were planning a feature like the one you are asking for, that ignores region while comparing, yet shows the content in the screenshot.
That's really great.. Thank you..
Hello,
I have similar requirement. one of our page is having very dynamic data similar like a flight search result which can differ everyday as per date.
can you please help which method can help us? if i use mask , i need to add many css, will above discuss feature ignore region work in this case?
can you please help me in this?
@pavelfeldman , @mxschmitt mask have a solid color. This works great in many scenarios, but if the bounding box of the masked elements changes between the golden and candidate screenshot, Playwright will yield a false negative diff.
Can we add an option to the mask to apply visibility: hidden; on the locators instead or adding some solid color highlights to overlay them ?
Hello @aslushnikov, @pavelfeldman , @mxschmitt I have a case where a mask element has different size between the reference screenshot and the actual one.
Option to ignore the size/pixels difference of a mask element would be great addition.
@mxschmitt @pavelfeldman @aslushnikov I have a similar requirement where the values are dynamic. Is the mask option available in the latest releases?
@pavelfeldman @aslushnikov - Hi team, kudos for the great work so far. Is there any update on the below feature , will it be available in future releases?
Mask will work for you, but it'll hide the content. We were planning a feature like the one you are asking for, that ignores region while comparing, yet shows the content in the screenshot.
Bumping the thread again, any updates on when this feature is likely to rollout? We are using Playwright for our tests and this feature is really needed for us.
Bumbing this thread too. We have many Tables in our Project with changing Datasets. This feature would help us a lot.
I worked around the need to mask a dynamic region by running JavaScript to hide the matching selector. Not ideal, but it worked well enough for my purposes.
Any update on this ? How to ignore region that has dynamic content ?