Xcode UITest sometimes does not find property of XCUIElement
问题 In my UI tests, the frame property of some XCUIElement are found, but not of others. The accessibility identifiers used below are set in storyboard, and app is initialised in setUp() as XCUIApplication() . Here is the storyboard layout: The two UI elements used in the test are Text Field and Add Button . Here is the relevant code: func test() { // given let mainViewNavigationBar = app.navigationBars[„NavBar“] let navBarHeight = mainViewNavigationBar.frame.size.height print("navBarHeight: \