Finding Elements in the New Idiom

Now that we’ve seen how NearbyMe changed to take advantage of the larger iPad screen, how has the element tree changed? Whenever we’re faced with new interface designs to test, it’s good to do some exploration and then pull the results out into our toolbox as we see fit. Let’s try finding the list of search terms on the iPad and tapping one.

Make sure that Xcode is building for the iPad simulator and press -I to build and launch the app in Instruments. If the simulator was already running, make sure it is in portrait orientation.

Enter this script into the UI Automation instrument to try and tap the search term “coffee”:

06-Universal/step01/automation/sandbox.js
 
"use strict"​;
 
 
var​ target = UIATarget.localTarget(); ...

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.