* Waits for multiple elements that match the given locators to reach the specified state within the timeout period. * * @param {Array } rawLocators - Array of element locators * @param {object} [options] - Optional configuration object * @param {number} [options.timeout]
(
rawLocators,
{ timeout = this.timeout, state = 'visible' } = {},
)
| 483 | * @throws {Error} Will throw an error if any of the elements do not reach the specified state within the timeout period. |
| 484 | */ |
| 485 | async waitForMultipleSelectors( |
| 486 | rawLocators, |
| 487 | { timeout = this.timeout, state = 'visible' } = {}, |
| 488 | ) { |
| 489 | const promises = rawLocators.map((rawLocator) => |
| 490 | this.waitForSelector(rawLocator, { timeout, state }), |
| 491 | ); |
| 492 | return Promise.all(promises); |
| 493 | } |
| 494 | |
| 495 | /** |
| 496 | * Waits for an element that matches the given locator to become non-empty within the timeout period. |
no test coverage detected