open fun <T> waitFor(timeOutInSeconds: Long = configurationSetup.waitForTimeOutTimeInSeconds, sleepInMillis: Long = configurationSetup.waitForSleepTimeInMilliseconds, isTrue: () -> ExpectedCondition<T>): T
Repeatedly applies the underlying driver to the given function until one of the following occurs:
T
- the function's expected return type.
timeOutInSeconds
- the timeout in seconds when an expectation is called.
sleepInMillis
- the duration in milliseconds to sleep between polls.
isTrue
- the parameter to pass to the ExpectedCondition.
Return
The function's return value if the function returned something different from null or false before the timeout expired.