Xcode UIAutomation无法与TTTAttributedLabel交互

Ser*_*Kim 2 xcode automation ios appium tttattributedlabel

我正在尝试为我的应用程序编写自动化脚本,我的问题是Xcode UI Automation无法看到TTTAttributedLabel类的元素.获取完整元素树不会显示这些TTTAttributedLabel元素的迹象.我正在使用Xcode 6.1.1

Vit*_* S. 6

By default TTTAttributedLabel isn't an accessibility element. It works as custom container and provides accessibility for links/phones and other detected data. To change this behaviour subclass TTTAttributedLabel and override methods of UIAccessibilityElement protocol.

E.g. return YES in -(BOOL)isAccessibilityElement method and TTTAttributedLabel will work as UILabel