mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Copy and use IWindowDriver in PlaywrightDriver
This commit is contained in:
parent
daa8095ccf
commit
c65c8738f9
|
@ -952,7 +952,6 @@
|
||||||
"@vscode/*",
|
"@vscode/*",
|
||||||
"@parcel/*",
|
"@parcel/*",
|
||||||
"playwright-core/**",
|
"playwright-core/**",
|
||||||
"**/vs/platform/driver/common/**",
|
|
||||||
"*" // node modules
|
"*" // node modules
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -57,10 +57,6 @@ export interface IDriver {
|
||||||
getLocaleInfo(windowId: number): Promise<ILocaleInfo>;
|
getLocaleInfo(windowId: number): Promise<ILocaleInfo>;
|
||||||
getLocalizedStrings(windowId: number): Promise<ILocalizedStrings>;
|
getLocalizedStrings(windowId: number): Promise<ILocalizedStrings>;
|
||||||
}
|
}
|
||||||
//*END
|
|
||||||
|
|
||||||
export const ID = 'driverService';
|
|
||||||
export const IDriver = createDecorator<IDriver>(ID);
|
|
||||||
|
|
||||||
export interface IWindowDriver {
|
export interface IWindowDriver {
|
||||||
click(selector: string, xoffset?: number | undefined, yoffset?: number | undefined): Promise<void>;
|
click(selector: string, xoffset?: number | undefined, yoffset?: number | undefined): Promise<void>;
|
||||||
|
@ -76,6 +72,10 @@ export interface IWindowDriver {
|
||||||
getLocaleInfo(): Promise<ILocaleInfo>;
|
getLocaleInfo(): Promise<ILocaleInfo>;
|
||||||
getLocalizedStrings(): Promise<ILocalizedStrings>
|
getLocalizedStrings(): Promise<ILocalizedStrings>
|
||||||
}
|
}
|
||||||
|
//*END
|
||||||
|
|
||||||
|
export const ID = 'driverService';
|
||||||
|
export const IDriver = createDecorator<IDriver>(ID);
|
||||||
|
|
||||||
export interface IDriverOptions {
|
export interface IDriverOptions {
|
||||||
verbose: boolean;
|
verbose: boolean;
|
||||||
|
|
|
@ -8,27 +8,10 @@ import { ChildProcess, spawn } from 'child_process';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { mkdir } from 'fs';
|
import { mkdir } from 'fs';
|
||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
import { IDriver, IDisposable } from './driver';
|
import { IDriver, IDisposable, IWindowDriver } from './driver';
|
||||||
import { URI } from 'vscode-uri';
|
import { URI } from 'vscode-uri';
|
||||||
import * as kill from 'tree-kill';
|
import * as kill from 'tree-kill';
|
||||||
import { PageFunction } from 'playwright-core/types/structs';
|
import { PageFunction } from 'playwright-core/types/structs';
|
||||||
import { IElement, ILocaleInfo, ILocalizedStrings } from '.';
|
|
||||||
|
|
||||||
// TODO: Copy driver over to ./driver.d.ts?
|
|
||||||
export interface IWindowDriver {
|
|
||||||
click(selector: string, xoffset?: number | undefined, yoffset?: number | undefined): Promise<void>;
|
|
||||||
doubleClick(selector: string): Promise<void>;
|
|
||||||
setValue(selector: string, text: string): Promise<void>;
|
|
||||||
getTitle(): Promise<string>;
|
|
||||||
isActiveElement(selector: string): Promise<boolean>;
|
|
||||||
getElements(selector: string, recursive: boolean): Promise<IElement[]>;
|
|
||||||
getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number; }>;
|
|
||||||
typeInEditor(selector: string, text: string): Promise<void>;
|
|
||||||
getTerminalBuffer(selector: string): Promise<string[]>;
|
|
||||||
writeInTerminal(selector: string, text: string): Promise<void>;
|
|
||||||
getLocaleInfo(): Promise<ILocaleInfo>;
|
|
||||||
getLocalizedStrings(): Promise<ILocalizedStrings>
|
|
||||||
}
|
|
||||||
|
|
||||||
const width = 1200;
|
const width = 1200;
|
||||||
const height = 800;
|
const height = 800;
|
||||||
|
|
Loading…
Reference in a new issue