3

I am working on a UI Automation script to test a page in my application that contains many cells.

I have an option to edit and save the page. On clicking "edit" an option will appear to delete a cell. I would like to make my script delete or add a cell at this point. How can I get the script to do this?

dtuckernet
  • 7,817
  • 5
  • 39
  • 54

1 Answers1

3

With element index :

myCell.switches().[0].tap();
myCell.buttons().[0].tap();

Or with predicate :

myCell.switches().firstWithPredicate("name contains[c] 'Delete'").tap();
myCell.buttons().firstWithPredicate("name contains[c] 'Confirm'").tap();
Julien
  • 9,312
  • 10
  • 63
  • 86