Playwright · Matcher
toBeAttached
Checks that a Locator points to an element attached to a document or shadow root. It retries until the check passes or the assertion timeout is reached.
Last updated
- Since
- v1.33
Syntax
await expect(locator).toBeAttached(options?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
LocatorAssertions.nottoBeVisibletoBeHiddenexpect