I have a UITableview with custom view that appears in the viewForHeaderInSection
delegate method. It appears and functions fine when running the app.
While doing UITests, I've noticed that this custom view identifier doesn't appear in the view hierarchy (unless they're on screen OR nearly on screen). As a result, I cannot UITest headers that are further down in the tableview.
I've found this article from a few years ago https://tiyachows.medium.com/xcuitest-and-its-nuances-3db6fac6f5dc and it says
If the header element is offscreen and then later scrolled into view. The app hierarchy is not refreshed with the id of that header and the UI tests will not be able to access that element.
which doesn't give me confidence that I'm able to UITest my headers.
Is this a known issue? Are there any known work arounds besides manually scrolling to a header?