waitForText

abstract fun waitForText(scope: CoroutineScope, xpath: String, textToContain: String, timeout: Long): Deferred<Boolean>

异步等待由XPath指定的元素的文本内容包含期望的子字符串,直到超时。

Return

一个 Deferred<Boolean>,如果文本出现则解析为 true,否则为 false

Parameters

scope

用于执行此操作的协程作用域。

xpath

要等待的元素的XPath。

textToContain

期望包含的子字符串。

timeout

超时时间(毫秒)。