xcode:时间戳事件匹配错误:找不到匹配元素 [英] xcode: Timestamped Event Matching Error: Failed to find matching element

查看:37
本文介绍了xcode:时间戳事件匹配错误:找不到匹配元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试记录一些 XCUITesting 函数.我收到此错误.

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

Timestamped Event Matching Error: Failed to find matching element

这是 Xcode 错误和/或我的 UI 复杂性的问题吗?

Is this an Xcode bug and/or issues with the complexity of my UI?

推荐答案

我在一个非常复杂的应用程序上也遇到了同样的问题很长时间:关键在于 isAccessibilityElement 正在设置是.UI 测试和可访问性是相辅相成的.我的想法是设备需要能够与元素进行交互,因为从表面上看,用户无法做到.

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.

我做了两次:

  1. cellForRowAtIndexPath - cell.isAccessibilityElement = YES

UITableViewCell 子类中的 awakeFromNib - self.isAccessibilityElement = YES

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

希望能帮到你,祝你好运!

Hope that helps, and good luck!

这篇关于xcode:时间戳事件匹配错误:找不到匹配元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆