This commit is contained in:
Benjamin Pasero
2022-04-04 15:38:22 +02:00
parent d06e16b59a
commit 44aea76875

View File

@@ -140,7 +140,7 @@ async function poll<T>(
export class Code {
private _activeWindowId: number | undefined = undefined;
driver: IDriver;
readonly driver: IDriver;
constructor(
private client: IDisposable,
@@ -173,16 +173,12 @@ export class Code {
async startTracing(name: string): Promise<void> {
const windowId = await this.getActiveWindowId();
if (typeof this.driver.startTracing === 'function') { // added only in 1.64
return await this.driver.startTracing(windowId, name);
}
return await this.driver.startTracing(windowId, name);
}
async stopTracing(name: string, persist: boolean): Promise<void> {
const windowId = await this.getActiveWindowId();
if (typeof this.driver.stopTracing === 'function') { // added only in 1.64
return await this.driver.stopTracing(windowId, name, persist);
}
return await this.driver.stopTracing(windowId, name, persist);
}
async waitForWindowIds(accept: (windowIds: number[]) => boolean): Promise<void> {