-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with SwiftUI Lists? #15
Comments
I actually haven't tested Hammer using Hammer with SwiftUI at all! I'm glad to hear it's working but I don't know why the identifier would not work when the label does |
Adding initial SwiftUI support here: #19 Let me know if this matches what you were doing. I did verify finding a view by its identifier doesn't really work. I checked the view hierarchy and there doesn't seem to show all the subviews though, but maybe I'm looking in the wrong place. Can you share your accessibility label method? |
I wonder if you ever got Hammer to work with SwiftUI Lists. We've played around with the .accessibiliy(identifier:) View modifier and that has worked for creating UI Tests within Xcode, however when we tried to locate the Lists with Hammer we seem to have found that no UIViews in the view hierarchy are given the accessibility identifiers we gave to the List Views.
Just to move forward, I've used the .accessibility(label:) view modifier as well and written an extension on UIView which recursively hunts all subviews for the first UIView matching a given test and tested the UIView.accessibilityLabel instead. At least once the UIView is identified we can then use it with Hammer.
Have you folks tried hunting SwiftUI-built objects much and had you found Lists don't play nicely?
The text was updated successfully, but these errors were encountered: