Accessibility Inspector is a self-contained detection tool in Xcode that makes it easy and quick to get the hierarchy of individual control elements in the iOS app. With this hierarchy, we can automate it in uiautomation.
Open the tool in Xcode->open Developer tool->accessibility inspector, which requires the ability to set accessibility permissions in the security and privacy of your Mac, allowing the tool to control your computer.
When turned on, you will find that the detection tool is suspended at the front of the screen and can detect the hierarchy of all the interfaces on your computer screen, including apps in your Mac, browsers, IOS apps, and more.
Below, this is the hierarchy in Chrome:
As for the detailed information in the structure, it is not analyzed.
Below, we look at the use of the tool in the iOS app and hover the mouse directly over the iOS emulator, and the results will be automatically generated in Accessibility Inspector.
Once the hierarchy view has been obtained, you can refer to the usage of the previously recorded UIAutomation (http://blog.csdn.net/icetime17/article/details/42193321), To easily get the controls in your app and manipulate them to automate your test.
Use accessibility inspector to detect the hierarchy of control elements in iOS apps