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

Method waitFor

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

Source from the content-addressed store, hash-verified

140 }
141
142 async waitFor<ElementType extends Element|null = null, Selector extends string = string>(
143 selector: Selector, root?: puppeteer.ElementHandle, asyncScope = new AsyncScope(), handler?: string) {
144 return await asyncScope.exec(() => this.waitForFunction(async () => {
145 const element = await this.$<ElementType, typeof selector>(selector, root, handler);
146 return (element || undefined);
147 }, asyncScope, `Waiting for element matching selector '${handler ? `${handler}/` : ''}${selector}'`));
148 }
149
150 async performActionOnSelector(selector: string, options: {root?: puppeteer.ElementHandle}, action: Action):
151 Promise<puppeteer.ElementHandle> {

Callers 15

waitForAriaMethod · 0.95
timeFixtureFunction · 0.45
breakpoint.test.tsFile · 0.45
snippets.test.tsFile · 0.45
getPlayerButtonFunction · 0.45
loadMediaQueryInspectorFunction · 0.45
setupFunction · 0.45

Calls 2

waitForFunctionMethod · 0.95
execMethod · 0.80

Tested by 15

timeFixtureFunction · 0.36
getPlayerButtonFunction · 0.36
loadMediaQueryInspectorFunction · 0.36
setupFunction · 0.36
openSearchBarFunction · 0.36
autocompleteTestFunction · 0.36
typeQueryFunction · 0.36