waitForElementPresent

abstract fun waitForElementPresent(xpath: String, timeout: Long): Boolean

通过轮询检查,等待由XPath指定的元素出现在DOM中,直到超时。

Return

如果在超时时间内元素出现,则返回true,否则返回false

Parameters

xpath

要等待的元素的XPath。

timeout

超时时间(毫秒)。