Skip to content
masterclass Buddy

Playwright · Function

expect

Playwright's expect function checks values and web conditions. Web assertions retry until they pass or the assertion timeout is reached; the default timeout is 5 seconds.

Last updated

Syntax

expect(value).matcher(expected)
await expect(locator).matcher(expected)

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

Subscribe
  • expect.poll
  • expect.toPass
  • expect.soft
  • expect.configure
  • expect.extend
  • test.info().errors

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