From c5cb73003fa9ea17ad9acaa1671dd963ef450f11 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 15 Nov 2021 13:54:12 -0800 Subject: [PATCH] docs: OR for css and xpath selectors (#10285) --- docs/src/selectors.md | 51 +++++++++++++++++++++++++------ tests/page/selectors-misc.spec.ts | 21 +++++++++++++ 2 files changed, 63 insertions(+), 9 deletions(-) diff --git a/docs/src/selectors.md b/docs/src/selectors.md index 1585267fc3..c47dabcfbb 100644 --- a/docs/src/selectors.md +++ b/docs/src/selectors.md @@ -503,34 +503,67 @@ await page.TextContentAsync("article:has(div.promo)"); ## Selecting elements matching one of the conditions -The `:is()` pseudo-class is an [experimental CSS pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:is). -It is a function that takes a selector list as its argument, and selects any element that -can be selected by one of the selectors in that list. This is useful for writing large -selectors in a more compact form. +### CSS selector list + +Comma separated list of CSS selectors will match all elements that can be selected by +one of the selectors in that list. ```js // Clicks a