Dismissing of system alerts in XCTests all of a sudden stopped working on iOS 15.6

Viewed 28

I had a piece of code that was supposed to dismiss a touch ID alert.

let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
let allowBtn = springboard.buttons["Cancel"]
if allowBtn.waitForExistence(timeout: 2) {
   allowBtn.tap()
}

this code was working fine for years, until it stopped.

The error I'm getting is:

[__NSArrayM insertObject:atIndex:]: object cannot be nil (NSInvalidArgumentException)

and it happens in the .tap() line.

Basically this is what I see, besides the fact that I'm running on iOS 15. https://openradar.appspot.com/radar?id=5520542106910720

Any kind of help is highly appreciated.

0 Answers
Related