我实际上是在尝试列出应用程序中特定屏幕上的所有可用控件,所以我想知道target.logElementTree()到底从哪里检索信息?或者如何从视图控制器中检索特定屏幕上所有可用的控件?
我在仪器中使用Xcode6.3.2,UIAutomation。
感谢您抽出时间从头到尾看完。
发布于 2015-06-18 03:24:29
目前,这是由Instruments中的一些私有代码提供的。
要访问所有可用元素,请参阅Apple's documentation on UIAutomation,特别是the section on determining the element hierarchy。
https://stackoverflow.com/questions/30747955
复制相似问题