Testing with a Modal Alert View
Practicality is a great guide when choosing which test to write next. Since we’re expecting these tests to execute sequentially, it makes sense to undo the change we made in the first test we wrote, back in Chapter 2, Testing Behavior with UI Automation. We removed the search term “coffee”; let’s put it back. This not only tests the behavior a user will normally want to perform, but also puts the application back in a consistent state and ready for the next test in our sequence.
When we first attempted to capture our actions back in Limitations of Capturing Actions, tapping the + button to add a search term popped up an alert view with a focused text field showing the keyboard. UI Automation couldn’t capture ...
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.