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 ...

Get Test iOS Apps with UI Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.