select

open suspend override fun select(selector: String, timeout: Long): Element

Selects an element in the DOM using a CSS selector.

This method waits for the element to appear in the DOM, retrying every 500 milliseconds until the timeout is reached.

Return

The selected Element if found before the timeout, otherwise throws a TimeoutWaitingForElementException.

Parameters

selector

The CSS selector of the element to select.

timeout

The maximum time in milliseconds to wait for the element to appear. Defaults to 10 seconds.

Throws

if the element is not found before the timeout.