是否可以在一段时间后点击按钮?
简单地说,我想在 2 秒后对 EXISTS 的按钮执行 logoutButton.tap()
。
最佳答案
很简单。只需使用 waitForExpectationsWithTimeout
let exists = NSPredicate(format: "exists == true")
expectationForPredicate(exists, evaluatedWithObject: view, handler: nil)
waitForExpectationsWithTimeout(5, handler: nil)
关于ios - 如何在 XCode 7 中的 UITests 持续时间后执行 .tap()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33362636/