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: add reference to locator strictness if or resolves to multiple elements (#32633)
Max Schmittb335b00a8622
diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.mdindex 4df0035098..88658b5494 100644--- a/docs/src/api/class-locator.md+++ b/docs/src/api/class-locator.md@@ -1654,7 +1654,9 @@ var banana = await page.GetByRole(AriaRole.Listitem).Nth(2);- alias-python: or_- returns: <[Locator]>-Creates a locator that matches either of the two locators.+Creates a locator matching all elements that match one or both of the two locators.++Note that when both locators match something, the resulting locator will have multiple matches and violate [locator strictness](../locators.md#strictness) guidelines.**Usage**diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex e88e1b473b..67bb51b192 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -13060,7 +13060,10 @@ export interface Locator {nth(index: number): Locator;/**- * Creates a locator that matches either of the two locators.+ * Creates a locator matching all elements that match one or both of the two locators.+ *+ * Note that when both locators match something, the resulting locator will have multiple matches and violate+ * [locator strictness](https://playwright.dev/docs/locators#strictness) guidelines.** **Usage***