mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: add flakiness note to locator.all (#21645)
This commit is contained in:
parent
c691d1f436
commit
c9837dfcc7
@ -13,6 +13,8 @@ a way to find element(s) on the page at any moment. Locator can be created with
|
||||
When locator points to a list of elements, returns array of locators, pointing
|
||||
to respective elements.
|
||||
|
||||
Note that [`method: Locator.all`] does not wait for elements to match the locator, and instead immediately returns whatever is present in the page. To avoid flakiness when elements are loaded dynamically, wait for the loading to finish before calling [`method: Locator.all`].
|
||||
|
||||
**Usage**
|
||||
|
||||
```js
|
||||
|
5
packages/playwright-core/types/types.d.ts
vendored
5
packages/playwright-core/types/types.d.ts
vendored
@ -10125,6 +10125,11 @@ export interface Locator {
|
||||
/**
|
||||
* When locator points to a list of elements, returns array of locators, pointing to respective elements.
|
||||
*
|
||||
* Note that [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all) does not wait for elements to
|
||||
* match the locator, and instead immediately returns whatever is present in the page. To avoid flakiness when
|
||||
* elements are loaded dynamically, wait for the loading to finish before calling
|
||||
* [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all).
|
||||
*
|
||||
* **Usage**
|
||||
*
|
||||
* ```js
|
||||
|
Loading…
x
Reference in New Issue
Block a user