docs(other-locators): hide css:light selector engine (#29491)

https://github.com/microsoft/playwright/issues/29479
This commit is contained in:
Max Schmitt 2024-02-14 17:49:42 +01:00 committed by GitHub
parent 593bf35eb7
commit 918c26fa02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -884,11 +884,6 @@ await page.Locator("data-test-id=submit").ClickAsync();
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`. 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.locator('data-test-id:light=submit').click()`
:::
## Chaining selectors ## Chaining selectors
:::warning :::warning