|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectio.selendroid.android.AndroidWait
public class AndroidWait
An implementation of the Wait interface that makes use of Android Native WebDriver.
| Field Summary | |
|---|---|
static long |
DEFAULT_SLEEP_INTERVAL
|
| Constructor Summary | |
|---|---|
|
AndroidWait()
Constructs an instance with default settings: 100 ms for sleep interval and 1 second for timeout. |
protected |
AndroidWait(Clock clock,
long sleepIntervalInMillis,
long timeoutInMillis)
|
| Method Summary | ||
|---|---|---|
long |
getTimeoutInMillis()
Gets the time limit in milliseconds. |
|
void |
setTimeoutInMillis(long timeoutInMillis)
Sets the time limit in milliseconds. |
|
protected void |
sleep()
Sleeps for a few milliseconds. |
|
|
until(Function<Void,T> isTrue)
Implementations should wait until the condition evaluates to a value that is neither null nor false. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_SLEEP_INTERVAL
| Constructor Detail |
|---|
public AndroidWait()
protected AndroidWait(Clock clock,
long sleepIntervalInMillis,
long timeoutInMillis)
clock - clock to use when measuring the timeoutsleepIntervalInMillis - amount of time to sleep between attempts in millisecondstimeoutInMillis - timeout in milliseconds| Method Detail |
|---|
public <T> T until(Function<Void,T> isTrue)
Wait
If the condition does not become true within a certain time (as defined by the implementing
class), this method will throw a non-specified Throwable. This is so that an
implementor may throw whatever is idiomatic for a given test infrastructure (e.g. JUnit4 would
throw AssertionError.
until in interface Wait<Void>T - the return type of the method, which must not be VoidisTrue - the parameter to pass to the ExpectedConditionprotected void sleep()
public void setTimeoutInMillis(long timeoutInMillis)
timeoutInMillis - time limitpublic long getTimeoutInMillis()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||