【发布时间】:2020-09-29 19:37:27
【问题描述】:
override func setUp() {
addUIInterruptionMonitor(withDescription: "App store alert") { (alert) -> Bool in
alert.buttons.element(boundBy: 0).tap()
return true
}
}
func test() {
functionThatCausesAlertToAppear()
XCUIApplication().tap()
}
当我尝试在 addUIInterruptionMonitor 中打印一条语句时,它不会打印让我相信该块没有被触发。
【问题讨论】: