docs: add flakiness note to locator.all (#21645)

This commit is contained in:
Dmitry Gozman 2023-03-13 19:33:36 -07:00 committed by GitHub
parent c691d1f436
commit c9837dfcc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

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

View File

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