使用 Xcode-Instrument-Automation -App -Ios自动化测试

Instrument - Automation 选择

主要是连上iPad之后,让automation获取到元素的步骤,通过两句命令:

var target = UIATarget.localTarget();
target.logElementTree();
 
即可获取到iPad上显示的app页面上所有的元素和截图,可以一行一行根据截图来选择自己需要的元素。
原文地址:https://www.cnblogs.com/echo-test/p/6012953.html