アプリにログイン画面があり、ログインビューが閉じられた後にタブバーが表示されます。
アプリ自体は、すべてのデバイス/シミュレーターでうまく機能します。UI テストは、iphone 4s を除くすべてのシミュレーターで機能します。
その理由は、ログイン後、ログイン画面が消えるまでに時間がかかりすぎるためだと思います。そのため、タブバーにアクセスしようとすると、例外がスローされます。
私は試した
let tabBarsQuery = app.tabBars
let predicate = NSPredicate(format: "exists == true")
expectationForPredicate(predicate, evaluatedWithObject: tabBarsQuery, handler: nil)
waitForExpectationsWithTimeout(15, handler: nil)
次のエラーが表示されます
failed: caught "NSUnknownKeyException", "[<XCUIElementQuery 0x7e080d40> valueForUndefinedKey:]: this class is not key value coding-compliant for the key exists."
なぜ期待は機能しないのですか?どうすればこの問題を解決できますか?