page.title=UiWatcher parent.title=uiautomator parent.link=index.html @jd:body
Represents a conditional watcher on the target device. To learn how to register a conditional
watcher, see UiDevice.registerWatcher()
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
checkForCondition()
The testing framework calls this handler method automatically when the framework
is unable to find a match using the
UiSelector . |
The testing framework calls this handler method automatically when the framework is unable to find a match using the UiSelector
. When a match is not found after a predetermined time has elapsed, the framework calls the checkForCondition() method of all registered watchers on the device. You can use this method to handle known blocking issues that are preventing the test from proceeding. For example, you can check if a dialog appeared that is blocking the the test, then close the dialog or perform some other appropriate action to allow the test to continue.