Reputation: 309
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" 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:
I got stuck here for quite a while and it will be highly appreciated if anyone can help me out.
Upvotes: 1
Views: 457
Reputation: 309
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.
Upvotes: 1