O'Reilly logo

Test iOS Apps with UI Automation by Jonathan Penn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Talking to the UI through JavaScript

To get the most out of UI Automation, we need to get to know the scripting interface. It exposes a bunch of objects to us that we query and manipulate as representations of the application and what the user experiences on the screen. We saw glimpses of this when we captured some simple actions back in Capturing Our First Script from the Simulator, but we’re ready now to start writing our own by hand.

For better or worse, UI Automation uses JavaScript to do its magic. I know, I know, you’re probably shuddering in fear from the horror stories you’ve heard when dealing with the cross-browser headaches in web development. Don’t worry; it’s not that bad here. This is an isolated JavaScript runtime. There’s ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required