EarlGrey
EarlGrey copied to clipboard
`grey_text` matcher does not work for SwiftUI `Text` view
The grey_text
matcher does not work for a SwiftUI Text view. This is demonstrated by the UI testing target defined here which tests the application target defined here.
I followed the White-Boxing guides and created a helper bundle here. I am able to tunnel calls to GREYHostApplicationDistantObject
and define my own custom matchers. However, I am unsure how to define a matcher that matches the text in a SwiftUI Text view. At runtime, the element which corresponds to the SwiftUI Text view is of type SwiftUI.AccessibilityNode
. How can I get the text value out from this SwiftUI.AccessibilityNode
object?