Skip to main content

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

  1. Try stable DOM, accessibility, text, or attribute-based locators before adding a visual accessor.
  2. Capture a tightly scoped image of the element or region and avoid broad screenshots that can match unrelated UI.
  3. Replay on the target browser and viewport and review results after UI or theme changes.

Last updated: October 19, 2026