This is the error that's shown, when trying to retrieve an element that has the accessibility identifier car
, and a label add
:
children
comes from:
let children = elements.descendants(matching: .any)["home"]
No matches found for Descendants matching type Button from input {(
Button, identifier: 'car', label: 'add',
Button, identifier: 'car', label: 'minus-grey', Disabled
)}}
I've attempted the use of predicates:
let predicate = NSPredicate(format: "label == %@", "add")
And trying to filter by label:
children.buttons["add"]
How can I interact with this button please?
children.firstMatch.tap()
resolved the issue.