Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)

This commit is contained in:
Cory Rivera
2021-08-25 16:28:29 -07:00
committed by GitHub
parent ab1112bfb3
commit cb7b7da0a4
1752 changed files with 59525 additions and 33878 deletions

View File

@@ -140,6 +140,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
'--disable-updates',
'--disable-keytar',
'--disable-crash-reporter',
'--disable-workspace-trust',
`--extensions-dir=${options.extensionsPath}`,
`--user-data-dir=${options.userDataDir}`,
'--driver', handle
@@ -310,9 +311,9 @@ export class Code {
return element.textContent;
}
async waitAndClick(selector: string, xoffset?: number, yoffset?: number): Promise<void> {
async waitAndClick(selector: string, xoffset?: number, yoffset?: number, retryCount: number = 200): Promise<void> {
const windowId = await this.getActiveWindowId();
await poll(() => this.driver.click(windowId, selector, xoffset, yoffset), () => true, `click '${selector}'`);
await poll(() => this.driver.click(windowId, selector, xoffset, yoffset), () => true, `click '${selector}'`, retryCount);
}
async waitAndDoubleClick(selector: string): Promise<void> {