Playwright · Matcher
toBeChecked
toBeChecked() verifies that a Locator points to a checked input. It retries until the expected state is reached or the assertion times out.
Last updated
- Since
- v1.20
Syntax
await expect(locator).toBeChecked(options);In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
locator.check()locator.setChecked()LocatorAssertions.nottoBeDisabledtoBeEnabled