UI Tests troubles with Xcode 26.1 and Xcode 26.2

Since I moved to Xcode 26.1 and Xcode 26.2 then, my UI tests all fail only for iOS 26+, for both simulator and real device.

Everything worked perfectly with Xcode 26.0, and the code base of the application under test and the test cases are the same. With Xcode 26.0, the tests pass for iOS 26+ and iOS < 26, for both simulator and real device.

In addition, even the Accessibility Inspector tool fails to display the view hierarchy for iOS 26+ with Xcode 26.2. With Xcode 26.0, whatever are the devices and the OS versions, the tool was able to display the view hierarchy. Otherwise the tool is empty even if the device and app are selected.

This failing tests issue occurs both on my local environment and on GitHub Actions runners, excluding the hypothesis I have troubles with my own side.

The error message for failing tests explains the element cannot be found anymore.

Given for example the test case:

    @MainActor
    func testMakeScreenshotsForDocumentation_Button() {
        let app = launchApp()
        goToComponentsSheet(app)
        waitForButtonToAppear(withWording: "app_components_button_label", app)
        tapButton(withWording: "app_components_button_label", app)

        tapButton(withWording: "Strong", app)

        takeScreenshot(named: "component_button_", ACDC.buttonX, ACDC.buttonY, ACDC.buttonWidth, ACDC.buttonHeight, app)
    }

the goToComponentSheet(app) line shows the error:

ActionsDocumentationScreenshots.testMakeScreenshotsForDocumentation_Button()

In details the function:

    /// Opens the page of the components, i.e. tap on the 2nd of the tab bar
    @MainActor func goToComponentsSheet(_ app: XCUIApplication) {
        app.tabBars.buttons.element(boundBy: 1).tap()
    }

with the following error on the app.tabBars line:

.../AppTestCase.swift:157 testMakeScreenshotsForDocumentation_Button(): Failed to tap Button (Element at index 1): No matches found for Descendants matching type TabBar from input {(Application, pid: 1883)}

I have the feeling with Xcode 26.2 (and Xcode 26.1) the view hierarchy is not accessible anymore for both XCUITest framework and Accessibility Inspector tool.

Note I have on my side macOS Tahoe 26.1 (25B78) and my GitHub Actions runner are on macOS 26.0.1 (25A362). When I used Xcode 26.0 I was on macOS Tahoe 26.1 (25B78) .

Any ideas? 🙂

After more investigations, we spotted there is a component we implemented (tab bar) with special behavior which creates such cycle in attributes graph. Thus in that case it breaks the view hierarchy for the accessibility inspector and UI tests, and creates troubles on other navigation components.

We still look in our codebase and will share here which stuff brings the issue with the Xcode 26.2 buildchain.

UI Tests troubles with Xcode 26.1 and Xcode 26.2
 
 
Q