UI Testing Xcode 7- can't access element within subview
The subviews are not accessible because the parent view is not a container view. From the section Making Your iOS App Accessible from the Accessibility Programming Guide:
From the perspective of accessibility, a custom view is either an individual view or a container view. An individual view does not contain any other views that need to be accessible.
A container view, on the other hand, contains other elements with which users can interact.
To make the subviews accessible the parent view should tell UIAccessibility
that it is an accessibility container by returning NO from -isAccessibilityElement
and implementing the methods of the UIAccessibilityContainer
protocol.