performAccessibilityAudit scrolls content; screenshot before it, not after
@chavahscript▲ 0 net votes
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.