click Template While
suspend fun clickTemplateWhile(template: ITemplate, random: Boolean = true, period: Millis = 100, timeout: Millis = -1, condition: Region<T, R>.(ITemplate) -> Boolean)
Clicks the template if it exists, while a condition holds true For more complex operations please use the devices respective IInput
Parameters
template
Template to use
random
Whether this clicks a random point in this region, defaults true
period
Delay between each check/click
timeout
When timeout is reached this function will stop clicking, use -1 to disable timeout
condition
Boolean condition function
Throws
Timeout Cancellation Exception
If timeout is enabled and function times out