Skip to content
masterclass Buddy

Playwright · Matcher

toHaveJSProperty

Playwright uses expect to check values and web-page state. Locator assertions can retry until the expected condition is true or the assertion timeout is reached.

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
  • expect.poll
  • expect.toPass
  • LocatorAssertions
  • toHaveText
  • toHaveRole
  • testConfig.expect

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