-2

Could you help me? It doesn't work and I don't know why?

enter image description here

Shobhakar Tiwari
  • 7,862
  • 4
  • 36
  • 71
Chalko
  • 1
  • 1
  • If you run your test, is the button you try to tap on, visible on the screen? Do you get any error messages, or logs? – Whakkee Dec 18 '16 at 11:09
  • Yes, it's visible. I don't get any error, but button will be never tapped. – Chalko Dec 18 '16 at 12:19
  • in debug Mode Can you please try "po app.buttons["YourbuttonName"].hittable/exists/". Then check the result if it is returning false or true. Then let me know. – Mahmud Riad Dec 27 '16 at 08:52

1 Answers1

0

I'm unsure as to whether or not this is intended by Apple or not, but Xcode UI tests will not find any view inside the hierarchy UITableView > UIView.

The only way to see views inside a UITableView is to have the table contain UITableViewCell(s), and add whatever views you like inside the cell.

Putting any view other than a cell directly inside a table view will result in any elements contained within the non-cell view not being visible to the UI tests.

Oletha
  • 7,324
  • 1
  • 26
  • 46