iOS UI Automation Cheatsheet

I have just learned about Apple's UI Automation testing framework. Unfortunately, I don't have an iOS project to work on at the moment, so I am probably going to forget all about it. This is my cheatsheet. It may not help you at all.

Tutorials

Documentation

Tips

  • Use the Tuneup library: https://github.com/alexvollmer/tuneup_js
  • Assign an accessibilityIdentifier to each UI element.
  • Set UIATarget.onAlert to handle externally generated alerts.
  • Use UIAElement.logElementTree() to figure out how to navigate the visual hierarchy.
  • If a value doesn't change when expected, try adding UIATarget.delay(1);
© 2003-2023 Kristopher Johnson