let button = app.buttons["BACK TO DASHBOARD"]
let exists = NSPredicate(format: "exists == 1")
expectation(for: exists, evaluatedWith: button) {
// If the button exists, also check that it is enabled
if button.isEnabled {
button.tap()
return true
} else {
// Do not fulfill the expectation since the button is not enabled
return false
}
}
waitForExpectations(timeout: 60, handler: nil)
我可以在Xcode中运行,测试可以在Xcode中成功运行,但是在快速通道扫描期间,出现错误:异步等待失败,超过了时间限制。如何解决此问题?
我有一个处于禁用状态的按钮,一段时间后,该按钮被启用,现在我可以单击已启用的按钮。它可以在Xcode中正常运行,但是在Fastlane扫描中却失败。