docs: add reference to locator strictness if or resolves to multiple elements (#32633)
This commit is contained in:
parent
feac957475
commit
b335b00a86
|
|
@ -1654,7 +1654,9 @@ var banana = await page.GetByRole(AriaRole.Listitem).Nth(2);
|
||||||
- alias-python: or_
|
- alias-python: or_
|
||||||
- returns: <[Locator]>
|
- 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**
|
**Usage**
|
||||||
|
|
||||||
|
|
|
||||||
5
packages/playwright-core/types/types.d.ts
vendored
5
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -13060,7 +13060,10 @@ export interface Locator {
|
||||||
nth(index: number): 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**
|
* **Usage**
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue