August 2013
Intermediate to advanced
200 pages
5h 26m
English
UI Automation logs all its activity to the trace log. Up to this point Instruments has treated our log messages neutrally. We need some way to flag an error, both for the test-runner to know that something went wrong and so we can see the error when we go back over the logs.
Our acceptance test should fail if the table cell isn’t deleted. To check for this, we can tell the automation-scripting interface to wait for the cell to become invalid:
| 02-Behavior/step03/remove_search_term.js | |
| | target.pushTimeout(0.1); |
| | coffeeCell.waitForInvalid(); |
| | target.popTimeout(); |
The pushTimeout and popTimeout methods on the UIATarget are our way of telling the system how long to wait when querying the interface. By default, an unsuccessful query ...
Read now
Unlock full access