Skip to content
masterclass Buddy

Playwright · Matcher

toBeDisabled

toBeDisabled() checks that a locator points to a disabled element. It retries until the check passes or the assertion timeout is reached.

Last updated

Since
v1.20

Syntax

await expect(locator).toBeDisabled();

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

Subscribe
  • expect
  • Locator
  • toBeEnabled
  • toBeEditable
  • isDisabled
  • TestConfig.expect

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