Building an iPad Test Suite with Reusable Pieces
We’ve seen how the element tree can vary on the iPad in different orientations. Now we want to apply that knowledge to our test scripts. How much can we reuse? What should we separate?
Because the interfaces are so different between the devices, it is best to make a separate test-suite file for the iPad. We can then pull in the screen objects one by one to figure out what can be reused. Here we’re going to write scripts to detect the device model and orientation and then use these to help the SearchTermScreen object find the elements it needs to do its job.
Finding the Device Model
The UIATarget instance provides the model method that returns a string describing what kind of system the app ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access