MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / waitForMany

Method waitForMany

test/e2e/shared/page-wrapper.ts:381–388  ·  view source on GitHub ↗
(
      selector: Selector, count: number, root?: puppeteer.ElementHandle, asyncScope = new AsyncScope(),
      handler?: string)

Source from the content-addressed store, hash-verified

379 }
380
381 async waitForMany<ElementType extends Element|null = null, Selector extends string = string>(
382 selector: Selector, count: number, root?: puppeteer.ElementHandle, asyncScope = new AsyncScope(),
383 handler?: string) {
384 return await asyncScope.exec(() => this.waitForFunction(async () => {
385 const elements = await this.$$<ElementType, typeof selector>(selector, root, handler);
386 return elements.length >= count ? elements : undefined;
387 }, asyncScope, `Waiting for ${count} elements to match selector '${handler ? `${handler}/` : ''}${selector}'`));
388 }
389
390 async waitForManyWithTries<ElementType extends Element|null = null, Selector extends string = string>(
391 selector: Selector, count: number, tries: number, root?: puppeteer.ElementHandle, asyncScope = new AsyncScope(),

Callers 15

getPlayerErrorsFunction · 0.80
waitForPlayerButtonTextsFunction · 0.80
memory.test.tsFile · 0.80
getSearchResultsFunction · 0.80
getTotalTimeFromSummaryFunction · 0.80
getCoverageDataFunction · 0.80
getBreakpointDecoratorsFunction · 0.80
readValuesFunction · 0.80
setupBreakpointsFunction · 0.80
waitForMarkersFunction · 0.80

Calls 2

waitForFunctionMethod · 0.95
execMethod · 0.80

Tested by 9

getPlayerErrorsFunction · 0.64
waitForPlayerButtonTextsFunction · 0.64
getSearchResultsFunction · 0.64
setupBreakpointsFunction · 0.64
waitForMarkersFunction · 0.64
waitForInlineVariablesFunction · 0.64
getStyleRulePropertiesFunction · 0.64
getStyleRulePropertiesFunction · 0.64
waitForLightDarkFunction · 0.64