How can I tap a button after check if it is enabled?
I found this sample here, but It didn't work for my case.
Delay/Wait in a test case of Xcode UI testing
Here a part of code:
let app = XCUIApplication()
let button = app.buttons["Tap me"]
let exists = NSPredicate(format: "exists == 1")
expectationForPredicate(exists, evaluatedWithObject: button){
button.tap()
return true
}
waitForExpectationsWithTimeout(5, handler: nil)
but my test fails by tapping of the button. Thanks