doc-detective-common 4.25.1 → 4.26.0
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/dist/index.cjs +15966 -4090
- package/dist/schemas/schemas.json +15966 -4090
- package/dist/types/generated/closeSurface_v3.d.ts +2 -2
- package/dist/types/generated/dragAndDrop_v3.d.ts +1 -1
- package/dist/types/generated/goTo_v3.d.ts +1 -1
- package/dist/types/generated/record_v3.d.ts +1 -1
- package/dist/types/generated/runBrowserScript_v3.d.ts +1 -1
- package/dist/types/generated/screenshot_v3.d.ts +1 -1
- package/dist/types/generated/startSurface_v3.d.ts +317 -3
- package/dist/types/generated/startSurface_v3.d.ts.map +1 -1
- package/dist/types/generated/step_v3.d.ts +329 -15
- package/dist/types/generated/step_v3.d.ts.map +1 -1
- package/dist/types/generated/surface_v3.d.ts +1 -1
- package/dist/types/generated/swipe_v3.d.ts +2 -2
- package/dist/types/generated/test_v3.d.ts +669 -41
- package/dist/types/generated/test_v3.d.ts.map +1 -1
- package/dist/types/generated/type_v3.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1697,6 +1697,10 @@ export type Routing63 = {
|
|
|
1697
1697
|
} | {
|
|
1698
1698
|
[k: string]: unknown;
|
|
1699
1699
|
};
|
|
1700
|
+
/**
|
|
1701
|
+
* Open (provision) one or more surfaces and register them by name so later steps can target them with `surface`. Three kinds: a native APP (Windows/macOS desktop by executable path, `.app` path, bundle ID, or UWP AppUserModelID; Android/iOS apps on managed emulators/simulators — macOS desktop additionally requires the Accessibility permission for the process that runs Doc Detective), a BROWSER session (opens blank and ready on the context's automation server; navigate it with a `goTo` step), or a background PROCESS (equivalent to `runShell` with `background` — both forms stay valid). An ARRAY of descriptors opens them all concurrently — the step completes when every one is ready, and device boots overlap. See docs/design/multi-surface-targeting.md and docs/design/native-app-surfaces.md.
|
|
1702
|
+
*/
|
|
1703
|
+
export type StartSurface1 = AppDescriptor | BrowserDescriptor | ProcessDescriptor | ParallelSurfaces;
|
|
1700
1704
|
export type DeviceByName1 = string;
|
|
1701
1705
|
/**
|
|
1702
1706
|
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
@@ -1716,6 +1720,34 @@ export type ElementCriteria2 = {
|
|
|
1716
1720
|
} | {
|
|
1717
1721
|
[k: string]: unknown;
|
|
1718
1722
|
};
|
|
1723
|
+
/**
|
|
1724
|
+
* Open several surfaces concurrently (any mix of kinds). All descriptors launch in parallel; the step completes when every one is ready. Names must be unique within the array and across the context's open surfaces (checked at runtime). Device boots overlap — worth real wall-clock on 30–60s emulator starts.
|
|
1725
|
+
*
|
|
1726
|
+
* @minItems 1
|
|
1727
|
+
*/
|
|
1728
|
+
export type ParallelSurfaces = [
|
|
1729
|
+
AppDescriptor1 | BrowserDescriptor1 | ProcessDescriptor1,
|
|
1730
|
+
...(AppDescriptor1 | BrowserDescriptor1 | ProcessDescriptor1)[]
|
|
1731
|
+
];
|
|
1732
|
+
export type DeviceByName2 = string;
|
|
1733
|
+
/**
|
|
1734
|
+
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
1735
|
+
*/
|
|
1736
|
+
export type ElementCriteria3 = {
|
|
1737
|
+
[k: string]: unknown;
|
|
1738
|
+
} | {
|
|
1739
|
+
[k: string]: unknown;
|
|
1740
|
+
} | {
|
|
1741
|
+
[k: string]: unknown;
|
|
1742
|
+
} | {
|
|
1743
|
+
[k: string]: unknown;
|
|
1744
|
+
} | {
|
|
1745
|
+
[k: string]: unknown;
|
|
1746
|
+
} | {
|
|
1747
|
+
[k: string]: unknown;
|
|
1748
|
+
} | {
|
|
1749
|
+
[k: string]: unknown;
|
|
1750
|
+
};
|
|
1719
1751
|
/**
|
|
1720
1752
|
* A condition expression, or an array of expressions combined with logical AND.
|
|
1721
1753
|
*/
|
|
@@ -3052,7 +3084,7 @@ export type TypeKeysDetailed1 = {
|
|
|
3052
3084
|
/**
|
|
3053
3085
|
* After sending the keys, wait until the surface is ready. Requires a `surface`; the allowed conditions depend on the surface kind: a process surface accepts `stdio`/`delayMs`, a browser surface accepts `networkIdleTime`/`domIdleTime`/`find`, an app surface accepts `delayMs`/`find`. No condition applies by default.
|
|
3054
3086
|
*/
|
|
3055
|
-
waitUntil?: ProcessReadiness1 | BrowserReadiness1 |
|
|
3087
|
+
waitUntil?: ProcessReadiness1 | BrowserReadiness1 | AppReadiness3;
|
|
3056
3088
|
/**
|
|
3057
3089
|
* Maximum time in milliseconds to wait for `waitUntil` after sending the keys.
|
|
3058
3090
|
*/
|
|
@@ -3139,7 +3171,7 @@ export type ByName33 = string;
|
|
|
3139
3171
|
/**
|
|
3140
3172
|
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
3141
3173
|
*/
|
|
3142
|
-
export type
|
|
3174
|
+
export type ElementCriteria4 = {
|
|
3143
3175
|
[k: string]: unknown;
|
|
3144
3176
|
} | {
|
|
3145
3177
|
[k: string]: unknown;
|
|
@@ -3157,7 +3189,7 @@ export type ElementCriteria3 = {
|
|
|
3157
3189
|
/**
|
|
3158
3190
|
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
3159
3191
|
*/
|
|
3160
|
-
export type
|
|
3192
|
+
export type ElementCriteria5 = {
|
|
3161
3193
|
[k: string]: unknown;
|
|
3162
3194
|
} | {
|
|
3163
3195
|
[k: string]: unknown;
|
|
@@ -3816,11 +3848,43 @@ export type Routing143 = {
|
|
|
3816
3848
|
} | {
|
|
3817
3849
|
[k: string]: unknown;
|
|
3818
3850
|
};
|
|
3819
|
-
|
|
3851
|
+
/**
|
|
3852
|
+
* Open (provision) one or more surfaces and register them by name so later steps can target them with `surface`. Three kinds: a native APP (Windows/macOS desktop by executable path, `.app` path, bundle ID, or UWP AppUserModelID; Android/iOS apps on managed emulators/simulators — macOS desktop additionally requires the Accessibility permission for the process that runs Doc Detective), a BROWSER session (opens blank and ready on the context's automation server; navigate it with a `goTo` step), or a background PROCESS (equivalent to `runShell` with `background` — both forms stay valid). An ARRAY of descriptors opens them all concurrently — the step completes when every one is ready, and device boots overlap. See docs/design/multi-surface-targeting.md and docs/design/native-app-surfaces.md.
|
|
3853
|
+
*/
|
|
3854
|
+
export type StartSurface3 = AppDescriptor2 | BrowserDescriptor2 | ProcessDescriptor2 | ParallelSurfaces1;
|
|
3855
|
+
export type DeviceByName3 = string;
|
|
3820
3856
|
/**
|
|
3821
3857
|
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
3822
3858
|
*/
|
|
3823
|
-
export type
|
|
3859
|
+
export type ElementCriteria6 = {
|
|
3860
|
+
[k: string]: unknown;
|
|
3861
|
+
} | {
|
|
3862
|
+
[k: string]: unknown;
|
|
3863
|
+
} | {
|
|
3864
|
+
[k: string]: unknown;
|
|
3865
|
+
} | {
|
|
3866
|
+
[k: string]: unknown;
|
|
3867
|
+
} | {
|
|
3868
|
+
[k: string]: unknown;
|
|
3869
|
+
} | {
|
|
3870
|
+
[k: string]: unknown;
|
|
3871
|
+
} | {
|
|
3872
|
+
[k: string]: unknown;
|
|
3873
|
+
};
|
|
3874
|
+
/**
|
|
3875
|
+
* Open several surfaces concurrently (any mix of kinds). All descriptors launch in parallel; the step completes when every one is ready. Names must be unique within the array and across the context's open surfaces (checked at runtime). Device boots overlap — worth real wall-clock on 30–60s emulator starts.
|
|
3876
|
+
*
|
|
3877
|
+
* @minItems 1
|
|
3878
|
+
*/
|
|
3879
|
+
export type ParallelSurfaces1 = [
|
|
3880
|
+
AppDescriptor3 | BrowserDescriptor3 | ProcessDescriptor3,
|
|
3881
|
+
...(AppDescriptor3 | BrowserDescriptor3 | ProcessDescriptor3)[]
|
|
3882
|
+
];
|
|
3883
|
+
export type DeviceByName4 = string;
|
|
3884
|
+
/**
|
|
3885
|
+
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
3886
|
+
*/
|
|
3887
|
+
export type ElementCriteria7 = {
|
|
3824
3888
|
[k: string]: unknown;
|
|
3825
3889
|
} | {
|
|
3826
3890
|
[k: string]: unknown;
|
|
@@ -5106,7 +5170,7 @@ export interface GoTo {
|
|
|
5106
5170
|
}
|
|
5107
5171
|
export interface BrowserSurface {
|
|
5108
5172
|
/**
|
|
5109
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
5173
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
5110
5174
|
*/
|
|
5111
5175
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
5112
5176
|
/**
|
|
@@ -5909,7 +5973,7 @@ export interface RunBrowserScriptDetailed {
|
|
|
5909
5973
|
}
|
|
5910
5974
|
export interface BrowserSurface1 {
|
|
5911
5975
|
/**
|
|
5912
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
5976
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
5913
5977
|
*/
|
|
5914
5978
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
5915
5979
|
/**
|
|
@@ -6100,7 +6164,7 @@ export interface ProcessSurface {
|
|
|
6100
6164
|
}
|
|
6101
6165
|
export interface BrowserSurface2 {
|
|
6102
6166
|
/**
|
|
6103
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
6167
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
6104
6168
|
*/
|
|
6105
6169
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
6106
6170
|
/**
|
|
@@ -6374,7 +6438,7 @@ export interface CaptureScreenshotFields {
|
|
|
6374
6438
|
}
|
|
6375
6439
|
export interface BrowserSurface3 {
|
|
6376
6440
|
/**
|
|
6377
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
6441
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
6378
6442
|
*/
|
|
6379
6443
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
6380
6444
|
/**
|
|
@@ -6769,7 +6833,7 @@ export interface RecordDetailed {
|
|
|
6769
6833
|
}
|
|
6770
6834
|
export interface BrowserSurface4 {
|
|
6771
6835
|
/**
|
|
6772
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
6836
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
6773
6837
|
*/
|
|
6774
6838
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
6775
6839
|
/**
|
|
@@ -7138,7 +7202,7 @@ export interface ProcessSurface1 {
|
|
|
7138
7202
|
}
|
|
7139
7203
|
export interface BrowserSurface5 {
|
|
7140
7204
|
/**
|
|
7141
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
7205
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
7142
7206
|
*/
|
|
7143
7207
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
7144
7208
|
/**
|
|
@@ -7213,7 +7277,7 @@ export interface ProcessSurface2 {
|
|
|
7213
7277
|
}
|
|
7214
7278
|
export interface BrowserSurface6 {
|
|
7215
7279
|
/**
|
|
7216
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
7280
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
7217
7281
|
*/
|
|
7218
7282
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
7219
7283
|
/**
|
|
@@ -7417,10 +7481,7 @@ export interface StartSurface {
|
|
|
7417
7481
|
startSurface: StartSurface1;
|
|
7418
7482
|
[k: string]: unknown;
|
|
7419
7483
|
}
|
|
7420
|
-
|
|
7421
|
-
* Open (provision) a surface and register it by name so later steps can target it with `surface`. Phases A1–A2 ship the desktop native app branch: launch a Windows or macOS application by executable path, `.app` path, bundle ID, or UWP AppUserModelID. macOS additionally requires the Accessibility permission for the process that runs Doc Detective (System Settings → Privacy & Security → Accessibility); without it the context lands as SKIPPED with a walkthrough. Phase A3 adds Android apps on a managed emulator, and phase A4 adds iOS app surfaces on macOS via XCUITest/simctl. Browser/process branches and the parallel array form arrive with multi-surface Phase 6. See docs/design/native-app-surfaces.md.
|
|
7422
|
-
*/
|
|
7423
|
-
export interface StartSurface1 {
|
|
7484
|
+
export interface AppDescriptor {
|
|
7424
7485
|
/**
|
|
7425
7486
|
* The app identifier: an executable path (`C:\\Windows\\System32\\notepad.exe`), a `.app` path, a bundle ID (`com.apple.TextEdit`), a package name (`com.example.myapp`), or a UWP AppUserModelID (`Microsoft.WindowsCalculator_8wekyb3d8bbwe!App`). Disambiguated by syntax — never by a type field.
|
|
7426
7487
|
*/
|
|
@@ -7434,7 +7495,7 @@ export interface StartSurface1 {
|
|
|
7434
7495
|
*/
|
|
7435
7496
|
args?: string[];
|
|
7436
7497
|
/**
|
|
7437
|
-
* Working directory for the launched app
|
|
7498
|
+
* Working directory for the launched app. Not honored by the current desktop app drivers, so a non-default value fails with guidance: on Windows the NovaWindows driver ignores it (the app inherits the driver's own working directory), and on macOS the driver launches apps through LaunchServices, which offers no working-directory control. Launch the app via runShell if the cwd matters. Reserved for when a driver gains support. Default: the run's working directory.
|
|
7438
7499
|
*/
|
|
7439
7500
|
workingDirectory?: string;
|
|
7440
7501
|
/**
|
|
@@ -7515,6 +7576,291 @@ export interface AppReadiness1 {
|
|
|
7515
7576
|
delayMs?: number;
|
|
7516
7577
|
find?: ElementCriteria2;
|
|
7517
7578
|
}
|
|
7579
|
+
export interface BrowserDescriptor {
|
|
7580
|
+
/**
|
|
7581
|
+
* Browser engine to open. The session opens on the context's automation server with a blank page and registers as a surface; use a goTo step (with `surface`) to navigate it. No cross-engine fallback — the one exception is `edge`, which is Chromium and opens on the same Chrome/chromedriver stack (it registers under the `chrome` engine, and defaults its surface name to `chrome` when you don't set one).
|
|
7582
|
+
*/
|
|
7583
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
7584
|
+
/**
|
|
7585
|
+
* Surface-registry name later steps use in `surface`. Default: the engine name. Must be unique across all open surfaces — the context's default browser already owns its engine name, so name a second same-engine session explicitly. An engine keyword may only name a session of that engine.
|
|
7586
|
+
*/
|
|
7587
|
+
name?: string;
|
|
7588
|
+
/**
|
|
7589
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
7590
|
+
*/
|
|
7591
|
+
headless?: boolean;
|
|
7592
|
+
size?: BrowserWindowSize;
|
|
7593
|
+
viewport?: BrowserViewportSize;
|
|
7594
|
+
/**
|
|
7595
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
7596
|
+
*/
|
|
7597
|
+
driverOptions?: {
|
|
7598
|
+
[k: string]: unknown;
|
|
7599
|
+
};
|
|
7600
|
+
}
|
|
7601
|
+
/**
|
|
7602
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
7603
|
+
*/
|
|
7604
|
+
export interface BrowserWindowSize {
|
|
7605
|
+
/**
|
|
7606
|
+
* Outer window width in pixels.
|
|
7607
|
+
*/
|
|
7608
|
+
width?: number;
|
|
7609
|
+
/**
|
|
7610
|
+
* Outer window height in pixels.
|
|
7611
|
+
*/
|
|
7612
|
+
height?: number;
|
|
7613
|
+
}
|
|
7614
|
+
/**
|
|
7615
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
7616
|
+
*/
|
|
7617
|
+
export interface BrowserViewportSize {
|
|
7618
|
+
/**
|
|
7619
|
+
* Viewport width in pixels.
|
|
7620
|
+
*/
|
|
7621
|
+
width?: number;
|
|
7622
|
+
/**
|
|
7623
|
+
* Viewport height in pixels.
|
|
7624
|
+
*/
|
|
7625
|
+
height?: number;
|
|
7626
|
+
}
|
|
7627
|
+
export interface ProcessDescriptor {
|
|
7628
|
+
/**
|
|
7629
|
+
* Shell command to start as a long-running background process (same shell semantics as runShell: pipes, `&&`, globbing, environment-variable expansion). Equivalent to a `runShell` step with `background` — both forms remain valid.
|
|
7630
|
+
*/
|
|
7631
|
+
process: string;
|
|
7632
|
+
/**
|
|
7633
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
7634
|
+
*/
|
|
7635
|
+
name: string;
|
|
7636
|
+
/**
|
|
7637
|
+
* Arguments for the command.
|
|
7638
|
+
*/
|
|
7639
|
+
args?: string[];
|
|
7640
|
+
/**
|
|
7641
|
+
* Working directory for the process.
|
|
7642
|
+
*/
|
|
7643
|
+
workingDirectory?: string;
|
|
7644
|
+
/**
|
|
7645
|
+
* Run the process in a pseudo-terminal (PTY) instead of a pipe, so full-screen/interactive TUIs (those that check `isTTY`) render and accept keystrokes. Requires the PTY backend `@homebridge/node-pty-prebuilt-multiarch` to be installed (`npm install @homebridge/node-pty-prebuilt-multiarch`); it is not bundled, and if it is unavailable the descriptor is skipped. `stdout` and `stderr` are merged into one stream in PTY mode. PTY output includes raw ANSI escape sequences (colors, cursor movement); `waitUntil.stdio` patterns should target text that renders without interleaved control codes, or use a regex that tolerates them.
|
|
7646
|
+
*/
|
|
7647
|
+
tty?: boolean;
|
|
7648
|
+
/**
|
|
7649
|
+
* Conditions that must all be met before the process is considered ready and the descriptor completes. Omit to consider the process ready as soon as it is spawned. Specify any combination; every condition given must pass before `timeout` elapses. Note: a process that forks a daemon and then exits (common for some Docker images and databases) is treated as having exited before becoming ready and the descriptor fails — use `port`, `httpGet`, or `delayMs` for those rather than a condition that depends on the foreground process staying alive.
|
|
7650
|
+
*/
|
|
7651
|
+
waitUntil?: {
|
|
7652
|
+
/**
|
|
7653
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
7654
|
+
*/
|
|
7655
|
+
port?: number;
|
|
7656
|
+
/**
|
|
7657
|
+
* Wait until the process's output contains this content. Searches both stdout and stderr. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/ready on \d+/`.
|
|
7658
|
+
*/
|
|
7659
|
+
stdio?: string;
|
|
7660
|
+
/**
|
|
7661
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
7662
|
+
*/
|
|
7663
|
+
httpGet?: string;
|
|
7664
|
+
/**
|
|
7665
|
+
* Wait at least this many milliseconds.
|
|
7666
|
+
*/
|
|
7667
|
+
delayMs?: number;
|
|
7668
|
+
};
|
|
7669
|
+
/**
|
|
7670
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
7671
|
+
*/
|
|
7672
|
+
timeout?: number;
|
|
7673
|
+
}
|
|
7674
|
+
export interface AppDescriptor1 {
|
|
7675
|
+
/**
|
|
7676
|
+
* The app identifier: an executable path (`C:\\Windows\\System32\\notepad.exe`), a `.app` path, a bundle ID (`com.apple.TextEdit`), a package name (`com.example.myapp`), or a UWP AppUserModelID (`Microsoft.WindowsCalculator_8wekyb3d8bbwe!App`). Disambiguated by syntax — never by a type field.
|
|
7677
|
+
*/
|
|
7678
|
+
app: string;
|
|
7679
|
+
/**
|
|
7680
|
+
* Surface-registry name later steps use in `surface`. Default: the executable basename without extension, or the final dot-segment of an ID.
|
|
7681
|
+
*/
|
|
7682
|
+
name?: string;
|
|
7683
|
+
/**
|
|
7684
|
+
* Launch arguments (desktop apps). On macOS they pass to the app as a real argument array. On Windows they join into a single shell-style argument string for the driver, so an argument with embedded spaces must carry its own quotes (e.g. "\"My File.txt\"").
|
|
7685
|
+
*/
|
|
7686
|
+
args?: string[];
|
|
7687
|
+
/**
|
|
7688
|
+
* Working directory for the launched app. Not honored by the current desktop app drivers, so a non-default value fails with guidance: on Windows the NovaWindows driver ignores it (the app inherits the driver's own working directory), and on macOS the driver launches apps through LaunchServices, which offers no working-directory control. Launch the app via runShell if the cwd matters. Reserved for when a driver gains support. Default: the run's working directory.
|
|
7689
|
+
*/
|
|
7690
|
+
workingDirectory?: string;
|
|
7691
|
+
/**
|
|
7692
|
+
* Extra environment variables for the launched app (desktop apps). Supported on macOS; not supported by the Windows driver, where any value fails with guidance (set variables in the shell that launches Doc Detective instead).
|
|
7693
|
+
*/
|
|
7694
|
+
env?: {
|
|
7695
|
+
[k: string]: string;
|
|
7696
|
+
};
|
|
7697
|
+
/**
|
|
7698
|
+
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch. Supported on Android and iOS app surfaces.
|
|
7699
|
+
*/
|
|
7700
|
+
install?: string;
|
|
7701
|
+
/**
|
|
7702
|
+
* Android main activity override (defaults to the package's launcher activity). Android-only.
|
|
7703
|
+
*/
|
|
7704
|
+
activity?: string;
|
|
7705
|
+
/**
|
|
7706
|
+
* Device the app runs on. Omit for a host desktop app, or (in a mobile context) to use the context's default device. A string references a device by name; an object refines it. Supported on Android and iOS mobile targets.
|
|
7707
|
+
*/
|
|
7708
|
+
device?: DeviceByName2 | (DeviceDescriptor2 & {
|
|
7709
|
+
[k: string]: unknown;
|
|
7710
|
+
});
|
|
7711
|
+
/**
|
|
7712
|
+
* Escape-hatch passthrough: merged into the automation session's capabilities after the ones Doc Detective computes (namespaced per driver, e.g. `appium:noReset`). Driver- and version-specific; use sparingly.
|
|
7713
|
+
*/
|
|
7714
|
+
driverOptions?: {
|
|
7715
|
+
[k: string]: unknown;
|
|
7716
|
+
};
|
|
7717
|
+
waitUntil?: AppReadiness2;
|
|
7718
|
+
/**
|
|
7719
|
+
* Startup ceiling in milliseconds (launch + install + readiness).
|
|
7720
|
+
*/
|
|
7721
|
+
timeout?: number;
|
|
7722
|
+
}
|
|
7723
|
+
export interface DeviceDescriptor2 {
|
|
7724
|
+
/**
|
|
7725
|
+
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
7726
|
+
*/
|
|
7727
|
+
platform?: "android" | "ios";
|
|
7728
|
+
/**
|
|
7729
|
+
* Device name and registry identity — the same name resolves to the same device. Reference form: names an existing AVD (Android) / simulator (iOS) to reuse. If no device by this name exists, Doc Detective creates one under this name using `deviceType`/`osVersion` (or their defaults), provided the toolchain is installed (`doc-detective install android` or `doc-detective install ios`).
|
|
7730
|
+
*/
|
|
7731
|
+
name?: string;
|
|
7732
|
+
/**
|
|
7733
|
+
* Abstract hardware profile used when creating a device (portable across `android`/`ios`). Doc Detective maps it to a built-in profile. Ignored when `name` already matches an existing device. Default: `phone`.
|
|
7734
|
+
*/
|
|
7735
|
+
deviceType?: "phone" | "tablet";
|
|
7736
|
+
/**
|
|
7737
|
+
* Platform version used when creating a device; must match an installed image/runtime for the target platform (install more with `doc-detective install android` or `doc-detective install ios`). Ignored when `name` already matches an existing device. Default: the newest installed version.
|
|
7738
|
+
*/
|
|
7739
|
+
osVersion?: string;
|
|
7740
|
+
/**
|
|
7741
|
+
* Run the Android emulator without a window. No-op on iOS (simulators boot without the Simulator UI on CI) and ignored where not applicable.
|
|
7742
|
+
*/
|
|
7743
|
+
headless?: boolean;
|
|
7744
|
+
/**
|
|
7745
|
+
* Initial orientation. Reserved; validated now, not yet implemented.
|
|
7746
|
+
*/
|
|
7747
|
+
orientation?: "portrait" | "landscape";
|
|
7748
|
+
/**
|
|
7749
|
+
* Pin a specific device/emulator instance by UDID. Reserved; validated now, not yet implemented.
|
|
7750
|
+
*/
|
|
7751
|
+
udid?: string;
|
|
7752
|
+
/**
|
|
7753
|
+
* Cloud device farm configuration, keyed by provider. Reserved; validated now, not yet implemented.
|
|
7754
|
+
*/
|
|
7755
|
+
provider?: {
|
|
7756
|
+
[k: string]: unknown;
|
|
7757
|
+
};
|
|
7758
|
+
}
|
|
7759
|
+
/**
|
|
7760
|
+
* Startup readiness: a fixed delay and/or an element that must exist before the surface is considered open. No condition applies by default.
|
|
7761
|
+
*/
|
|
7762
|
+
export interface AppReadiness2 {
|
|
7763
|
+
/**
|
|
7764
|
+
* Fixed delay (ms).
|
|
7765
|
+
*/
|
|
7766
|
+
delayMs?: number;
|
|
7767
|
+
find?: ElementCriteria3;
|
|
7768
|
+
}
|
|
7769
|
+
export interface BrowserDescriptor1 {
|
|
7770
|
+
/**
|
|
7771
|
+
* Browser engine to open. The session opens on the context's automation server with a blank page and registers as a surface; use a goTo step (with `surface`) to navigate it. No cross-engine fallback — the one exception is `edge`, which is Chromium and opens on the same Chrome/chromedriver stack (it registers under the `chrome` engine, and defaults its surface name to `chrome` when you don't set one).
|
|
7772
|
+
*/
|
|
7773
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
7774
|
+
/**
|
|
7775
|
+
* Surface-registry name later steps use in `surface`. Default: the engine name. Must be unique across all open surfaces — the context's default browser already owns its engine name, so name a second same-engine session explicitly. An engine keyword may only name a session of that engine.
|
|
7776
|
+
*/
|
|
7777
|
+
name?: string;
|
|
7778
|
+
/**
|
|
7779
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
7780
|
+
*/
|
|
7781
|
+
headless?: boolean;
|
|
7782
|
+
size?: BrowserWindowSize1;
|
|
7783
|
+
viewport?: BrowserViewportSize1;
|
|
7784
|
+
/**
|
|
7785
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
7786
|
+
*/
|
|
7787
|
+
driverOptions?: {
|
|
7788
|
+
[k: string]: unknown;
|
|
7789
|
+
};
|
|
7790
|
+
}
|
|
7791
|
+
/**
|
|
7792
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
7793
|
+
*/
|
|
7794
|
+
export interface BrowserWindowSize1 {
|
|
7795
|
+
/**
|
|
7796
|
+
* Outer window width in pixels.
|
|
7797
|
+
*/
|
|
7798
|
+
width?: number;
|
|
7799
|
+
/**
|
|
7800
|
+
* Outer window height in pixels.
|
|
7801
|
+
*/
|
|
7802
|
+
height?: number;
|
|
7803
|
+
}
|
|
7804
|
+
/**
|
|
7805
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
7806
|
+
*/
|
|
7807
|
+
export interface BrowserViewportSize1 {
|
|
7808
|
+
/**
|
|
7809
|
+
* Viewport width in pixels.
|
|
7810
|
+
*/
|
|
7811
|
+
width?: number;
|
|
7812
|
+
/**
|
|
7813
|
+
* Viewport height in pixels.
|
|
7814
|
+
*/
|
|
7815
|
+
height?: number;
|
|
7816
|
+
}
|
|
7817
|
+
export interface ProcessDescriptor1 {
|
|
7818
|
+
/**
|
|
7819
|
+
* Shell command to start as a long-running background process (same shell semantics as runShell: pipes, `&&`, globbing, environment-variable expansion). Equivalent to a `runShell` step with `background` — both forms remain valid.
|
|
7820
|
+
*/
|
|
7821
|
+
process: string;
|
|
7822
|
+
/**
|
|
7823
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
7824
|
+
*/
|
|
7825
|
+
name: string;
|
|
7826
|
+
/**
|
|
7827
|
+
* Arguments for the command.
|
|
7828
|
+
*/
|
|
7829
|
+
args?: string[];
|
|
7830
|
+
/**
|
|
7831
|
+
* Working directory for the process.
|
|
7832
|
+
*/
|
|
7833
|
+
workingDirectory?: string;
|
|
7834
|
+
/**
|
|
7835
|
+
* Run the process in a pseudo-terminal (PTY) instead of a pipe, so full-screen/interactive TUIs (those that check `isTTY`) render and accept keystrokes. Requires the PTY backend `@homebridge/node-pty-prebuilt-multiarch` to be installed (`npm install @homebridge/node-pty-prebuilt-multiarch`); it is not bundled, and if it is unavailable the descriptor is skipped. `stdout` and `stderr` are merged into one stream in PTY mode. PTY output includes raw ANSI escape sequences (colors, cursor movement); `waitUntil.stdio` patterns should target text that renders without interleaved control codes, or use a regex that tolerates them.
|
|
7836
|
+
*/
|
|
7837
|
+
tty?: boolean;
|
|
7838
|
+
/**
|
|
7839
|
+
* Conditions that must all be met before the process is considered ready and the descriptor completes. Omit to consider the process ready as soon as it is spawned. Specify any combination; every condition given must pass before `timeout` elapses. Note: a process that forks a daemon and then exits (common for some Docker images and databases) is treated as having exited before becoming ready and the descriptor fails — use `port`, `httpGet`, or `delayMs` for those rather than a condition that depends on the foreground process staying alive.
|
|
7840
|
+
*/
|
|
7841
|
+
waitUntil?: {
|
|
7842
|
+
/**
|
|
7843
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
7844
|
+
*/
|
|
7845
|
+
port?: number;
|
|
7846
|
+
/**
|
|
7847
|
+
* Wait until the process's output contains this content. Searches both stdout and stderr. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/ready on \d+/`.
|
|
7848
|
+
*/
|
|
7849
|
+
stdio?: string;
|
|
7850
|
+
/**
|
|
7851
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
7852
|
+
*/
|
|
7853
|
+
httpGet?: string;
|
|
7854
|
+
/**
|
|
7855
|
+
* Wait at least this many milliseconds.
|
|
7856
|
+
*/
|
|
7857
|
+
delayMs?: number;
|
|
7858
|
+
};
|
|
7859
|
+
/**
|
|
7860
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
7861
|
+
*/
|
|
7862
|
+
timeout?: number;
|
|
7863
|
+
}
|
|
7518
7864
|
export interface Common15 {
|
|
7519
7865
|
/**
|
|
7520
7866
|
* JSON Schema for this object.
|
|
@@ -7813,7 +8159,7 @@ export interface DragAndDrop1 {
|
|
|
7813
8159
|
}
|
|
7814
8160
|
export interface BrowserSurface7 {
|
|
7815
8161
|
/**
|
|
7816
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
8162
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
7817
8163
|
*/
|
|
7818
8164
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
7819
8165
|
/**
|
|
@@ -8150,7 +8496,7 @@ export interface SwipeDirectional {
|
|
|
8150
8496
|
}
|
|
8151
8497
|
export interface BrowserSurface8 {
|
|
8152
8498
|
/**
|
|
8153
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
8499
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
8154
8500
|
*/
|
|
8155
8501
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
8156
8502
|
/**
|
|
@@ -8257,7 +8603,7 @@ export interface Point1 {
|
|
|
8257
8603
|
}
|
|
8258
8604
|
export interface BrowserSurface9 {
|
|
8259
8605
|
/**
|
|
8260
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
8606
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
8261
8607
|
*/
|
|
8262
8608
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
8263
8609
|
/**
|
|
@@ -9107,7 +9453,7 @@ export interface GoTo2 {
|
|
|
9107
9453
|
}
|
|
9108
9454
|
export interface BrowserSurface10 {
|
|
9109
9455
|
/**
|
|
9110
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
9456
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
9111
9457
|
*/
|
|
9112
9458
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
9113
9459
|
/**
|
|
@@ -9910,7 +10256,7 @@ export interface RunBrowserScriptDetailed1 {
|
|
|
9910
10256
|
}
|
|
9911
10257
|
export interface BrowserSurface11 {
|
|
9912
10258
|
/**
|
|
9913
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
10259
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
9914
10260
|
*/
|
|
9915
10261
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
9916
10262
|
/**
|
|
@@ -10101,7 +10447,7 @@ export interface ProcessSurface3 {
|
|
|
10101
10447
|
}
|
|
10102
10448
|
export interface BrowserSurface12 {
|
|
10103
10449
|
/**
|
|
10104
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
10450
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
10105
10451
|
*/
|
|
10106
10452
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
10107
10453
|
/**
|
|
@@ -10187,14 +10533,14 @@ export interface BrowserReadiness1 {
|
|
|
10187
10533
|
* Wait for DOM mutations to stop for this duration in milliseconds.
|
|
10188
10534
|
*/
|
|
10189
10535
|
domIdleTime?: number;
|
|
10190
|
-
find?:
|
|
10536
|
+
find?: ElementCriteria4;
|
|
10191
10537
|
}
|
|
10192
|
-
export interface
|
|
10538
|
+
export interface AppReadiness3 {
|
|
10193
10539
|
/**
|
|
10194
10540
|
* Fixed delay (ms).
|
|
10195
10541
|
*/
|
|
10196
10542
|
delayMs?: number;
|
|
10197
|
-
find?:
|
|
10543
|
+
find?: ElementCriteria5;
|
|
10198
10544
|
}
|
|
10199
10545
|
export interface WaitUntilRequiresASurface1 {
|
|
10200
10546
|
[k: string]: unknown;
|
|
@@ -10375,7 +10721,7 @@ export interface CaptureScreenshotFields1 {
|
|
|
10375
10721
|
}
|
|
10376
10722
|
export interface BrowserSurface13 {
|
|
10377
10723
|
/**
|
|
10378
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
10724
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
10379
10725
|
*/
|
|
10380
10726
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
10381
10727
|
/**
|
|
@@ -10770,7 +11116,7 @@ export interface RecordDetailed1 {
|
|
|
10770
11116
|
}
|
|
10771
11117
|
export interface BrowserSurface14 {
|
|
10772
11118
|
/**
|
|
10773
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
11119
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
10774
11120
|
*/
|
|
10775
11121
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
10776
11122
|
/**
|
|
@@ -11139,7 +11485,7 @@ export interface ProcessSurface4 {
|
|
|
11139
11485
|
}
|
|
11140
11486
|
export interface BrowserSurface15 {
|
|
11141
11487
|
/**
|
|
11142
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
11488
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
11143
11489
|
*/
|
|
11144
11490
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
11145
11491
|
/**
|
|
@@ -11214,7 +11560,7 @@ export interface ProcessSurface5 {
|
|
|
11214
11560
|
}
|
|
11215
11561
|
export interface BrowserSurface16 {
|
|
11216
11562
|
/**
|
|
11217
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
11563
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
11218
11564
|
*/
|
|
11219
11565
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
11220
11566
|
/**
|
|
@@ -11418,10 +11764,197 @@ export interface StartSurface2 {
|
|
|
11418
11764
|
startSurface: StartSurface3;
|
|
11419
11765
|
[k: string]: unknown;
|
|
11420
11766
|
}
|
|
11767
|
+
export interface AppDescriptor2 {
|
|
11768
|
+
/**
|
|
11769
|
+
* The app identifier: an executable path (`C:\\Windows\\System32\\notepad.exe`), a `.app` path, a bundle ID (`com.apple.TextEdit`), a package name (`com.example.myapp`), or a UWP AppUserModelID (`Microsoft.WindowsCalculator_8wekyb3d8bbwe!App`). Disambiguated by syntax — never by a type field.
|
|
11770
|
+
*/
|
|
11771
|
+
app: string;
|
|
11772
|
+
/**
|
|
11773
|
+
* Surface-registry name later steps use in `surface`. Default: the executable basename without extension, or the final dot-segment of an ID.
|
|
11774
|
+
*/
|
|
11775
|
+
name?: string;
|
|
11776
|
+
/**
|
|
11777
|
+
* Launch arguments (desktop apps). On macOS they pass to the app as a real argument array. On Windows they join into a single shell-style argument string for the driver, so an argument with embedded spaces must carry its own quotes (e.g. "\"My File.txt\"").
|
|
11778
|
+
*/
|
|
11779
|
+
args?: string[];
|
|
11780
|
+
/**
|
|
11781
|
+
* Working directory for the launched app. Not honored by the current desktop app drivers, so a non-default value fails with guidance: on Windows the NovaWindows driver ignores it (the app inherits the driver's own working directory), and on macOS the driver launches apps through LaunchServices, which offers no working-directory control. Launch the app via runShell if the cwd matters. Reserved for when a driver gains support. Default: the run's working directory.
|
|
11782
|
+
*/
|
|
11783
|
+
workingDirectory?: string;
|
|
11784
|
+
/**
|
|
11785
|
+
* Extra environment variables for the launched app (desktop apps). Supported on macOS; not supported by the Windows driver, where any value fails with guidance (set variables in the shell that launches Doc Detective instead).
|
|
11786
|
+
*/
|
|
11787
|
+
env?: {
|
|
11788
|
+
[k: string]: string;
|
|
11789
|
+
};
|
|
11790
|
+
/**
|
|
11791
|
+
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch. Supported on Android and iOS app surfaces.
|
|
11792
|
+
*/
|
|
11793
|
+
install?: string;
|
|
11794
|
+
/**
|
|
11795
|
+
* Android main activity override (defaults to the package's launcher activity). Android-only.
|
|
11796
|
+
*/
|
|
11797
|
+
activity?: string;
|
|
11798
|
+
/**
|
|
11799
|
+
* Device the app runs on. Omit for a host desktop app, or (in a mobile context) to use the context's default device. A string references a device by name; an object refines it. Supported on Android and iOS mobile targets.
|
|
11800
|
+
*/
|
|
11801
|
+
device?: DeviceByName3 | (DeviceDescriptor3 & {
|
|
11802
|
+
[k: string]: unknown;
|
|
11803
|
+
});
|
|
11804
|
+
/**
|
|
11805
|
+
* Escape-hatch passthrough: merged into the automation session's capabilities after the ones Doc Detective computes (namespaced per driver, e.g. `appium:noReset`). Driver- and version-specific; use sparingly.
|
|
11806
|
+
*/
|
|
11807
|
+
driverOptions?: {
|
|
11808
|
+
[k: string]: unknown;
|
|
11809
|
+
};
|
|
11810
|
+
waitUntil?: AppReadiness4;
|
|
11811
|
+
/**
|
|
11812
|
+
* Startup ceiling in milliseconds (launch + install + readiness).
|
|
11813
|
+
*/
|
|
11814
|
+
timeout?: number;
|
|
11815
|
+
}
|
|
11816
|
+
export interface DeviceDescriptor3 {
|
|
11817
|
+
/**
|
|
11818
|
+
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
11819
|
+
*/
|
|
11820
|
+
platform?: "android" | "ios";
|
|
11821
|
+
/**
|
|
11822
|
+
* Device name and registry identity — the same name resolves to the same device. Reference form: names an existing AVD (Android) / simulator (iOS) to reuse. If no device by this name exists, Doc Detective creates one under this name using `deviceType`/`osVersion` (or their defaults), provided the toolchain is installed (`doc-detective install android` or `doc-detective install ios`).
|
|
11823
|
+
*/
|
|
11824
|
+
name?: string;
|
|
11825
|
+
/**
|
|
11826
|
+
* Abstract hardware profile used when creating a device (portable across `android`/`ios`). Doc Detective maps it to a built-in profile. Ignored when `name` already matches an existing device. Default: `phone`.
|
|
11827
|
+
*/
|
|
11828
|
+
deviceType?: "phone" | "tablet";
|
|
11829
|
+
/**
|
|
11830
|
+
* Platform version used when creating a device; must match an installed image/runtime for the target platform (install more with `doc-detective install android` or `doc-detective install ios`). Ignored when `name` already matches an existing device. Default: the newest installed version.
|
|
11831
|
+
*/
|
|
11832
|
+
osVersion?: string;
|
|
11833
|
+
/**
|
|
11834
|
+
* Run the Android emulator without a window. No-op on iOS (simulators boot without the Simulator UI on CI) and ignored where not applicable.
|
|
11835
|
+
*/
|
|
11836
|
+
headless?: boolean;
|
|
11837
|
+
/**
|
|
11838
|
+
* Initial orientation. Reserved; validated now, not yet implemented.
|
|
11839
|
+
*/
|
|
11840
|
+
orientation?: "portrait" | "landscape";
|
|
11841
|
+
/**
|
|
11842
|
+
* Pin a specific device/emulator instance by UDID. Reserved; validated now, not yet implemented.
|
|
11843
|
+
*/
|
|
11844
|
+
udid?: string;
|
|
11845
|
+
/**
|
|
11846
|
+
* Cloud device farm configuration, keyed by provider. Reserved; validated now, not yet implemented.
|
|
11847
|
+
*/
|
|
11848
|
+
provider?: {
|
|
11849
|
+
[k: string]: unknown;
|
|
11850
|
+
};
|
|
11851
|
+
}
|
|
11852
|
+
/**
|
|
11853
|
+
* Startup readiness: a fixed delay and/or an element that must exist before the surface is considered open. No condition applies by default.
|
|
11854
|
+
*/
|
|
11855
|
+
export interface AppReadiness4 {
|
|
11856
|
+
/**
|
|
11857
|
+
* Fixed delay (ms).
|
|
11858
|
+
*/
|
|
11859
|
+
delayMs?: number;
|
|
11860
|
+
find?: ElementCriteria6;
|
|
11861
|
+
}
|
|
11862
|
+
export interface BrowserDescriptor2 {
|
|
11863
|
+
/**
|
|
11864
|
+
* Browser engine to open. The session opens on the context's automation server with a blank page and registers as a surface; use a goTo step (with `surface`) to navigate it. No cross-engine fallback — the one exception is `edge`, which is Chromium and opens on the same Chrome/chromedriver stack (it registers under the `chrome` engine, and defaults its surface name to `chrome` when you don't set one).
|
|
11865
|
+
*/
|
|
11866
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
11867
|
+
/**
|
|
11868
|
+
* Surface-registry name later steps use in `surface`. Default: the engine name. Must be unique across all open surfaces — the context's default browser already owns its engine name, so name a second same-engine session explicitly. An engine keyword may only name a session of that engine.
|
|
11869
|
+
*/
|
|
11870
|
+
name?: string;
|
|
11871
|
+
/**
|
|
11872
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
11873
|
+
*/
|
|
11874
|
+
headless?: boolean;
|
|
11875
|
+
size?: BrowserWindowSize2;
|
|
11876
|
+
viewport?: BrowserViewportSize2;
|
|
11877
|
+
/**
|
|
11878
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
11879
|
+
*/
|
|
11880
|
+
driverOptions?: {
|
|
11881
|
+
[k: string]: unknown;
|
|
11882
|
+
};
|
|
11883
|
+
}
|
|
11421
11884
|
/**
|
|
11422
|
-
*
|
|
11885
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
11423
11886
|
*/
|
|
11424
|
-
export interface
|
|
11887
|
+
export interface BrowserWindowSize2 {
|
|
11888
|
+
/**
|
|
11889
|
+
* Outer window width in pixels.
|
|
11890
|
+
*/
|
|
11891
|
+
width?: number;
|
|
11892
|
+
/**
|
|
11893
|
+
* Outer window height in pixels.
|
|
11894
|
+
*/
|
|
11895
|
+
height?: number;
|
|
11896
|
+
}
|
|
11897
|
+
/**
|
|
11898
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
11899
|
+
*/
|
|
11900
|
+
export interface BrowserViewportSize2 {
|
|
11901
|
+
/**
|
|
11902
|
+
* Viewport width in pixels.
|
|
11903
|
+
*/
|
|
11904
|
+
width?: number;
|
|
11905
|
+
/**
|
|
11906
|
+
* Viewport height in pixels.
|
|
11907
|
+
*/
|
|
11908
|
+
height?: number;
|
|
11909
|
+
}
|
|
11910
|
+
export interface ProcessDescriptor2 {
|
|
11911
|
+
/**
|
|
11912
|
+
* Shell command to start as a long-running background process (same shell semantics as runShell: pipes, `&&`, globbing, environment-variable expansion). Equivalent to a `runShell` step with `background` — both forms remain valid.
|
|
11913
|
+
*/
|
|
11914
|
+
process: string;
|
|
11915
|
+
/**
|
|
11916
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
11917
|
+
*/
|
|
11918
|
+
name: string;
|
|
11919
|
+
/**
|
|
11920
|
+
* Arguments for the command.
|
|
11921
|
+
*/
|
|
11922
|
+
args?: string[];
|
|
11923
|
+
/**
|
|
11924
|
+
* Working directory for the process.
|
|
11925
|
+
*/
|
|
11926
|
+
workingDirectory?: string;
|
|
11927
|
+
/**
|
|
11928
|
+
* Run the process in a pseudo-terminal (PTY) instead of a pipe, so full-screen/interactive TUIs (those that check `isTTY`) render and accept keystrokes. Requires the PTY backend `@homebridge/node-pty-prebuilt-multiarch` to be installed (`npm install @homebridge/node-pty-prebuilt-multiarch`); it is not bundled, and if it is unavailable the descriptor is skipped. `stdout` and `stderr` are merged into one stream in PTY mode. PTY output includes raw ANSI escape sequences (colors, cursor movement); `waitUntil.stdio` patterns should target text that renders without interleaved control codes, or use a regex that tolerates them.
|
|
11929
|
+
*/
|
|
11930
|
+
tty?: boolean;
|
|
11931
|
+
/**
|
|
11932
|
+
* Conditions that must all be met before the process is considered ready and the descriptor completes. Omit to consider the process ready as soon as it is spawned. Specify any combination; every condition given must pass before `timeout` elapses. Note: a process that forks a daemon and then exits (common for some Docker images and databases) is treated as having exited before becoming ready and the descriptor fails — use `port`, `httpGet`, or `delayMs` for those rather than a condition that depends on the foreground process staying alive.
|
|
11933
|
+
*/
|
|
11934
|
+
waitUntil?: {
|
|
11935
|
+
/**
|
|
11936
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
11937
|
+
*/
|
|
11938
|
+
port?: number;
|
|
11939
|
+
/**
|
|
11940
|
+
* Wait until the process's output contains this content. Searches both stdout and stderr. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/ready on \d+/`.
|
|
11941
|
+
*/
|
|
11942
|
+
stdio?: string;
|
|
11943
|
+
/**
|
|
11944
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
11945
|
+
*/
|
|
11946
|
+
httpGet?: string;
|
|
11947
|
+
/**
|
|
11948
|
+
* Wait at least this many milliseconds.
|
|
11949
|
+
*/
|
|
11950
|
+
delayMs?: number;
|
|
11951
|
+
};
|
|
11952
|
+
/**
|
|
11953
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
11954
|
+
*/
|
|
11955
|
+
timeout?: number;
|
|
11956
|
+
}
|
|
11957
|
+
export interface AppDescriptor3 {
|
|
11425
11958
|
/**
|
|
11426
11959
|
* The app identifier: an executable path (`C:\\Windows\\System32\\notepad.exe`), a `.app` path, a bundle ID (`com.apple.TextEdit`), a package name (`com.example.myapp`), or a UWP AppUserModelID (`Microsoft.WindowsCalculator_8wekyb3d8bbwe!App`). Disambiguated by syntax — never by a type field.
|
|
11427
11960
|
*/
|
|
@@ -11435,7 +11968,7 @@ export interface StartSurface3 {
|
|
|
11435
11968
|
*/
|
|
11436
11969
|
args?: string[];
|
|
11437
11970
|
/**
|
|
11438
|
-
* Working directory for the launched app
|
|
11971
|
+
* Working directory for the launched app. Not honored by the current desktop app drivers, so a non-default value fails with guidance: on Windows the NovaWindows driver ignores it (the app inherits the driver's own working directory), and on macOS the driver launches apps through LaunchServices, which offers no working-directory control. Launch the app via runShell if the cwd matters. Reserved for when a driver gains support. Default: the run's working directory.
|
|
11439
11972
|
*/
|
|
11440
11973
|
workingDirectory?: string;
|
|
11441
11974
|
/**
|
|
@@ -11455,7 +11988,7 @@ export interface StartSurface3 {
|
|
|
11455
11988
|
/**
|
|
11456
11989
|
* Device the app runs on. Omit for a host desktop app, or (in a mobile context) to use the context's default device. A string references a device by name; an object refines it. Supported on Android and iOS mobile targets.
|
|
11457
11990
|
*/
|
|
11458
|
-
device?:
|
|
11991
|
+
device?: DeviceByName4 | (DeviceDescriptor4 & {
|
|
11459
11992
|
[k: string]: unknown;
|
|
11460
11993
|
});
|
|
11461
11994
|
/**
|
|
@@ -11464,13 +11997,13 @@ export interface StartSurface3 {
|
|
|
11464
11997
|
driverOptions?: {
|
|
11465
11998
|
[k: string]: unknown;
|
|
11466
11999
|
};
|
|
11467
|
-
waitUntil?:
|
|
12000
|
+
waitUntil?: AppReadiness5;
|
|
11468
12001
|
/**
|
|
11469
12002
|
* Startup ceiling in milliseconds (launch + install + readiness).
|
|
11470
12003
|
*/
|
|
11471
12004
|
timeout?: number;
|
|
11472
12005
|
}
|
|
11473
|
-
export interface
|
|
12006
|
+
export interface DeviceDescriptor4 {
|
|
11474
12007
|
/**
|
|
11475
12008
|
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
11476
12009
|
*/
|
|
@@ -11509,12 +12042,107 @@ export interface DeviceDescriptor2 {
|
|
|
11509
12042
|
/**
|
|
11510
12043
|
* Startup readiness: a fixed delay and/or an element that must exist before the surface is considered open. No condition applies by default.
|
|
11511
12044
|
*/
|
|
11512
|
-
export interface
|
|
12045
|
+
export interface AppReadiness5 {
|
|
11513
12046
|
/**
|
|
11514
12047
|
* Fixed delay (ms).
|
|
11515
12048
|
*/
|
|
11516
12049
|
delayMs?: number;
|
|
11517
|
-
find?:
|
|
12050
|
+
find?: ElementCriteria7;
|
|
12051
|
+
}
|
|
12052
|
+
export interface BrowserDescriptor3 {
|
|
12053
|
+
/**
|
|
12054
|
+
* Browser engine to open. The session opens on the context's automation server with a blank page and registers as a surface; use a goTo step (with `surface`) to navigate it. No cross-engine fallback — the one exception is `edge`, which is Chromium and opens on the same Chrome/chromedriver stack (it registers under the `chrome` engine, and defaults its surface name to `chrome` when you don't set one).
|
|
12055
|
+
*/
|
|
12056
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
12057
|
+
/**
|
|
12058
|
+
* Surface-registry name later steps use in `surface`. Default: the engine name. Must be unique across all open surfaces — the context's default browser already owns its engine name, so name a second same-engine session explicitly. An engine keyword may only name a session of that engine.
|
|
12059
|
+
*/
|
|
12060
|
+
name?: string;
|
|
12061
|
+
/**
|
|
12062
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
12063
|
+
*/
|
|
12064
|
+
headless?: boolean;
|
|
12065
|
+
size?: BrowserWindowSize3;
|
|
12066
|
+
viewport?: BrowserViewportSize3;
|
|
12067
|
+
/**
|
|
12068
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
12069
|
+
*/
|
|
12070
|
+
driverOptions?: {
|
|
12071
|
+
[k: string]: unknown;
|
|
12072
|
+
};
|
|
12073
|
+
}
|
|
12074
|
+
/**
|
|
12075
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
12076
|
+
*/
|
|
12077
|
+
export interface BrowserWindowSize3 {
|
|
12078
|
+
/**
|
|
12079
|
+
* Outer window width in pixels.
|
|
12080
|
+
*/
|
|
12081
|
+
width?: number;
|
|
12082
|
+
/**
|
|
12083
|
+
* Outer window height in pixels.
|
|
12084
|
+
*/
|
|
12085
|
+
height?: number;
|
|
12086
|
+
}
|
|
12087
|
+
/**
|
|
12088
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
12089
|
+
*/
|
|
12090
|
+
export interface BrowserViewportSize3 {
|
|
12091
|
+
/**
|
|
12092
|
+
* Viewport width in pixels.
|
|
12093
|
+
*/
|
|
12094
|
+
width?: number;
|
|
12095
|
+
/**
|
|
12096
|
+
* Viewport height in pixels.
|
|
12097
|
+
*/
|
|
12098
|
+
height?: number;
|
|
12099
|
+
}
|
|
12100
|
+
export interface ProcessDescriptor3 {
|
|
12101
|
+
/**
|
|
12102
|
+
* Shell command to start as a long-running background process (same shell semantics as runShell: pipes, `&&`, globbing, environment-variable expansion). Equivalent to a `runShell` step with `background` — both forms remain valid.
|
|
12103
|
+
*/
|
|
12104
|
+
process: string;
|
|
12105
|
+
/**
|
|
12106
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
12107
|
+
*/
|
|
12108
|
+
name: string;
|
|
12109
|
+
/**
|
|
12110
|
+
* Arguments for the command.
|
|
12111
|
+
*/
|
|
12112
|
+
args?: string[];
|
|
12113
|
+
/**
|
|
12114
|
+
* Working directory for the process.
|
|
12115
|
+
*/
|
|
12116
|
+
workingDirectory?: string;
|
|
12117
|
+
/**
|
|
12118
|
+
* Run the process in a pseudo-terminal (PTY) instead of a pipe, so full-screen/interactive TUIs (those that check `isTTY`) render and accept keystrokes. Requires the PTY backend `@homebridge/node-pty-prebuilt-multiarch` to be installed (`npm install @homebridge/node-pty-prebuilt-multiarch`); it is not bundled, and if it is unavailable the descriptor is skipped. `stdout` and `stderr` are merged into one stream in PTY mode. PTY output includes raw ANSI escape sequences (colors, cursor movement); `waitUntil.stdio` patterns should target text that renders without interleaved control codes, or use a regex that tolerates them.
|
|
12119
|
+
*/
|
|
12120
|
+
tty?: boolean;
|
|
12121
|
+
/**
|
|
12122
|
+
* Conditions that must all be met before the process is considered ready and the descriptor completes. Omit to consider the process ready as soon as it is spawned. Specify any combination; every condition given must pass before `timeout` elapses. Note: a process that forks a daemon and then exits (common for some Docker images and databases) is treated as having exited before becoming ready and the descriptor fails — use `port`, `httpGet`, or `delayMs` for those rather than a condition that depends on the foreground process staying alive.
|
|
12123
|
+
*/
|
|
12124
|
+
waitUntil?: {
|
|
12125
|
+
/**
|
|
12126
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
12127
|
+
*/
|
|
12128
|
+
port?: number;
|
|
12129
|
+
/**
|
|
12130
|
+
* Wait until the process's output contains this content. Searches both stdout and stderr. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/ready on \d+/`.
|
|
12131
|
+
*/
|
|
12132
|
+
stdio?: string;
|
|
12133
|
+
/**
|
|
12134
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
12135
|
+
*/
|
|
12136
|
+
httpGet?: string;
|
|
12137
|
+
/**
|
|
12138
|
+
* Wait at least this many milliseconds.
|
|
12139
|
+
*/
|
|
12140
|
+
delayMs?: number;
|
|
12141
|
+
};
|
|
12142
|
+
/**
|
|
12143
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
12144
|
+
*/
|
|
12145
|
+
timeout?: number;
|
|
11518
12146
|
}
|
|
11519
12147
|
export interface Common35 {
|
|
11520
12148
|
/**
|
|
@@ -11814,7 +12442,7 @@ export interface DragAndDrop3 {
|
|
|
11814
12442
|
}
|
|
11815
12443
|
export interface BrowserSurface17 {
|
|
11816
12444
|
/**
|
|
11817
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
12445
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
11818
12446
|
*/
|
|
11819
12447
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
11820
12448
|
/**
|
|
@@ -12151,7 +12779,7 @@ export interface SwipeDirectional1 {
|
|
|
12151
12779
|
}
|
|
12152
12780
|
export interface BrowserSurface18 {
|
|
12153
12781
|
/**
|
|
12154
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
12782
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
12155
12783
|
*/
|
|
12156
12784
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
12157
12785
|
/**
|
|
@@ -12258,7 +12886,7 @@ export interface Point3 {
|
|
|
12258
12886
|
}
|
|
12259
12887
|
export interface BrowserSurface19 {
|
|
12260
12888
|
/**
|
|
12261
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
12889
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
12262
12890
|
*/
|
|
12263
12891
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
12264
12892
|
/**
|