I am trying to click a button , which is having only Title and it will be changing according to number of products added to the cart.
Here is the properties
I used the following code to do this
let predicate = NSPredicate(format: "title BEGINSWITH[cd] 'Cart'")
let button = XCUIApplication().buttons.element(matching: predicate)
tap(on: button)
But it says element not found.
Any suggestions would be helpful.
And it would be great if you suggest any books for XCUITest.
Aucun commentaire:
Enregistrer un commentaire