We exercise four layout modes in our SwiftUI app and need to drive them in UI tests. While a scene is resized live via xcrun devicectl device appResize, XCUITest's accessibility snapshot appears to carry a stale scale. With 951×669 requested, app.windows.firstMatch.frame comes back as {317, 223}, which is inconsistent with the app's own reading of its window (951×629 from our debug readout). Individual element frames are similarly tiny (a text label reports 2.9×0.9 pt). As a result .tap() appears to target the right element but the sheet never opens. We verified this with debugDescription dumps across two separate attempts, on clean boots. Is this a known limitation of XCUITest during live scene resizing, and is there a supported way to force the accessibility snapshot to refresh after a resize?
Topic:
UI Frameworks
SubTopic:
SwiftUI
1
0
13