1

I am writing Xcode UI test cases for a tableview. My code (Objective-C) is something like this

XCUIElement *elementCell = app.cells[@"AccessibilityIdentifierOfTheCell"];
XCTAssertTrue(elementCell.exists); // this assert passed
[elementCell tap]; // !!!??? crashed here

The testing crashes at the "tap" method.

I also tried Xcode's "Recode UI Test" enter image description here to see how Xcode would catch the "tapping" behaviour in UI testing but, unfortunately, when I tapped on the cell the testing crashed as well and Xcode popped up this: enter image description here

I got stuck here for quite a while and it will be highly appreciated if anyone can help me out.

kuang
  • 309
  • 1
  • 11
  • Duplicate: http://stackoverflow.com/questions/36597862/xcode-timestamped-event-matching-error-failed-to-find-matching-element – emoleumassi Aug 26 '16 at 13:33

1 Answers1

1

Right after the question was posted I went back and tried again and, weirdly, it worked. I changed nothing. It may be that Xcode UI testing functionality is not steady yet.

Sorry for that.

kuang
  • 309
  • 1
  • 11