Playwright · Method
page.waitForSelector
page.waitForSelector waits for an element matched by a selector to reach a state such as visible, hidden, attached, or detached. It returns immediately when the condition is already true and throws if the timeout expires.
Last updated
- Since
- before v1.9
Syntax
page.waitForSelector(String selector, Page.WaitForSelectorOptions options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
Locator.waitForPage.WaitForSelectorOptionsWaitForSelectorState