public interface Poller
Modifier and Type | Interface and Description |
---|---|
static interface |
Poller.ConditionChecker<T>
Used by Poller to check conditions.
|
static interface |
Poller.ListenerRemover
Interface for removing a listener.
|
static interface |
Poller.PollingListener
Interface for a callback to be invoked when
pollFor(io.appium.droiddriver.DroidDriver, io.appium.droiddriver.finders.Finder, io.appium.droiddriver.Poller.ConditionChecker<T>) polls. |
static interface |
Poller.TimeoutListener
Interface for a callback to be invoked when
pollFor(io.appium.droiddriver.DroidDriver, io.appium.droiddriver.finders.Finder, io.appium.droiddriver.Poller.ConditionChecker<T>) times out. |
static class |
Poller.UnsatisfiedConditionException
Thrown to indicate condition not met.
|
Modifier and Type | Field and Description |
---|---|
static Poller.ConditionChecker<UiElement> |
EXISTS
A ConditionChecker that returns the matching
UiElement . |
static Poller.ConditionChecker<java.lang.Void> |
GONE
A ConditionChecker that does not throw only if the matching
UiElement is gone. |
Modifier and Type | Method and Description |
---|---|
Poller.ListenerRemover |
addListener(Poller.PollingListener pollingListener)
Adds a
Poller.PollingListener . |
Poller.ListenerRemover |
addListener(Poller.TimeoutListener timeoutListener)
Adds a
Poller.TimeoutListener . |
long |
getIntervalMillis() |
long |
getTimeoutMillis() |
<T> T |
pollFor(DroidDriver driver,
Finder finder,
Poller.ConditionChecker<T> checker)
Polls until
checker does not throw
Poller.UnsatisfiedConditionException , up to the default timeout. |
<T> T |
pollFor(DroidDriver driver,
Finder finder,
Poller.ConditionChecker<T> checker,
long timeoutMillis)
|
void |
setIntervalMillis(long intervalMillis)
Sets intervalMillis.
|
void |
setTimeoutMillis(long timeoutMillis)
Sets default timeoutMillis.
|
static final Poller.ConditionChecker<UiElement> EXISTS
UiElement
.static final Poller.ConditionChecker<java.lang.Void> GONE
UiElement
is gone.<T> T pollFor(DroidDriver driver, Finder finder, Poller.ConditionChecker<T> checker)
checker
does not throw
Poller.UnsatisfiedConditionException
, up to the default timeout.checker
<T> T pollFor(DroidDriver driver, Finder finder, Poller.ConditionChecker<T> checker, long timeoutMillis)
checker
Poller.ListenerRemover addListener(Poller.TimeoutListener timeoutListener)
Poller.TimeoutListener
.Poller.ListenerRemover addListener(Poller.PollingListener pollingListener)
Poller.PollingListener
.void setTimeoutMillis(long timeoutMillis)
long getTimeoutMillis()
void setIntervalMillis(long intervalMillis)
long getIntervalMillis()