MCPcopy Index your code
hub / github.com/microsoft/vscode / waitForElement

Method waitForElement

test/automation/src/code.ts:305–307  ·  view source on GitHub ↗
(selector: string, accept: (result: IElement | undefined) => boolean = result => !!result, retryCount: number = 200)

Source from the content-addressed store, hash-verified

303 }
304
305 async waitForElement(selector: string, accept: (result: IElement | undefined) => boolean = result => !!result, retryCount: number = 200): Promise<IElement> {
306 return await this.poll<IElement>(() => this.driver.getElements(selector).then(els => els[0]), accept, `get element '${selector}'`, retryCount);
307 }
308
309 async waitForActiveElement(selector: string, retryCount: number = 200): Promise<void> {
310 await this.poll(() => this.driver.isActiveElement(selector), r => r, `is active element '${selector}'`, retryCount);

Callers 15

robustClickMethod · 0.95
getTerminalGroupsMethod · 0.45
getSingleTabNameMethod · 0.45
assertTabExpectedMethod · 0.45
_waitForTerminalMethod · 0.45
searchForExtensionMethod · 0.45
installExtensionMethod · 0.45
updateKeybindingMethod · 0.45
hideProblemsViewMethod · 0.45

Calls 2

thenMethod · 0.65
getElementsMethod · 0.65

Tested by 3

setupFunction · 0.36
setupFunction · 0.36
setupFunction · 0.36