diff --git a/docs/src/selectors.md b/docs/src/selectors.md index a5da2f721b..36135313cd 100644 --- a/docs/src/selectors.md +++ b/docs/src/selectors.md @@ -675,6 +675,10 @@ await page.FillAsync("id=username", "value"); await page.ClickAsync("data-test-id=submit"); ``` +:::note +Attribute selectors are not CSS selectors, so anything CSS-specific like `:enabled` is not supported. For more features, use a proper [css] selector, e.g. `css=[data-test="login"]:enabled`. +::: + :::note Attribute selectors pierce shadow DOM. To opt-out from this behavior, use `:light` suffix after attribute, for example `page.click('data-test-id:light=submit') :::