Swift - UI Test: Could not "Allow" permission popup on UI Test (xCode 13.3)

339 views Asked by At

I will try to this code but could not Allow permission.

let popup = XCUIApplication(bundleIdentifier: "com.apple.springboard")
if isExists(popup) {
    let button = popup.alerts.firstMatch.buttons["Allow"]
    button.tap() //<-- *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil (NSInvalidArgumentException)
}
0

There are 0 answers