I have a login screen in my app then after login view being dismissed a tabbar appears.
App itself works well in all devices/simulators. UI test works in all simulators except iphone 4s.
I think the reason is after login , it takes way too longer to login screen to disappear. So when I try to access tabbar, it throws an exception.
I tried
let tabBarsQuery = app.tabBars
let predicate = NSPredicate(format: "exists == true")
expectationForPredicate(predicate, evaluatedWithObject: tabBarsQuery, handler: nil)
waitForExpectationsWithTimeout(15, handler: nil)
I get following error
failed: caught "NSUnknownKeyException", "[<XCUIElementQuery 0x7e080d40> valueForUndefinedKey:]: this class is not key value coding-compliant for the key exists."
Why expectation is not working? How can I solve this problem?