@appium/types 1.0.1 → 1.1.1
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/build/lib/commands/other-protocols.d.ts +216 -1
- package/build/lib/commands/other-protocols.d.ts.map +1 -1
- package/build/lib/commands/webdriver.d.ts +25 -0
- package/build/lib/commands/webdriver.d.ts.map +1 -1
- package/build/lib/standard-caps.d.ts +8 -0
- package/build/lib/standard-caps.d.ts.map +1 -1
- package/lib/commands/other-protocols.ts +277 -3
- package/lib/commands/webdriver.ts +36 -0
- package/lib/standard-caps.ts +8 -0
- package/package.json +4 -4
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* Interface for all WebDriver extension commands from other protocols proxied to the external driver.
|
|
3
3
|
*/
|
|
4
4
|
export interface IOtherProtocolCommands {
|
|
5
|
+
/**
|
|
6
|
+
* Chromium DevTools
|
|
7
|
+
*/
|
|
5
8
|
/**
|
|
6
9
|
* Execute a devtools command
|
|
7
10
|
*
|
|
@@ -11,11 +14,187 @@ export interface IOtherProtocolCommands {
|
|
|
11
14
|
* @returns The result of the command execution
|
|
12
15
|
*/
|
|
13
16
|
executeCdp?(cmd: string, params: unknown): Promise<unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* Permissions
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Set the permission state of a PermissionDescriptor
|
|
22
|
+
* @see {@link https://www.w3.org/TR/permissions/#webdriver-command-set-permission}
|
|
23
|
+
*
|
|
24
|
+
* @param descriptor - the PermissionDescriptor
|
|
25
|
+
* @param state - the new state
|
|
26
|
+
*/
|
|
27
|
+
setPermissions?(descriptor: PermissionDescriptor, state: PermissionState): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Reporting
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Generate a test report for registered observers
|
|
33
|
+
* @see {@link https://www.w3.org/TR/reporting-1/#generate-test-report-command}
|
|
34
|
+
*
|
|
35
|
+
* @param message - the message to be displayed in the report
|
|
36
|
+
* @param group - the destination group to deliver the report to
|
|
37
|
+
*/
|
|
38
|
+
generateTestReport?(message: string, group?: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Device Posture
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Override the device posture
|
|
44
|
+
* @see {@link https://www.w3.org/TR/device-posture/#set-device-posture}
|
|
45
|
+
*
|
|
46
|
+
* @param posture - the posture to which the device should be set
|
|
47
|
+
*/
|
|
48
|
+
setDevicePosture?(posture: DevicePostureType): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Return device posture control back to hardware
|
|
51
|
+
* @see {@link https://www.w3.org/TR/device-posture/#clear-device-posture}
|
|
52
|
+
*/
|
|
53
|
+
clearDevicePosture?(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Generic Sensor
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Create a virtual sensor
|
|
59
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#create-virtual-sensor-command}
|
|
60
|
+
*
|
|
61
|
+
* @param type - the virtual sensor type to create
|
|
62
|
+
* @param connected - whether the sensor should be configured as connected
|
|
63
|
+
* @param maxSamplingFrequency - the maximum sampling frequency of this sensor
|
|
64
|
+
* @param minSamplingFrequency - the minimum sampling frequency of this sensor
|
|
65
|
+
*/
|
|
66
|
+
createVirtualSensor?(type: string, connected?: boolean, maxSamplingFrequency?: number, minSamplingFrequency?: number): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieve information about a virtual sensor
|
|
69
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#get-virtual-sensor-information-command}
|
|
70
|
+
*
|
|
71
|
+
* @param sensorType - the virtual sensor type
|
|
72
|
+
*
|
|
73
|
+
* @returns an object with sensor information such as its requested sampling frequency
|
|
74
|
+
*/
|
|
75
|
+
getVirtualSensorInfo?(sensorType: string): Promise<VirtualSensorInfo>;
|
|
76
|
+
/**
|
|
77
|
+
* Update a virtual sensor with a new reading
|
|
78
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#update-virtual-sensor-reading-command}
|
|
79
|
+
*
|
|
80
|
+
* @param sensorType - the virtual sensor type
|
|
81
|
+
* @param reading - sensor type-specific sensor reading data
|
|
82
|
+
*/
|
|
83
|
+
updateVirtualSensorReading?(sensorType: string, reading: VirtualSensorReading): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Delete a virtual sensor
|
|
86
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#delete-virtual-sensor-command}
|
|
87
|
+
*
|
|
88
|
+
* @param sensorType - the virtual sensor type
|
|
89
|
+
*/
|
|
90
|
+
deleteVirtualSensor?(sensorType: string): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Custom Handlers
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* Set the protocol handler automation mode
|
|
96
|
+
* @see {@link https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation}
|
|
97
|
+
*
|
|
98
|
+
* @param mode - the protocol handler automation mode
|
|
99
|
+
*/
|
|
100
|
+
setRPHRegistrationMode?(mode: RPHRegistrationMode): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Secure Payment Confirmation
|
|
103
|
+
*/
|
|
104
|
+
/**
|
|
105
|
+
* Set the current transaction automation mode
|
|
106
|
+
* @see {@link https://www.w3.org/TR/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode}
|
|
107
|
+
*
|
|
108
|
+
* @param mode - the transaction automation mode
|
|
109
|
+
*/
|
|
110
|
+
setSPCTransactionMode?(mode: SPCTransactionMode): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Compute Pressure
|
|
113
|
+
*/
|
|
114
|
+
/**
|
|
115
|
+
* Create a virtual pressure source
|
|
116
|
+
* @see {@link https://www.w3.org/TR/compute-pressure/#create-virtual-pressure-source}
|
|
117
|
+
*
|
|
118
|
+
* @param type - the virtual pressure source type to create
|
|
119
|
+
* @param supported - whether the pressure source should be configured as supported
|
|
120
|
+
*/
|
|
121
|
+
createVirtualPressureSource?(type: string, supported?: boolean): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Update the state of a virtual pressure source
|
|
124
|
+
* @see {@link https://www.w3.org/TR/compute-pressure/#update-virtual-pressure-source}
|
|
125
|
+
*
|
|
126
|
+
* @param sensorType - the virtual pressure source type
|
|
127
|
+
* @param sample - the pressure state
|
|
128
|
+
*/
|
|
129
|
+
updateVirtualPressureSource?(pressureSourceType: string, sample: PressureSourceState): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Delete a virtual pressure source
|
|
132
|
+
* @see {@link https://www.w3.org/TR/compute-pressure/#delete-virtual-pressure-source}
|
|
133
|
+
*
|
|
134
|
+
* @param pressureSourceType - the virtual pressure source type
|
|
135
|
+
*/
|
|
136
|
+
deleteVirtualPressureSource?(pressureSourceType: string): Promise<void>;
|
|
137
|
+
/**
|
|
138
|
+
* Federated Credential Management
|
|
139
|
+
*/
|
|
140
|
+
/**
|
|
141
|
+
* Cancel the currently open FedCM dialog
|
|
142
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-canceldialog}
|
|
143
|
+
*/
|
|
144
|
+
fedCMCancelDialog?(): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Select an account to use for the currently open FedCM dialog
|
|
147
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-selectaccount}
|
|
148
|
+
*
|
|
149
|
+
* @param accountIndex - index of the account in the list of available accounts
|
|
150
|
+
*/
|
|
151
|
+
fedCMSelectAccount?(accountIndex: number): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Click a button in the currently open FedCM dialog
|
|
154
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-clickdialogbutton}
|
|
155
|
+
*
|
|
156
|
+
* @param dialogButton - button identifier
|
|
157
|
+
*/
|
|
158
|
+
fedCMClickDialogButton?(dialogButton: string): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Return all accounts that the user can select in the currently open FedCM dialog
|
|
161
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-accountlist}
|
|
162
|
+
*
|
|
163
|
+
* @returns list of account objects
|
|
164
|
+
*/
|
|
165
|
+
fedCMGetAccounts?(): Promise<FedCMAccount[]>;
|
|
166
|
+
/**
|
|
167
|
+
* Return the title and subtitle (if one exists) of the currently open FedCM dialog
|
|
168
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-gettitle}
|
|
169
|
+
*
|
|
170
|
+
* @returns dialog title and subtitle (if one exists)
|
|
171
|
+
*/
|
|
172
|
+
fedCMGetTitle?(): Promise<FedCMDialogTitle>;
|
|
173
|
+
/**
|
|
174
|
+
* Return the type of the currently open FedCM dialog
|
|
175
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-getdialogtype}
|
|
176
|
+
*
|
|
177
|
+
* @returns dialog type
|
|
178
|
+
*/
|
|
179
|
+
fedCMGetDialogType?(): Promise<string>;
|
|
180
|
+
/**
|
|
181
|
+
* Set the state of the promise rejection delay
|
|
182
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-setdelayenabled}
|
|
183
|
+
*/
|
|
184
|
+
fedCMSetDelayEnabled?(enabled: boolean): Promise<void>;
|
|
185
|
+
/**
|
|
186
|
+
* Reset the cooldown delay used after dismissing a FedCM dialog
|
|
187
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-resetcooldown}
|
|
188
|
+
*/
|
|
189
|
+
fedCMResetCooldown?(): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* Web Authentication
|
|
192
|
+
*/
|
|
14
193
|
/**
|
|
15
194
|
* Add a virtual authenticator to a browser
|
|
16
195
|
* @see {@link https://www.w3.org/TR/webauthn-2/#sctn-automation-add-virtual-authenticator}
|
|
17
196
|
*
|
|
18
|
-
* @param protocol
|
|
197
|
+
* @param protocol - the protocol
|
|
19
198
|
* @param transport - a valid AuthenticatorTransport value
|
|
20
199
|
* @param hasResidentKey - whether there is a resident key
|
|
21
200
|
* @param hasUserVerification - whether the authenticator has user verification
|
|
@@ -73,6 +252,42 @@ export interface IOtherProtocolCommands {
|
|
|
73
252
|
*/
|
|
74
253
|
setUserAuthVerified?(isUserVerified: boolean, authenticatorId: string): Promise<void>;
|
|
75
254
|
}
|
|
255
|
+
export type PermissionState = 'granted' | 'denied' | 'prompt';
|
|
256
|
+
export interface PermissionDescriptor {
|
|
257
|
+
name: string;
|
|
258
|
+
[key: string]: any;
|
|
259
|
+
}
|
|
260
|
+
export type DevicePostureType = 'continuous' | 'folded';
|
|
261
|
+
export interface VirtualSensorInfo {
|
|
262
|
+
requestedSamplingFrequency: number;
|
|
263
|
+
}
|
|
264
|
+
export interface VirtualSensorXYZReading {
|
|
265
|
+
x: number;
|
|
266
|
+
y: number;
|
|
267
|
+
z: number;
|
|
268
|
+
}
|
|
269
|
+
export interface VirtualSensorSingleValueReading {
|
|
270
|
+
[key: string]: number;
|
|
271
|
+
}
|
|
272
|
+
export type VirtualSensorReading = VirtualSensorXYZReading | VirtualSensorSingleValueReading;
|
|
273
|
+
export type RPHRegistrationMode = 'autoAccept' | 'autoReject' | 'none';
|
|
274
|
+
export type SPCTransactionMode = 'autoAccept' | 'autoChooseToAuthAnotherWay' | 'autoReject' | 'autoOptOut';
|
|
275
|
+
export type PressureSourceState = 'nominal' | 'fair' | 'serious' | 'critical';
|
|
276
|
+
export interface FedCMAccount {
|
|
277
|
+
accountId: string;
|
|
278
|
+
email: string;
|
|
279
|
+
name: string;
|
|
280
|
+
givenName?: string;
|
|
281
|
+
pictureUrl?: string;
|
|
282
|
+
idpConfigUrl: string;
|
|
283
|
+
loginState: string;
|
|
284
|
+
termsOfServiceUrl?: string;
|
|
285
|
+
privacyPolicyUrl?: string;
|
|
286
|
+
}
|
|
287
|
+
export interface FedCMDialogTitle {
|
|
288
|
+
title: string;
|
|
289
|
+
subtitle?: string;
|
|
290
|
+
}
|
|
76
291
|
export interface Credential {
|
|
77
292
|
credentialId: string;
|
|
78
293
|
isResidentCredential: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other-protocols.d.ts","sourceRoot":"","sources":["../../../lib/commands/other-protocols.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,sBAAsB;
|
|
1
|
+
{"version":3,"file":"other-protocols.d.ts","sourceRoot":"","sources":["../../../lib/commands/other-protocols.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,sBAAsB;IAErC;;OAEG;IAEH;;;;;;;OAOG;IACH,UAAU,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5D;;OAEG;IAEH;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,UAAU,EAAE,oBAAoB,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzF;;OAEG;IAEH;;;;;;OAMG;IACH,kBAAkB,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpE;;OAEG;IAEH;;;;;OAKG;IAEH,gBAAgB,CAAC,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D;;;OAGG;IACH,kBAAkB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;OAEG;IAEH;;;;;;;;OAQG;IACH,mBAAmB,CAAC,CAClB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,OAAO,EACnB,oBAAoB,CAAC,EAAE,MAAM,EAC7B,oBAAoB,CAAC,EAAE,MAAM,GAC5B,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;OAOG;IACH,oBAAoB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CA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AW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -391,6 +391,21 @@ export interface IWDClassicCommands {
|
|
|
391
391
|
* @returns A base64-encoded string representing the PNG image data for the element rect
|
|
392
392
|
*/
|
|
393
393
|
getElementScreenshot?(elementId: string): Promise<string>;
|
|
394
|
+
/**
|
|
395
|
+
* Print the page by rendering it as a PDF document
|
|
396
|
+
* @see {@link https://w3c.github.io/webdriver/#print-page}
|
|
397
|
+
*
|
|
398
|
+
* @param orientation - the orientation of the page ("portrait" or "landscape")
|
|
399
|
+
* @param scale - the page scale, between 0.1 and 2
|
|
400
|
+
* @param background - whether to include background images
|
|
401
|
+
* @param page - the width and height of the printed page
|
|
402
|
+
* @param margin - the margins of the printed page
|
|
403
|
+
* @param shrinkToFit - whether to resize page contents to match {@linkcode PrintPageSize.width}
|
|
404
|
+
* @param pageRanges - array of page numbers and/or page ranges (dash-separated strings) to be printed
|
|
405
|
+
*
|
|
406
|
+
* @returns A base64-encoded string representing the PDF document
|
|
407
|
+
*/
|
|
408
|
+
printPage?(orientation?: string, scale?: number, background?: boolean, page?: PrintPageSize, margin?: PrintPageMargins, shrinkToFit?: boolean, pageRanges?: (number | string)[]): Promise<string>;
|
|
394
409
|
}
|
|
395
410
|
export type NewWindowType = 'tab' | 'window';
|
|
396
411
|
export interface NewWindow {
|
|
@@ -415,4 +430,14 @@ export interface Cookie {
|
|
|
415
430
|
expiry?: number;
|
|
416
431
|
sameSite?: 'Lax' | 'Strict';
|
|
417
432
|
}
|
|
433
|
+
export interface PrintPageSize {
|
|
434
|
+
width?: number;
|
|
435
|
+
height?: number;
|
|
436
|
+
}
|
|
437
|
+
export interface PrintPageMargins {
|
|
438
|
+
top?: number;
|
|
439
|
+
bottom?: number;
|
|
440
|
+
left?: number;
|
|
441
|
+
right?: number;
|
|
442
|
+
}
|
|
418
443
|
//# sourceMappingURL=webdriver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webdriver.d.ts","sourceRoot":"","sources":["../../../lib/commands/webdriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,MAAM,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3B;;;OAGG;IACH,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1B;;;;;OAKG;IACH,eAAe,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,WAAW,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAElC;;;;;OAKG;IACH,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1C;;;;;OAKG;IACH,gBAAgB,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AgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -16,6 +16,10 @@ export interface ProxyObject {
|
|
|
16
16
|
socksPassword?: string;
|
|
17
17
|
}
|
|
18
18
|
export type Timeouts = Record<'script' | 'pageLoad' | 'implicit', number>;
|
|
19
|
+
/**
|
|
20
|
+
* W3C standard capabilities
|
|
21
|
+
* @see https://www.w3.org/TR/webdriver2/#dfn-table-of-standard-capabilities)
|
|
22
|
+
*/
|
|
19
23
|
export interface StandardCapabilities {
|
|
20
24
|
/**
|
|
21
25
|
* Identifies the user agent.
|
|
@@ -57,6 +61,10 @@ export interface StandardCapabilities {
|
|
|
57
61
|
* Describes the current session’s user prompt handler. Defaults to the dismiss and notify state.
|
|
58
62
|
*/
|
|
59
63
|
unhandledPromptBehavior?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Identifies the default User-Agent value of the endpoint node.
|
|
66
|
+
*/
|
|
67
|
+
userAgent?: string;
|
|
60
68
|
/**
|
|
61
69
|
* WebDriver clients opt in to a bidirectional connection by requesting a capability with the name "webSocketUrl" and value true.
|
|
62
70
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-caps.d.ts","sourceRoot":"","sources":["../../lib/standard-caps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAChF,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,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B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* Interface for all WebDriver extension commands from other protocols proxied to the external driver.
|
|
3
3
|
*/
|
|
4
4
|
export interface IOtherProtocolCommands {
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Chromium DevTools
|
|
8
|
+
*/
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* Execute a devtools command
|
|
@@ -14,13 +17,222 @@ export interface IOtherProtocolCommands {
|
|
|
14
17
|
*/
|
|
15
18
|
executeCdp?(cmd: string, params: unknown): Promise<unknown>;
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Permissions
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Set the permission state of a PermissionDescriptor
|
|
26
|
+
* @see {@link https://www.w3.org/TR/permissions/#webdriver-command-set-permission}
|
|
27
|
+
*
|
|
28
|
+
* @param descriptor - the PermissionDescriptor
|
|
29
|
+
* @param state - the new state
|
|
30
|
+
*/
|
|
31
|
+
setPermissions?(descriptor: PermissionDescriptor, state: PermissionState): Promise<void>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Reporting
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Generate a test report for registered observers
|
|
39
|
+
* @see {@link https://www.w3.org/TR/reporting-1/#generate-test-report-command}
|
|
40
|
+
*
|
|
41
|
+
* @param message - the message to be displayed in the report
|
|
42
|
+
* @param group - the destination group to deliver the report to
|
|
43
|
+
*/
|
|
44
|
+
generateTestReport?(message: string, group?: string): Promise<void>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Device Posture
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Override the device posture
|
|
52
|
+
* @see {@link https://www.w3.org/TR/device-posture/#set-device-posture}
|
|
53
|
+
*
|
|
54
|
+
* @param posture - the posture to which the device should be set
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
setDevicePosture?(posture: DevicePostureType): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Return device posture control back to hardware
|
|
60
|
+
* @see {@link https://www.w3.org/TR/device-posture/#clear-device-posture}
|
|
61
|
+
*/
|
|
62
|
+
clearDevicePosture?(): Promise<void>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Generic Sensor
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Create a virtual sensor
|
|
70
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#create-virtual-sensor-command}
|
|
71
|
+
*
|
|
72
|
+
* @param type - the virtual sensor type to create
|
|
73
|
+
* @param connected - whether the sensor should be configured as connected
|
|
74
|
+
* @param maxSamplingFrequency - the maximum sampling frequency of this sensor
|
|
75
|
+
* @param minSamplingFrequency - the minimum sampling frequency of this sensor
|
|
76
|
+
*/
|
|
77
|
+
createVirtualSensor?(
|
|
78
|
+
type: string,
|
|
79
|
+
connected?: boolean,
|
|
80
|
+
maxSamplingFrequency?: number,
|
|
81
|
+
minSamplingFrequency?: number,
|
|
82
|
+
): Promise<void>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Retrieve information about a virtual sensor
|
|
86
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#get-virtual-sensor-information-command}
|
|
87
|
+
*
|
|
88
|
+
* @param sensorType - the virtual sensor type
|
|
89
|
+
*
|
|
90
|
+
* @returns an object with sensor information such as its requested sampling frequency
|
|
91
|
+
*/
|
|
92
|
+
getVirtualSensorInfo?(sensorType: string): Promise<VirtualSensorInfo>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Update a virtual sensor with a new reading
|
|
96
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#update-virtual-sensor-reading-command}
|
|
97
|
+
*
|
|
98
|
+
* @param sensorType - the virtual sensor type
|
|
99
|
+
* @param reading - sensor type-specific sensor reading data
|
|
100
|
+
*/
|
|
101
|
+
updateVirtualSensorReading?(sensorType: string, reading: VirtualSensorReading): Promise<void>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Delete a virtual sensor
|
|
105
|
+
* @see {@link https://www.w3.org/TR/generic-sensor/#delete-virtual-sensor-command}
|
|
106
|
+
*
|
|
107
|
+
* @param sensorType - the virtual sensor type
|
|
108
|
+
*/
|
|
109
|
+
deleteVirtualSensor?(sensorType: string): Promise<void>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Custom Handlers
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Set the protocol handler automation mode
|
|
117
|
+
* @see {@link https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation}
|
|
118
|
+
*
|
|
119
|
+
* @param mode - the protocol handler automation mode
|
|
120
|
+
*/
|
|
121
|
+
setRPHRegistrationMode?(mode: RPHRegistrationMode): Promise<void>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Secure Payment Confirmation
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Set the current transaction automation mode
|
|
129
|
+
* @see {@link https://www.w3.org/TR/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode}
|
|
130
|
+
*
|
|
131
|
+
* @param mode - the transaction automation mode
|
|
132
|
+
*/
|
|
133
|
+
setSPCTransactionMode?(mode: SPCTransactionMode): Promise<void>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Compute Pressure
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Create a virtual pressure source
|
|
141
|
+
* @see {@link https://www.w3.org/TR/compute-pressure/#create-virtual-pressure-source}
|
|
142
|
+
*
|
|
143
|
+
* @param type - the virtual pressure source type to create
|
|
144
|
+
* @param supported - whether the pressure source should be configured as supported
|
|
145
|
+
*/
|
|
146
|
+
createVirtualPressureSource?(type: string, supported?: boolean): Promise<void>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Update the state of a virtual pressure source
|
|
150
|
+
* @see {@link https://www.w3.org/TR/compute-pressure/#update-virtual-pressure-source}
|
|
151
|
+
*
|
|
152
|
+
* @param sensorType - the virtual pressure source type
|
|
153
|
+
* @param sample - the pressure state
|
|
154
|
+
*/
|
|
155
|
+
updateVirtualPressureSource?(pressureSourceType: string, sample: PressureSourceState): Promise<void>;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Delete a virtual pressure source
|
|
159
|
+
* @see {@link https://www.w3.org/TR/compute-pressure/#delete-virtual-pressure-source}
|
|
160
|
+
*
|
|
161
|
+
* @param pressureSourceType - the virtual pressure source type
|
|
162
|
+
*/
|
|
163
|
+
deleteVirtualPressureSource?(pressureSourceType: string): Promise<void>;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Federated Credential Management
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Cancel the currently open FedCM dialog
|
|
171
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-canceldialog}
|
|
172
|
+
*/
|
|
173
|
+
fedCMCancelDialog?(): Promise<void>;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Select an account to use for the currently open FedCM dialog
|
|
177
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-selectaccount}
|
|
178
|
+
*
|
|
179
|
+
* @param accountIndex - index of the account in the list of available accounts
|
|
180
|
+
*/
|
|
181
|
+
fedCMSelectAccount?(accountIndex: number): Promise<void>;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Click a button in the currently open FedCM dialog
|
|
185
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-clickdialogbutton}
|
|
186
|
+
*
|
|
187
|
+
* @param dialogButton - button identifier
|
|
188
|
+
*/
|
|
189
|
+
fedCMClickDialogButton?(dialogButton: string): Promise<void>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Return all accounts that the user can select in the currently open FedCM dialog
|
|
193
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-accountlist}
|
|
194
|
+
*
|
|
195
|
+
* @returns list of account objects
|
|
196
|
+
*/
|
|
197
|
+
fedCMGetAccounts?(): Promise<FedCMAccount[]>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Return the title and subtitle (if one exists) of the currently open FedCM dialog
|
|
201
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-gettitle}
|
|
202
|
+
*
|
|
203
|
+
* @returns dialog title and subtitle (if one exists)
|
|
204
|
+
*/
|
|
205
|
+
fedCMGetTitle?(): Promise<FedCMDialogTitle>;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Return the type of the currently open FedCM dialog
|
|
209
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-getdialogtype}
|
|
210
|
+
*
|
|
211
|
+
* @returns dialog type
|
|
212
|
+
*/
|
|
213
|
+
fedCMGetDialogType?(): Promise<string>;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Set the state of the promise rejection delay
|
|
217
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-setdelayenabled}
|
|
218
|
+
*/
|
|
219
|
+
fedCMSetDelayEnabled?(enabled: boolean): Promise<void>;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Reset the cooldown delay used after dismissing a FedCM dialog
|
|
223
|
+
* @see {@link https://www.w3.org/TR/fedcm-1/#webdriver-resetcooldown}
|
|
224
|
+
*/
|
|
225
|
+
fedCMResetCooldown?(): Promise<void>;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Web Authentication
|
|
229
|
+
*/
|
|
18
230
|
|
|
19
231
|
/**
|
|
20
232
|
* Add a virtual authenticator to a browser
|
|
21
233
|
* @see {@link https://www.w3.org/TR/webauthn-2/#sctn-automation-add-virtual-authenticator}
|
|
22
234
|
*
|
|
23
|
-
* @param protocol
|
|
235
|
+
* @param protocol - the protocol
|
|
24
236
|
* @param transport - a valid AuthenticatorTransport value
|
|
25
237
|
* @param hasResidentKey - whether there is a resident key
|
|
26
238
|
* @param hasUserVerification - whether the authenticator has user verification
|
|
@@ -100,6 +312,68 @@ export interface IOtherProtocolCommands {
|
|
|
100
312
|
setUserAuthVerified?(isUserVerified: boolean, authenticatorId: string): Promise<void>;
|
|
101
313
|
}
|
|
102
314
|
|
|
315
|
+
// Permissions
|
|
316
|
+
|
|
317
|
+
export type PermissionState = 'granted' | 'denied' | 'prompt';
|
|
318
|
+
|
|
319
|
+
export interface PermissionDescriptor {
|
|
320
|
+
name: string;
|
|
321
|
+
[key: string]: any;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Device Posture
|
|
325
|
+
|
|
326
|
+
export type DevicePostureType = 'continuous' | 'folded';
|
|
327
|
+
|
|
328
|
+
// Generic Sensor
|
|
329
|
+
|
|
330
|
+
export interface VirtualSensorInfo {
|
|
331
|
+
requestedSamplingFrequency: number;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export interface VirtualSensorXYZReading {
|
|
335
|
+
x: number;
|
|
336
|
+
y: number;
|
|
337
|
+
z: number;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export interface VirtualSensorSingleValueReading {
|
|
341
|
+
[key: string]: number;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export type VirtualSensorReading = VirtualSensorXYZReading | VirtualSensorSingleValueReading;
|
|
345
|
+
|
|
346
|
+
// Custom Handlers
|
|
347
|
+
|
|
348
|
+
export type RPHRegistrationMode = 'autoAccept' | 'autoReject' | 'none';
|
|
349
|
+
|
|
350
|
+
// Secure Payment Confirmation
|
|
351
|
+
|
|
352
|
+
export type SPCTransactionMode = 'autoAccept' | 'autoChooseToAuthAnotherWay' | 'autoReject' | 'autoOptOut';
|
|
353
|
+
|
|
354
|
+
// Compute Pressure
|
|
355
|
+
|
|
356
|
+
export type PressureSourceState = 'nominal' | 'fair' | 'serious' | 'critical';
|
|
357
|
+
|
|
358
|
+
// Federated Credential Management
|
|
359
|
+
|
|
360
|
+
export interface FedCMAccount {
|
|
361
|
+
accountId: string;
|
|
362
|
+
email: string;
|
|
363
|
+
name: string;
|
|
364
|
+
givenName?: string;
|
|
365
|
+
pictureUrl?: string;
|
|
366
|
+
idpConfigUrl: string;
|
|
367
|
+
loginState: string;
|
|
368
|
+
termsOfServiceUrl?: string;
|
|
369
|
+
privacyPolicyUrl?: string;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface FedCMDialogTitle {
|
|
373
|
+
title: string;
|
|
374
|
+
subtitle?: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
103
377
|
// Web Authentication
|
|
104
378
|
|
|
105
379
|
export interface Credential {
|
|
@@ -440,6 +440,30 @@ export interface IWDClassicCommands {
|
|
|
440
440
|
* @returns A base64-encoded string representing the PNG image data for the element rect
|
|
441
441
|
*/
|
|
442
442
|
getElementScreenshot?(elementId: string): Promise<string>;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Print the page by rendering it as a PDF document
|
|
446
|
+
* @see {@link https://w3c.github.io/webdriver/#print-page}
|
|
447
|
+
*
|
|
448
|
+
* @param orientation - the orientation of the page ("portrait" or "landscape")
|
|
449
|
+
* @param scale - the page scale, between 0.1 and 2
|
|
450
|
+
* @param background - whether to include background images
|
|
451
|
+
* @param page - the width and height of the printed page
|
|
452
|
+
* @param margin - the margins of the printed page
|
|
453
|
+
* @param shrinkToFit - whether to resize page contents to match {@linkcode PrintPageSize.width}
|
|
454
|
+
* @param pageRanges - array of page numbers and/or page ranges (dash-separated strings) to be printed
|
|
455
|
+
*
|
|
456
|
+
* @returns A base64-encoded string representing the PDF document
|
|
457
|
+
*/
|
|
458
|
+
printPage?(
|
|
459
|
+
orientation?: string,
|
|
460
|
+
scale?: number,
|
|
461
|
+
background?: boolean,
|
|
462
|
+
page?: PrintPageSize,
|
|
463
|
+
margin?: PrintPageMargins,
|
|
464
|
+
shrinkToFit?: boolean,
|
|
465
|
+
pageRanges?: (number | string)[]
|
|
466
|
+
): Promise<string>;
|
|
443
467
|
}
|
|
444
468
|
|
|
445
469
|
export type NewWindowType = 'tab' | 'window';
|
|
@@ -473,3 +497,15 @@ export interface Cookie {
|
|
|
473
497
|
expiry?: number;
|
|
474
498
|
sameSite?: 'Lax' | 'Strict';
|
|
475
499
|
}
|
|
500
|
+
|
|
501
|
+
export interface PrintPageSize {
|
|
502
|
+
width?: number;
|
|
503
|
+
height?: number;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export interface PrintPageMargins {
|
|
507
|
+
top?: number;
|
|
508
|
+
bottom?: number;
|
|
509
|
+
left?: number;
|
|
510
|
+
right?: number;
|
|
511
|
+
}
|
package/lib/standard-caps.ts
CHANGED
|
@@ -17,6 +17,10 @@ export interface ProxyObject {
|
|
|
17
17
|
}
|
|
18
18
|
export type Timeouts = Record<'script' | 'pageLoad' | 'implicit', number>;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* W3C standard capabilities
|
|
22
|
+
* @see https://www.w3.org/TR/webdriver2/#dfn-table-of-standard-capabilities)
|
|
23
|
+
*/
|
|
20
24
|
export interface StandardCapabilities {
|
|
21
25
|
/**
|
|
22
26
|
* Identifies the user agent.
|
|
@@ -58,6 +62,10 @@ export interface StandardCapabilities {
|
|
|
58
62
|
* Describes the current session’s user prompt handler. Defaults to the dismiss and notify state.
|
|
59
63
|
*/
|
|
60
64
|
unhandledPromptBehavior?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Identifies the default User-Agent value of the endpoint node.
|
|
67
|
+
*/
|
|
68
|
+
userAgent?: string;
|
|
61
69
|
/**
|
|
62
70
|
* WebDriver clients opt in to a bidirectional connection by requesting a capability with the name "webSocketUrl" and value true.
|
|
63
71
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Various type declarations used across Appium",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"test:types": "tsd"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@appium/logger": "^2.0.
|
|
41
|
+
"@appium/logger": "^2.0.2",
|
|
42
42
|
"@appium/schema": "^1.0.0",
|
|
43
43
|
"@appium/tsconfig": "^1.1.0",
|
|
44
|
-
"type-fest": "
|
|
44
|
+
"type-fest": "5.2.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "6fec1bfbeb4bb556e0ac08c047941b90a07d2838"
|
|
54
54
|
}
|