docs: add reference to locator strictness if or resolves to multiple elements (#32633)

This commit is contained in:
Max Schmitt 2024-09-16 17:30:14 +02:00 committed by GitHub
parent feac957475
commit b335b00a86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -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**

View file

@ -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**
*