Playwright · Middle · Question 31 of 75
How do you hide a changing element, like a clock, in a screenshot test?
- 1Lower the image quality to ignore it
- 2Use the
maskoption with its locator - 3Delete the element before every test
Show the answer
Correct answer: Use the mask option with its locator
Explanation
Masked areas are covered with a box. animations: 'disabled' and maxDiffPixels also help reduce noise.