waitForNonUi
fun waitForNonUi( timeoutMs: Long, intervalMs: Long = DEFAULT_INTERVAL_MS, predicate: () -> Boolean): Boolean
Content copied to clipboard
Utility function to wait for a predicate to return true
. The predicate is invoked periodically with intervalMs as interval until the timeoutMs timeout is reached.
This function should not be used for ui/view interactions. For waiting for views, use ViewInteraction.waitFor or waitForView instead.
Return
true
when predicate returns true
before reaching timeoutMs, false
otherwise.