mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Copy and use IWindowDriver in PlaywrightDriver
This commit is contained in:
parent
daa8095ccf
commit
c65c8738f9
|
@ -952,7 +952,6 @@
|
|||
"@vscode/*",
|
||||
"@parcel/*",
|
||||
"playwright-core/**",
|
||||
"**/vs/platform/driver/common/**",
|
||||
"*" // node modules
|
||||
]
|
||||
},
|
||||
|
|
|
@ -57,10 +57,6 @@ export interface IDriver {
|
|||
getLocaleInfo(windowId: number): Promise<ILocaleInfo>;
|
||||
getLocalizedStrings(windowId: number): Promise<ILocalizedStrings>;
|
||||
}
|
||||
//*END
|
||||
|
||||
export const ID = 'driverService';
|
||||
export const IDriver = createDecorator<IDriver>(ID);
|
||||
|
||||
export interface IWindowDriver {
|
||||
click(selector: string, xoffset?: number | undefined, yoffset?: number | undefined): Promise<void>;
|
||||
|
@ -76,6 +72,10 @@ export interface IWindowDriver {
|
|||
getLocaleInfo(): Promise<ILocaleInfo>;
|
||||
getLocalizedStrings(): Promise<ILocalizedStrings>
|
||||
}
|
||||
//*END
|
||||
|
||||
export const ID = 'driverService';
|
||||
export const IDriver = createDecorator<IDriver>(ID);
|
||||
|
||||
export interface IDriverOptions {
|
||||
verbose: boolean;
|
||||
|
|
|
@ -8,27 +8,10 @@ import { ChildProcess, spawn } from 'child_process';
|
|||
import { join } from 'path';
|
||||
import { mkdir } from 'fs';
|
||||
import { promisify } from 'util';
|
||||
import { IDriver, IDisposable } from './driver';
|
||||
import { IDriver, IDisposable, IWindowDriver } from './driver';
|
||||
import { URI } from 'vscode-uri';
|
||||
import * as kill from 'tree-kill';
|
||||
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 height = 800;
|
||||
|
|
Loading…
Reference in a new issue