Unable to access iPadOS 18 tab bar in UI Tests in Xcode 16

I have a few UI Tests in my app, and some of them access the tab bar, for instance: XCUIApplication().tabBars.element.buttons.element(boundBy: tabBarButtonCount - 1).tap()

In Xcode 16 though, when performing tests on iPad, this fails, likely due to the new tab bar. How am I supposed to perform this kind of action in iPadOS 18?

iPadOS 18 no longer supports tab bars. I believe it is now a group of Button elements. You should be able to interact with these elements using a .buttons["NameOfTabHere"] query

Unable to access iPadOS 18 tab bar in UI Tests in Xcode 16
 
 
Q