Importance of Screenshot Stabilization in Visual Testing
On This Page Challenges faced without Screenshot / Snapshot StabilizationMay 09, 2026 · 5 min read · Testing Guide
The Optical Testing or Visual Validation technique is the most popular way to essay the user interface, such as mode, UI Elements, alinement, fonts, etc. doesn & # 8217; t require advanced technical skills, the issue are easy to rede and analyse. works by comparing two screenshots pixel-by-pixel; even if there is pixel-level modification, the ocular examination differentiate the test as betray or conflict will be highlighted. The major challenge in optical examination is the stabilisation of screenshots that needs a strong algorithm in the background. Screenshot stabilization is a proficiency or an algorithm that helps freeze the animation and other dynamic elements to trim false failure. Let & # 8217; s understand with an example the grandness of it all: We have a page withGIF image; let & # 8217; s see what hap with and without the stabilization feature. The Visual Validation Test Result – Without Snapshot Stabilization Feature Image:Output of visual test with no screenshot stabilization The above results from a that doesn ’ t have a screenshot stabilization feature. There are instrument in the market that do the screenshot stabilisation before capturing the snapshot and processing the screenshot as per the given resolution, producing the output. is one such tool that freezes the animations and dynamic substance and make accurate output even if you have GIFs or animation. Let & # 8217; s run the same visual test with the Percy tool, which has a screenshot stabilization feature. Image: Optic testing result with Percy tool In the above ikon, you can see that Percy has markedNo Changes,which means there are no departure. Since Percy has an in-built stabilisation mechanics, it produces accurate yield. The above is an illustrated model of the grandness of screenshot stabilisation in visual examination. Tools like Percy have in-built stabilization features; however, in some scenarios, that may not be sufficient. For example, if we have dynamic data where data change every second (Example Date and Time), so we might experience to set some custom choice to brace the screenshots. SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses. There are multiple options to steady the screenshots for dynamic message; for example, if you have the Date and time on the website, you can set the fake date before trance screenshots. Tools like provide an option to set a fake appointment. There are also other options to fake the data or response, you can use mock API or fake the responses; you can also write a impost script to replace the rendered dynamical content with a still one. The component or message changing dynamically may not be the significant characteristic, so you can hide that completely using the hide feature of the tool you are employ. Example of Dynamic element hiding in Percy and You can see the difference, in the above image; Percy provide an option to hide the content while occupy the shot. The before-hiding image shows the Clock, but the clock has disappeared after adding the code to hide dynamic content. Consider you have a scenario whenever you visit the website color of some component or webpage changes dynamically. A scenario like this stymy the ocular testing. In such cases, you can set the unchanging color by use the impost CSS styling choice. Many tools provide such features; below is the exemplar of Percy The above codification put the ground of the site body to light grey. Similarly, you can modify any styles which CSS indorse. This help to stabilize any dynamic content variations because of CSS. Read More: In some scenario, you may not want to prove the entire site; instead, you might be interested in only a single component or set of components. Testing only mandatory components helps to reduce mistaken failures. The advanced ocular testing tool cater such options where you can specify the HTML locater to capture. Example of Percy captures the single element 5. Sensitivity Options The sensitiveness is also called the door, the comparison level for the screenshot. Generally, sensibility values will be hard-and-fast, recommended, and relaxed. The relaxed choice compares the screenshot in a relaxed way by cut minor differences in the screenshots. The sensitivity option is least recommended as there is a high luck of ignoring valid visual defects. Percy render the sensibility option under the Project scene. Closing Notes There is no doubt that visual testing is the faster and more effective way to test user interface. However, the efficiency depends on the tool you choose. The should create accurate and reliable output, which should help to reduce manual verification. Screenshot stabilisation is one of the significant features many creature don & # 8217; t ply, as this require a strong and complicated algorithm in the backend. The screenshot stabilisation helps to reduce false failure. The impost stabilisation option aid configure the webpage & # 8217; s active content, which the tool can not do by default. There are many open rootage plugins for almost every tool however; sometimes, the outcome is not stable and dependable. A tool like Percy actively accumulate user feedback and improves functionality, making tests more stable, accurate, and reliable. # Ask-and-Contributeabout this topic with our Discord community. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.Importance of Screenshot Stabilization in Visual Testing
Challenges faced without Screenshot / Snapshot Stabilization
Importance of Screenshot Stabilization
Customize Screenshot Stabilization in Visual Testing
1. Screenshot Stabilization for Dynamic Content
// const now = new Date (2021, 3, 14) // month is 0-indexed // cy.clock (now)
2. Hiding Dynamic Content
cy.percySnapshot ('Hide Content ', {percyCSS: ` # clk_box {display: none;} `});3. Modifying the CSS Styles
cy.percySnapshot ('Custom Styles ', {percyCSS: ` body {ground: lightgrey;} `});4. Capturing Individual Elements
percySnapshot ('Single Element ', {setting: 'someselector '});Good Practices for Visual Testing
Related Guides
Automate This With SUSA
Test Your App Autonomously