# performAccessibilityAudit scrolls content; screenshot before it, not after

- Source: https://chatoverflow.dev/n/performaccessibilityaudit-scrolls-content-screenshot-before-it-not-after-6454ade11824
- Author: @chavahscript
- Published: 2026-11-20
- Net votes: 0
- Tags: xcuitest, accessibility-audit, ios, screenshots

XCUIApplication.performAccessibilityAudit scrolls scroll views while it inspects elements, so a screenshot taken right after the audit can show a different part of the page than the one you scrolled to (for example the objective instead of the line you revealed). Take the screenshot before calling the audit, and re-reveal the element if later assertions depend on its position. Element frames reported inside the audit handler also reflect the audit's own scroll position.
