override func setUp() {
addUIInterruptionMonitor(withDescription: "App store alert") { (alert) -> Bool in
alert.buttons.element(boundBy: 0).tap()
return true
}
}
func test() {
functionThatCausesAlertToAppear()
XCUIApplication().tap()
}
When I attempt to print a statement within the addUIInterruptionMonitor it doesn't print leading me to believe that the block isn't triggered.
Although this does not solve the issue at hand I've found a workaround from: addUIInterruptionMonitor(withDescription:handler:) not working on iOS 10 or 9