@allwright.dev/core 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/bootstrap.js +1 -1
- package/dist/desktop.js +31 -7
- package/dist/index.d.ts +1 -1
- package/dist/mobile.d.ts +7 -7
- package/dist/mobile.js +9 -9
- package/dist/types.d.ts +33 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,18 @@ Paths passed to `setFiles` and `saveAs` belong to the test process, even when
|
|
|
51
51
|
the Allwright server is remote. Android apps support the same `fileChooser` and
|
|
52
52
|
`download` hook shape; Android `newPage` hooks are not applicable.
|
|
53
53
|
|
|
54
|
-
Runnable examples
|
|
54
|
+
Runnable examples cover every implemented surface:
|
|
55
|
+
[Web](./examples/web-basic.ts), [Android](./examples/android-basic.ts),
|
|
56
|
+
[iOS](./examples/ios-basic.ts), [macOS](./examples/macos-basic.ts), and
|
|
57
|
+
[Windows](./examples/windows-basic.ts). The desktop examples default to
|
|
58
|
+
Calculator on macOS and Notepad on Windows and accept `ALLWRIGHT_MAC_APP_ID`
|
|
59
|
+
or `ALLWRIGHT_WINDOWS_APP_ID`.
|
|
60
|
+
|
|
61
|
+
Android, iOS, macOS, and Windows applications implement the shared `NativeApp` and
|
|
62
|
+
`NativeAppLocator` interfaces. Platform-specific type names such as
|
|
63
|
+
`MobileAndroidApp`, `MobileIosLocator`, `DesktopMacLocator`, and
|
|
64
|
+
`DesktopWindowsLocator` remain exported
|
|
65
|
+
as aliases for compatibility and platform-oriented annotations.
|
|
55
66
|
|
|
56
67
|
Shared config files are stack-agnostic and can live in `allwright.config.yaml` or `allwright.config.json`.
|
|
57
68
|
The shared schema lives at the repo root in `allwright.schema.json`.
|
package/dist/bootstrap.js
CHANGED
|
@@ -12,7 +12,7 @@ const ALLWRIGHT_HOME_ENV_VAR = "ALLWRIGHT_HOME";
|
|
|
12
12
|
const ALLWRIGHT_REPOSITORY_ENV_VAR = "ALLWRIGHT_REPOSITORY";
|
|
13
13
|
const ALLWRIGHT_VERSION_ENV_VAR = "ALLWRIGHT_VERSION";
|
|
14
14
|
const DEFAULT_RELEASE_REPOSITORY = "allwright-dev/allwright";
|
|
15
|
-
const DEFAULT_RELEASE_VERSION = "0.1.
|
|
15
|
+
const DEFAULT_RELEASE_VERSION = "0.1.24";
|
|
16
16
|
const STARTUP_TIMEOUT_MS = 20_000;
|
|
17
17
|
const PING_TIMEOUT_MS = 1_000;
|
|
18
18
|
const PROTO_ROOT = fileURLToPath(new URL("../proto/", import.meta.url));
|
package/dist/desktop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createBrowserSessionHandle, getRuntime } from "./runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { NativeAppImpl } from "./mobile.js";
|
|
3
3
|
function retryOptions(timeoutMs) {
|
|
4
4
|
return timeoutMs === undefined ? undefined : { timeoutMs };
|
|
5
5
|
}
|
|
@@ -9,22 +9,24 @@ class DesktopMacImpl {
|
|
|
9
9
|
runtime;
|
|
10
10
|
stream;
|
|
11
11
|
queue;
|
|
12
|
+
platformLabel;
|
|
12
13
|
#closed = false;
|
|
13
14
|
#currentApp;
|
|
14
|
-
constructor(sessionId, surfaceSessionId, runtime, stream, queue, initialAppSessionId) {
|
|
15
|
+
constructor(sessionId, surfaceSessionId, runtime, stream, queue, initialAppSessionId, platformLabel = "macOS") {
|
|
15
16
|
this.sessionId = sessionId;
|
|
16
17
|
this.surfaceSessionId = surfaceSessionId;
|
|
17
18
|
this.runtime = runtime;
|
|
18
19
|
this.stream = stream;
|
|
19
20
|
this.queue = queue;
|
|
20
|
-
this
|
|
21
|
+
this.platformLabel = platformLabel;
|
|
22
|
+
this.#currentApp = new NativeAppImpl(runtime, surfaceSessionId, initialAppSessionId);
|
|
21
23
|
}
|
|
22
24
|
app() {
|
|
23
25
|
return this.#currentApp;
|
|
24
26
|
}
|
|
25
27
|
async launch(options) {
|
|
26
28
|
if (this.#closed)
|
|
27
|
-
throw new Error(
|
|
29
|
+
throw new Error(`${this.platformLabel} desktop session ${this.sessionId} is closed`);
|
|
28
30
|
this.stream.write({
|
|
29
31
|
launchDesktopApp: {
|
|
30
32
|
appId: options.appId,
|
|
@@ -35,14 +37,14 @@ class DesktopMacImpl {
|
|
|
35
37
|
while (true) {
|
|
36
38
|
const event = await this.queue.next();
|
|
37
39
|
if (event.desktopAppLaunched?.appSessionId) {
|
|
38
|
-
this.#currentApp = new
|
|
40
|
+
this.#currentApp = new NativeAppImpl(this.runtime, this.surfaceSessionId, event.desktopAppLaunched.appSessionId);
|
|
39
41
|
return this.#currentApp;
|
|
40
42
|
}
|
|
41
43
|
if (event.error?.message)
|
|
42
44
|
throw new Error(event.error.message);
|
|
43
45
|
if (event.closed) {
|
|
44
46
|
this.#closed = true;
|
|
45
|
-
throw new Error(
|
|
47
|
+
throw new Error(`${this.platformLabel} desktop session ${this.sessionId} closed while launching app`);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
}
|
|
@@ -61,7 +63,28 @@ class DesktopMacSurfaceImpl {
|
|
|
61
63
|
while (true) {
|
|
62
64
|
const event = await queue.next();
|
|
63
65
|
if (event.desktopConnected?.initialAppSessionId) {
|
|
64
|
-
return new DesktopMacImpl(event.desktopConnected.desktopSessionId ?? event.sessionId ?? "", event.sessionId ?? "", runtime, stream, queue, event.desktopConnected.initialAppSessionId);
|
|
66
|
+
return new DesktopMacImpl(event.desktopConnected.desktopSessionId ?? event.sessionId ?? "", event.sessionId ?? "", runtime, stream, queue, event.desktopConnected.initialAppSessionId, "macOS");
|
|
67
|
+
}
|
|
68
|
+
if (event.error?.message)
|
|
69
|
+
throw new Error(event.error.message);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
class DesktopWindowsSurfaceImpl {
|
|
74
|
+
async connect(options = {}) {
|
|
75
|
+
const runtime = await getRuntime();
|
|
76
|
+
const { stream, queue } = await createBrowserSessionHandle(runtime);
|
|
77
|
+
stream.write({
|
|
78
|
+
connectDesktop: {
|
|
79
|
+
platform: 2,
|
|
80
|
+
agentEndpoint: options.agentEndpoint,
|
|
81
|
+
retryOptions: retryOptions(options.timeoutMs),
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
while (true) {
|
|
85
|
+
const event = await queue.next();
|
|
86
|
+
if (event.desktopConnected?.initialAppSessionId) {
|
|
87
|
+
return new DesktopMacImpl(event.desktopConnected.desktopSessionId ?? event.sessionId ?? "", event.sessionId ?? "", runtime, stream, queue, event.desktopConnected.initialAppSessionId, "Windows");
|
|
65
88
|
}
|
|
66
89
|
if (event.error?.message)
|
|
67
90
|
throw new Error(event.error.message);
|
|
@@ -70,4 +93,5 @@ class DesktopMacSurfaceImpl {
|
|
|
70
93
|
}
|
|
71
94
|
export const desktop = {
|
|
72
95
|
mac: new DesktopMacSurfaceImpl(),
|
|
96
|
+
windows: new DesktopWindowsSurfaceImpl(),
|
|
73
97
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { PageImpl } from "./page.js";
|
|
|
6
6
|
import { setServerAddr, shutdown } from "./runtime.js";
|
|
7
7
|
import type { Browser, BrowserKind, BrowserType, LaunchOptions, Page, Dialog, FileChooser, Download, HookType, ResolveConfigOptions, ResolvedAllwrightConfig } from "./types.js";
|
|
8
8
|
export { findConfigFile, loadConfigFile, resolveConfig, setServerAddr, shutdown };
|
|
9
|
-
export type { CapturedOption, BoundingBox, AccessibilitySnapshotOptions, AllwrightConfig, Browser, BrowserInfo, BrowserKind, BrowserType, Hook, HookType, Dialog, FileChooser, Download, ClickResult, CommandOptions, CountResult, ElementResult, FillResult, HighlightOptions, HighlightResult, LaunchOptions, MobileAndroidConnectOptions, MobileAndroidDevice, MobileAndroidLaunchOptions, MobileAndroidLocator, MobileAndroidApp, MobileIosConnectOptions, MobileIosDevice, MobileIosLaunchOptions, MobileIosLocator, MobileIosApp, Locator, LocatorInfo, MobileSurfaceNamespace, DesktopMacApp, DesktopMacConnectOptions, DesktopMacDesktop, DesktopMacLaunchOptions, DesktopMacLocator, DesktopSurfaceNamespace, NavigateResult, Page, PageInfo, PressOptions, PressResult, ResolveConfigOptions, ResolvedAllwrightConfig, RetryConfig, ScreenshotOptions, ScreenshotResult, TextResult, WaitForSelectorOptions, WaitForSelectorResult, } from "./types.js";
|
|
9
|
+
export type { CapturedOption, BoundingBox, AccessibilitySnapshotOptions, AllwrightConfig, Browser, BrowserInfo, BrowserKind, BrowserType, Hook, HookType, Dialog, FileChooser, Download, ClickResult, CommandOptions, CountResult, ElementResult, FillResult, HighlightOptions, HighlightResult, LaunchOptions, NativeApp, NativeAppLocator, MobileAndroidConnectOptions, MobileAndroidDevice, MobileAndroidLaunchOptions, MobileAndroidLocator, MobileAndroidApp, MobileIosConnectOptions, MobileIosDevice, MobileIosLaunchOptions, MobileIosLocator, MobileIosApp, Locator, LocatorInfo, MobileSurfaceNamespace, DesktopMacApp, DesktopMacConnectOptions, DesktopMacDesktop, DesktopMacLaunchOptions, DesktopMacLocator, DesktopWindowsApp, DesktopWindowsConnectOptions, DesktopWindowsDesktop, DesktopWindowsLaunchOptions, DesktopWindowsLocator, DesktopSurfaceNamespace, NavigateResult, Page, PageInfo, PressOptions, PressResult, ResolveConfigOptions, ResolvedAllwrightConfig, RetryConfig, ScreenshotOptions, ScreenshotResult, TextResult, WaitForSelectorOptions, WaitForSelectorResult, } from "./types.js";
|
|
10
10
|
export declare const chromium: BrowserType;
|
|
11
11
|
export declare const firefox: BrowserType;
|
|
12
12
|
export declare const hooks: {
|
package/dist/mobile.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type RoleOptions, type TextMatcher, type TextOptions } from "./web-locators.js";
|
|
2
|
-
import type { AccessibilitySnapshotOptions, CommandOptions, Hook, HookType,
|
|
3
|
-
export declare class
|
|
2
|
+
import type { AccessibilitySnapshotOptions, CommandOptions, Hook, HookType, MobileSurfaceNamespace, NativeApp, NativeAppLocator, PressOptions, RuntimeClient, ScreenshotOptions, WaitForSelectorOptions } from "./types.js";
|
|
3
|
+
export declare class NativeAppImpl implements NativeApp {
|
|
4
4
|
#private;
|
|
5
5
|
readonly sessionId: string;
|
|
6
6
|
constructor(runtime: RuntimeClient, surfaceSessionId: string, sessionId: string);
|
|
7
|
-
locator(selector: string):
|
|
8
|
-
getByRole(role: string, options?: RoleOptions):
|
|
9
|
-
getByText(text: TextMatcher, options?: TextOptions):
|
|
10
|
-
getByLabel(text: TextMatcher, options?: TextOptions):
|
|
11
|
-
getByTestId(text: TextMatcher):
|
|
7
|
+
locator(selector: string): NativeAppLocator;
|
|
8
|
+
getByRole(role: string, options?: RoleOptions): NativeAppLocator;
|
|
9
|
+
getByText(text: TextMatcher, options?: TextOptions): NativeAppLocator;
|
|
10
|
+
getByLabel(text: TextMatcher, options?: TextOptions): NativeAppLocator;
|
|
11
|
+
getByTestId(text: TextMatcher): NativeAppLocator;
|
|
12
12
|
registerHook<T>(type: HookType<T>): Promise<Hook<T>>;
|
|
13
13
|
setChooserFiles(fileChooserId: string, files: string[], options: CommandOptions): Promise<void>;
|
|
14
14
|
saveMobileDownload(downloadId: string, path: string, options: CommandOptions): Promise<void>;
|
package/dist/mobile.js
CHANGED
|
@@ -7,7 +7,7 @@ import { semanticSelector } from "./web-locators.js";
|
|
|
7
7
|
function retryOptions(timeoutMs) {
|
|
8
8
|
return timeoutMs ? { timeoutMs } : undefined;
|
|
9
9
|
}
|
|
10
|
-
export class
|
|
10
|
+
export class NativeAppImpl {
|
|
11
11
|
sessionId;
|
|
12
12
|
#runtime;
|
|
13
13
|
#surfaceSessionId;
|
|
@@ -18,7 +18,7 @@ export class MobileAndroidAppImpl {
|
|
|
18
18
|
this.#surfaceSessionId = surfaceSessionId;
|
|
19
19
|
}
|
|
20
20
|
locator(selector) {
|
|
21
|
-
return new
|
|
21
|
+
return new NativeAppLocatorImpl(this, normalizeMobileSelectorForTransport(selector));
|
|
22
22
|
}
|
|
23
23
|
getByRole(role, options = {}) {
|
|
24
24
|
return this.locator(semanticSelector({ ...options, kind: "role", role }));
|
|
@@ -34,7 +34,7 @@ export class MobileAndroidAppImpl {
|
|
|
34
34
|
}
|
|
35
35
|
async registerHook(type) {
|
|
36
36
|
if (type.name !== "fileChooser" && type.name !== "download") {
|
|
37
|
-
throw new Error(`hook type ${type.name} is not supported by
|
|
37
|
+
throw new Error(`hook type ${type.name} is not supported by native apps`);
|
|
38
38
|
}
|
|
39
39
|
const handle = await this.#getHandle();
|
|
40
40
|
this.#ensureOpen(handle);
|
|
@@ -530,7 +530,7 @@ class MobileDownloadImpl {
|
|
|
530
530
|
await this.page.saveMobileDownload(this.id, path, options);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
class
|
|
533
|
+
class NativeAppLocatorImpl {
|
|
534
534
|
page;
|
|
535
535
|
selector;
|
|
536
536
|
constructor(page, selector) {
|
|
@@ -562,7 +562,7 @@ class MobileAndroidLocatorImpl {
|
|
|
562
562
|
return this.page.waitForSelector(this.selector, options);
|
|
563
563
|
}
|
|
564
564
|
locator(selector) {
|
|
565
|
-
return new
|
|
565
|
+
return new NativeAppLocatorImpl(this.page, chainMobileSelectorForTransport(this.selector, selector));
|
|
566
566
|
}
|
|
567
567
|
getByRole(role, options = {}) {
|
|
568
568
|
return this.locator(semanticSelector({ ...options, kind: "role", role }));
|
|
@@ -591,7 +591,7 @@ class MobileAndroidDeviceImpl {
|
|
|
591
591
|
this.runtime = runtime;
|
|
592
592
|
this.#stream = stream;
|
|
593
593
|
this.#queue = queue;
|
|
594
|
-
this.#currentApp = new
|
|
594
|
+
this.#currentApp = new NativeAppImpl(runtime, surfaceSessionId, initialAppSessionId);
|
|
595
595
|
}
|
|
596
596
|
app() {
|
|
597
597
|
return this.#currentApp;
|
|
@@ -613,7 +613,7 @@ class MobileAndroidDeviceImpl {
|
|
|
613
613
|
while (true) {
|
|
614
614
|
const event = await this.#queue.next();
|
|
615
615
|
if (event.appLaunched?.appSessionId) {
|
|
616
|
-
this.#currentApp = new
|
|
616
|
+
this.#currentApp = new NativeAppImpl(this.runtime, this.surfaceSessionId, event.appLaunched.appSessionId);
|
|
617
617
|
return this.#currentApp;
|
|
618
618
|
}
|
|
619
619
|
if (event.error?.message) {
|
|
@@ -645,7 +645,7 @@ class MobileIosDeviceImpl {
|
|
|
645
645
|
this.runtime = runtime;
|
|
646
646
|
this.#stream = stream;
|
|
647
647
|
this.#queue = queue;
|
|
648
|
-
this.#currentApp = new
|
|
648
|
+
this.#currentApp = new NativeAppImpl(runtime, surfaceSessionId, initialAppSessionId);
|
|
649
649
|
}
|
|
650
650
|
app() { return this.#currentApp; }
|
|
651
651
|
initialApp() { return this.#currentApp; }
|
|
@@ -663,7 +663,7 @@ class MobileIosDeviceImpl {
|
|
|
663
663
|
while (true) {
|
|
664
664
|
const event = await this.#queue.next();
|
|
665
665
|
if (event.appLaunched?.appSessionId) {
|
|
666
|
-
this.#currentApp = new
|
|
666
|
+
this.#currentApp = new NativeAppImpl(this.runtime, this.surfaceSessionId, event.appLaunched.appSessionId);
|
|
667
667
|
return this.#currentApp;
|
|
668
668
|
}
|
|
669
669
|
if (event.error?.message)
|
package/dist/types.d.ts
CHANGED
|
@@ -119,13 +119,13 @@ export interface Dialog {
|
|
|
119
119
|
}
|
|
120
120
|
export interface FileChooser {
|
|
121
121
|
readonly id: string;
|
|
122
|
-
readonly page: Page |
|
|
122
|
+
readonly page: Page | NativeApp;
|
|
123
123
|
isMultiple(): boolean;
|
|
124
124
|
setFiles(files: string | string[], options?: CommandOptions): Promise<void>;
|
|
125
125
|
}
|
|
126
126
|
export interface Download {
|
|
127
127
|
readonly id: string;
|
|
128
|
-
readonly page: Page |
|
|
128
|
+
readonly page: Page | NativeApp;
|
|
129
129
|
readonly url: string;
|
|
130
130
|
readonly suggestedFilename: string;
|
|
131
131
|
saveAs(path: string, options?: CommandOptions): Promise<void>;
|
|
@@ -183,8 +183,8 @@ export interface MobileAndroidLaunchOptions {
|
|
|
183
183
|
stopBeforeLaunch?: boolean;
|
|
184
184
|
timeoutMs?: number;
|
|
185
185
|
}
|
|
186
|
-
export interface
|
|
187
|
-
readonly page:
|
|
186
|
+
export interface NativeAppLocator {
|
|
187
|
+
readonly page: NativeApp;
|
|
188
188
|
readonly selector: string;
|
|
189
189
|
click(options?: CommandOptions): Promise<void>;
|
|
190
190
|
count(options?: CommandOptions): Promise<number>;
|
|
@@ -194,22 +194,22 @@ export interface MobileAndroidLocator {
|
|
|
194
194
|
textContent(options?: CommandOptions): Promise<string | null>;
|
|
195
195
|
innerText(options?: CommandOptions): Promise<string>;
|
|
196
196
|
waitFor(options?: WaitForSelectorOptions): Promise<void>;
|
|
197
|
-
locator(selector: string):
|
|
198
|
-
getByRole(role: string, options?: RoleOptions):
|
|
199
|
-
getByText(text: TextMatcher, options?: TextOptions):
|
|
200
|
-
getByLabel(text: TextMatcher, options?: TextOptions):
|
|
201
|
-
getByTestId(text: TextMatcher):
|
|
197
|
+
locator(selector: string): NativeAppLocator;
|
|
198
|
+
getByRole(role: string, options?: RoleOptions): NativeAppLocator;
|
|
199
|
+
getByText(text: TextMatcher, options?: TextOptions): NativeAppLocator;
|
|
200
|
+
getByLabel(text: TextMatcher, options?: TextOptions): NativeAppLocator;
|
|
201
|
+
getByTestId(text: TextMatcher): NativeAppLocator;
|
|
202
202
|
}
|
|
203
|
-
export interface
|
|
203
|
+
export interface NativeApp {
|
|
204
204
|
accessibilitySnapshot(options?: AccessibilitySnapshotOptions): Promise<string>;
|
|
205
205
|
readonly sessionId: string;
|
|
206
206
|
goto(url: string, options?: CommandOptions): Promise<void>;
|
|
207
207
|
navigate(url: string, options?: CommandOptions): Promise<void>;
|
|
208
|
-
locator(selector: string):
|
|
209
|
-
getByRole(role: string, options?: RoleOptions):
|
|
210
|
-
getByText(text: TextMatcher, options?: TextOptions):
|
|
211
|
-
getByLabel(text: TextMatcher, options?: TextOptions):
|
|
212
|
-
getByTestId(text: TextMatcher):
|
|
208
|
+
locator(selector: string): NativeAppLocator;
|
|
209
|
+
getByRole(role: string, options?: RoleOptions): NativeAppLocator;
|
|
210
|
+
getByText(text: TextMatcher, options?: TextOptions): NativeAppLocator;
|
|
211
|
+
getByLabel(text: TextMatcher, options?: TextOptions): NativeAppLocator;
|
|
212
|
+
getByTestId(text: TextMatcher): NativeAppLocator;
|
|
213
213
|
click(selector: string, options?: CommandOptions): Promise<void>;
|
|
214
214
|
count(selector: string, options?: CommandOptions): Promise<number>;
|
|
215
215
|
focus(selector: string, options?: CommandOptions): Promise<void>;
|
|
@@ -221,6 +221,8 @@ export interface MobileAndroidApp {
|
|
|
221
221
|
screenshot(options?: ScreenshotOptions): Promise<Uint8Array>;
|
|
222
222
|
registerHook<T>(type: HookType<T>): Promise<Hook<T>>;
|
|
223
223
|
}
|
|
224
|
+
export type MobileAndroidLocator = NativeAppLocator;
|
|
225
|
+
export type MobileAndroidApp = NativeApp;
|
|
224
226
|
export interface MobileAndroidDevice {
|
|
225
227
|
readonly sessionId: string;
|
|
226
228
|
app(): MobileAndroidApp;
|
|
@@ -239,8 +241,8 @@ export interface MobileIosLaunchOptions {
|
|
|
239
241
|
stopBeforeLaunch?: boolean;
|
|
240
242
|
timeoutMs?: number;
|
|
241
243
|
}
|
|
242
|
-
export type MobileIosLocator =
|
|
243
|
-
export type MobileIosApp =
|
|
244
|
+
export type MobileIosLocator = NativeAppLocator;
|
|
245
|
+
export type MobileIosApp = NativeApp;
|
|
244
246
|
export interface MobileIosDevice {
|
|
245
247
|
readonly sessionId: string;
|
|
246
248
|
app(): MobileIosApp;
|
|
@@ -264,17 +266,29 @@ export interface DesktopMacLaunchOptions {
|
|
|
264
266
|
terminateRunning?: boolean;
|
|
265
267
|
timeoutMs?: number;
|
|
266
268
|
}
|
|
267
|
-
export type DesktopMacApp =
|
|
268
|
-
export type DesktopMacLocator =
|
|
269
|
+
export type DesktopMacApp = NativeApp;
|
|
270
|
+
export type DesktopMacLocator = NativeAppLocator;
|
|
269
271
|
export interface DesktopMacDesktop {
|
|
270
272
|
readonly sessionId: string;
|
|
271
273
|
app(): DesktopMacApp;
|
|
272
274
|
launch(options: DesktopMacLaunchOptions): Promise<DesktopMacApp>;
|
|
273
275
|
}
|
|
276
|
+
export type DesktopWindowsConnectOptions = DesktopMacConnectOptions;
|
|
277
|
+
export type DesktopWindowsLaunchOptions = DesktopMacLaunchOptions;
|
|
278
|
+
export type DesktopWindowsApp = NativeApp;
|
|
279
|
+
export type DesktopWindowsLocator = NativeAppLocator;
|
|
280
|
+
export interface DesktopWindowsDesktop {
|
|
281
|
+
readonly sessionId: string;
|
|
282
|
+
app(): DesktopWindowsApp;
|
|
283
|
+
launch(options: DesktopWindowsLaunchOptions): Promise<DesktopWindowsApp>;
|
|
284
|
+
}
|
|
274
285
|
export interface DesktopSurfaceNamespace {
|
|
275
286
|
mac: {
|
|
276
287
|
connect(options?: DesktopMacConnectOptions): Promise<DesktopMacDesktop>;
|
|
277
288
|
};
|
|
289
|
+
windows: {
|
|
290
|
+
connect(options?: DesktopWindowsConnectOptions): Promise<DesktopWindowsDesktop>;
|
|
291
|
+
};
|
|
278
292
|
}
|
|
279
293
|
export interface Locator extends WebLocators {
|
|
280
294
|
inputValue(options?: CommandOptions): Promise<string>;
|