Skip to main content
Element Handle waiting methods for the Playwright driver.

waitForElementState

Wait for the element to reach a specific state.
Discouraged in favor of web-first assertions.
Upstream docs
state
PlaywrightElementState
required
State to wait for: “visible”, “hidden”, “stable”, “enabled”, or “disabled”.
options
PlaywrightTimeoutOptions
await element.waitForElementState(/* PlaywrightElementState */);

waitForSelector

Wait for a child element matching the selector.
Discouraged in favor of locator-based assertions.
Upstream docs
selector
string
required
options
PlaywrightWaitForSelectorOptions
result
RemotePlaywrightElementHandle | null
Return value
await element.waitForSelector('...');