When creating XCUITests, you will use the following command to view the element hierarchy tree: po XCUIApplication()

However, sometimes elements won’t appear in the hierarchy tree until you scroll on the screen. XCode is supposed to scroll to an element automatically even when not in view, but we have not had success with this and it appears this is an open issue still.

So what to do?

SBTUITestTunnel allows you to define custom blocks of codes executed in the application target.

Set up your app to use SBTUITestTunnel and then you should be to have something similar to the following…


Ronell Lukasik

Test Engineer Expert, Dog Mom

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store