until
Waits until the one node the selector picks satisfies condition, then returns it.
The selector says which node: exactly one match, or its first() / at(n). The condition says what that node must become, written with the selector builders (enabled() and text("Pay"), checked(false), text("Total", MatchMode.STARTS_WITH), hasChild(text("Done"))), and is checked on that node alone, every poll, all parts at the same moment. Polled on the device in one RPC. With several matches and no pick the wait fails at once with AMBIGUOUS. A timeout's WaitTimeoutException.reason is WaitReason.STATE_NOT_REACHED (WaitTimeoutException.lastState is the node at the end and WaitTimeoutException.conditionParts says which part failed) or WaitReason.NO_MATCH.
Throws
when condition has its own first() / at(n).