Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: clarify that attribute selectors are not CSS (#7210)
Dmitry Gozman78261d2373c9
diff --git a/docs/src/selectors.md b/docs/src/selectors.mdindex 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`.+:::+:::noteAttribute selectors pierce shadow DOM. To opt-out from this behavior, use `:light` suffix after attribute, for example `page.click('data-test-id:light=submit'):::