ios - expectationForPredicate doesnt work as expected -
using xcuielement+extension
:
private func waitforexpectations() { mysoberroommateuitests.shared?.expectation(for: nspredicate(format: "exists == true"), evaluatedwith: self, handler: nil) mysoberroommateuitests.shared?.waitforexpectations(timeout: 10) { error in if error != nil { mysoberroommateuitests.shared?.recordfailure(withdescription: "failed find \(self) 5 seconds", infile: #file, atline: #line, expected: true) } } } class mysoberroommateuitests: xctestcase { static var shared: xctestcase? ...//my uitests }
and doesn't work. element exists, prints "failed find..." wrong?
Comments
Post a Comment