Use Visual Accessors for Web Testing
Use this article when web tests need visual matching because a stable DOM locator, accessibility locator, or text locator is not available.
Validation workflow
- Try stable DOM, accessibility, text, or attribute-based locators before adding a visual accessor.
- Capture a tightly scoped image of the element or region and avoid broad screenshots that can match unrelated UI.
- Replay on the target browser and viewport and review results after UI or theme changes.
Last updated: October 19, 2026