Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)

UiWatcher

Represents a conditional watcher on the target device. To learn how to register a conditional watcher, see UiDevice.registerWatcher() .

Summary

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 .

Public Methods

public abstract boolean checkForCondition ()

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.

Returns
  • true to indicate a matched condition, or false if no matching condition is found