class Playwright::LocatorAssertions
def to_be_attached(attached: nil, timeout: nil)
expect(page.get_by_text("Hidden text")).to_be_attached()
```python sync
**Usage**
Ensures that `Locator` points to an element that is [connected](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected) to a Document or a ShadowRoot.
def to_be_attached(attached: nil, timeout: nil) wrap_impl(@impl.to_be_attached(attached: unwrap_impl(attached), timeout: unwrap_impl(timeout))) end