Post

Replies

Boosts

Views

Activity

Reply to Handling system sheet-style alert in UITest
The modal that appears with the "Call (123) 456-7890" "button" and Cancel button belongs to the Springboard app. So if you attach to com.apple.springboard in your XCUITest you can check for a *label* with the "Call ..." text. For some reason that is actually a label/staticText and not a button.     func testCalling() throws {         // launch our app         let app = XCUIApplication()         app.launch() 				// trigger the app's call to OpenUrl         app.buttons["Call"].tap()         let springBoard = XCUIApplication(bundleIdentifier: "com.apple.springboard")         print(springBoard.staticTexts.allElementsBoundByAccessibilityElement)     }
Nov ’20