docs: clarify that attribute selectors are not CSS (#7210)
This commit is contained in:
parent
9e95e86082
commit
78261d2373
|
|
@ -675,6 +675,10 @@ await page.FillAsync("id=username", "value");
|
||||||
await page.ClickAsync("data-test-id=submit");
|
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
|
:::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')
|
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')
|
||||||
:::
|
:::
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue