Post

Replies

Boosts

Views

Activity

Reply to UITests with SwiftUI Failing to Find Off-Screen Elements in Xcode 14+
I also see the behaviour that JShroyer describes: it's like a lazy loading mechanism. here it's just a list with 6 entries, so it is not only valid for long lists. The problem is: It's flaky! One time it works, one time not. Using print(XCUIApplication().debugDescription) helps: because there I can see, that the off-screen element is not listed. I now drilled it down: here it seems to be just the the iPhone 14 Simulator that doesn't work. And it's not just my local simulator, we have the same problem on the CI simulator. Using iPhone 13 (same size class and traits) works like a charm.
Jan ’23