Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/services/driver/common/driver.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
// !! Do not remove the following START and END markers, they are parsed by the smoketest build
7
8
//*START
9
export interface IElement {
10
readonly tagName: string;
11
readonly className: string;
12
readonly textContent: string;
13
readonly attributes: { [name: string]: string };
14
readonly children: IElement[];
15
readonly top: number;
16
readonly left: number;
17
}
18
19
export interface ILocaleInfo {
20
readonly language: string;
21
readonly locale?: string;
22
}
23
24
export interface ILocalizedStrings {
25
readonly open: string;
26
readonly close: string;
27
readonly find: string;
28
}
29
30
export interface ILogFile {
31
readonly relativePath: string;
32
readonly contents: string;
33
}
34
35
export interface IWindowDriver {
36
setValue(selector: string, text: string): Promise<void>;
37
isActiveElement(selector: string): Promise<boolean>;
38
getElements(selector: string, recursive: boolean): Promise<IElement[]>;
39
getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number }>;
40
typeInEditor(selector: string, text: string): Promise<void>;
41
getEditorSelection(selector: string): Promise<{ selectionStart: number; selectionEnd: number }>;
42
getTerminalBuffer(selector: string): Promise<string[]>;
43
writeInTerminal(selector: string, text: string): Promise<void>;
44
getLocaleInfo(): Promise<ILocaleInfo>;
45
getLocalizedStrings(): Promise<ILocalizedStrings>;
46
getLogs(): Promise<ILogFile[]>;
47
whenWorkbenchRestored(): Promise<void>;
48
}
49
//*END
50
51