waitForSelector

suspend fun waitForSelector(selector: String, timeoutMillis: Long = 0): Element

Waits until an element matching selector appears in the DOM.

Return

Element as soon as it appears.

Throws

ErrorCode.SELECTOR_NOT_FOUND if element does not appear before timeout.