Skip to content
masterclass Buddy

Playwright · Method

locator.waitFor

Waits for a locator's element to reach a chosen state. It returns immediately if the state is already satisfied.

Last updated

Since
v1.16

Syntax

await locator.waitFor(options);

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Locator
  • locator.waitForFunction
  • page.setDefaultTimeout
  • browserContext.setDefaultTimeout

Source: Locator | Playwright. Checked 2026-11-03.