You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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: