MCPcopy
hub / github.com/MetaMask/metamask-extension / waitForMultipleSelectors

Method waitForMultipleSelectors

test/e2e/webdriver/driver.js:485–493  ·  view source on GitHub ↗

* 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' } = {},
  )

Source from the content-addressed store, hash-verified

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.

Callers 15

checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80
resetPasswordMethod · 0.80
checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80
checkPageIsLoadedMethod · 0.80

Calls 1

waitForSelectorMethod · 0.95

Tested by

no test coverage detected