xcode: Timestamped Event Matching Error: Failed to find matching element

后端 未结 3 973
离开以前
离开以前 2021-01-03 17:17

I\'m trying to record some XCUITesting functions. I get this error.

Timestamped Event Matching Error: Failed to find matching element

Is t

3条回答
  •  感情败类
    2021-01-03 18:10

    I was having the same problem for a long time on a very complex app as well: The key is all in isAccessibilityElement being set to YES. UI testing and accessibility go hand-in-hand. The way I think about it is that the device needs to be able to interact with the element, since ostensibly, the user wouldn't be able to.

    I did this twice:

    1. In cellForRowAtIndexPath - cell.isAccessibilityElement = YES

    2. In awakeFromNib in a UITableViewCell subclass - self.isAccessibilityElement = YES

    Hope that helps, and good luck!

提交回复
热议问题