Post

Replies

Boosts

Views

Activity

Reply to Vision and iOS18 - Failed to create espresso context.
Dear Apple, Is there ANY workaround to run this on iOS 18 simulator? I am writing XCUITests that are running on the simulator in the cloud, and they need to compare actual image vs expected image for similarity. I first did strict PNG Data comparison but it was too prone to flaking when the slightest change was made to the code or a dependency library. So trying to use the Vision APIs (like CalculateImageAestheticsScoresRequest) for some proxy score I can use to detect image similarity within a tolerance level. Thanks in advance!
Topic: Machine Learning & AI SubTopic: General Tags:
Feb ’25
Reply to XCTest UI Testing; boundElementsByIndex stale the main thread
Thank you so much for this! I was stuck on this failure happening in Xcode Cloud only with this function: func hideKeyboardIfExists(app: XCUIApplication) { if app.keyboards.element(boundBy: 0).exists { app.keyboards.buttons["Hide keyboard"].tap() } } For some reason, the test would fail with "Checking existence of Keyboard (Element at index 0)" and then retry 1 and retry 2 at 30 second intervals which was very mysterious. The keyboard was on screen according to the simulator replay, so it's strange that it would fail to find it, and also strange that it would get stuck in a retry loop instead of simply skipping the if clause. Based on this post, I downgraded the Xcode Cloud workflow to Ventura 13.6.3 and Xcode 14.3.1 and then the simulator to iOS 16.4. (The error was occurring with Xcode Cloud workflow specifying Sonoma 14.1.2, Xcode 15.2 and simulator iOS 17.2.) And voila that error is gone! How come Apple hasn't fixed this yet?
Mar ’24