@appium/types 0.26.0 → 1.0.0-rc.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/command.d.ts +1 -1
- package/build/lib/command.d.ts.map +1 -1
- package/build/lib/driver.d.ts +12 -431
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/server.d.ts +0 -7
- package/build/lib/server.d.ts.map +1 -1
- package/lib/command.ts +1 -1
- package/lib/driver.ts +15 -501
- package/lib/server.ts +0 -8
- package/package.json +9 -8
package/build/lib/command.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface PayloadParams {
|
|
|
9
9
|
wrap?: string;
|
|
10
10
|
unwrap?: string;
|
|
11
11
|
required?: ReadonlyArray<string> | MultidimensionalReadonlyArray<string, 2>;
|
|
12
|
-
optional?: ReadonlyArray<string
|
|
12
|
+
optional?: ReadonlyArray<string>;
|
|
13
13
|
validate?: (obj: any, protocol: string) => boolean | string | undefined;
|
|
14
14
|
makeArgs?: (obj: any) => any;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../lib/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAC;AACzE,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,6BAA6B,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5E,QAAQ,CAAC,EAAE,aAAa,C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AAC;CAC1B"}
|
package/build/lib/driver.d.ts
CHANGED
|
@@ -27,22 +27,13 @@ export interface ITimeoutCommands {
|
|
|
27
27
|
* @param pageLoad - the number in ms for the pageLoad timeout, used for the W3C command
|
|
28
28
|
* @param implicit - the number in ms for the implicit wait timeout, used for the W3C command
|
|
29
29
|
*/
|
|
30
|
-
timeouts(type
|
|
30
|
+
timeouts(type?: string, ms?: number | string, script?: number, pageLoad?: number, implicit?: number | string): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* Set the new command timeout
|
|
33
33
|
*
|
|
34
34
|
* @param ms - the timeout in ms
|
|
35
35
|
*/
|
|
36
36
|
setNewCommandTimeout(ms: number): void;
|
|
37
|
-
/**
|
|
38
|
-
* Set the implicit wait timeout
|
|
39
|
-
*
|
|
40
|
-
* @param ms - the timeout in ms
|
|
41
|
-
*
|
|
42
|
-
* @deprecated Use `timeouts` instead
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
implicitWait(ms: number | string): Promise<void>;
|
|
46
37
|
/**
|
|
47
38
|
* A helper method (not a command) used to set the implicit wait value
|
|
48
39
|
*
|
|
@@ -70,39 +61,18 @@ export interface ITimeoutCommands {
|
|
|
70
61
|
* @param ms - the timeout in ms
|
|
71
62
|
*/
|
|
72
63
|
implicitWaitW3C(ms: number): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* Set the implicit wait value that was sent in via the JSONWP
|
|
75
|
-
*
|
|
76
|
-
* @param ms - the timeout in ms
|
|
77
|
-
* @deprecated
|
|
78
|
-
*/
|
|
79
|
-
implicitWaitMJSONWP(ms: number): Promise<void>;
|
|
80
64
|
/**
|
|
81
65
|
* Set the page load timeout value that was sent in via the W3C protocol
|
|
82
66
|
*
|
|
83
67
|
* @param ms - the timeout in ms
|
|
84
68
|
*/
|
|
85
69
|
pageLoadTimeoutW3C(ms: number): Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* Set the page load timeout value that was sent in via the JSONWP
|
|
88
|
-
*
|
|
89
|
-
* @param ms - the timeout in ms
|
|
90
|
-
* @deprecated
|
|
91
|
-
*/
|
|
92
|
-
pageLoadTimeoutMJSONWP(ms: number): Promise<void>;
|
|
93
70
|
/**
|
|
94
71
|
* Set the script timeout value that was sent in via the W3C protocol
|
|
95
72
|
*
|
|
96
73
|
* @param ms - the timeout in ms
|
|
97
74
|
*/
|
|
98
75
|
scriptTimeoutW3C(ms: number): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Set the script timeout value that was sent in via the JSONWP
|
|
101
|
-
*
|
|
102
|
-
* @param ms - the timeout in ms
|
|
103
|
-
* @deprecated
|
|
104
|
-
*/
|
|
105
|
-
scriptTimeoutMJSONWP(ms: number): Promise<void>;
|
|
106
76
|
/**
|
|
107
77
|
* Set Appium's new command timeout
|
|
108
78
|
*
|
|
@@ -147,15 +117,6 @@ export interface IExecuteCommands {
|
|
|
147
117
|
*/
|
|
148
118
|
executeMethod<TArgs extends readonly any[] | readonly [StringRecord<unknown>] = unknown[], TReturn = unknown>(script: string, args: TArgs): Promise<TReturn>;
|
|
149
119
|
}
|
|
150
|
-
/**
|
|
151
|
-
* Data returned by {@linkcode ISessionHandler.getSessions}.
|
|
152
|
-
*
|
|
153
|
-
* @typeParam C - The driver's constraints
|
|
154
|
-
*/
|
|
155
|
-
export interface MultiSessionData<C extends Constraints = Constraints> {
|
|
156
|
-
id: string;
|
|
157
|
-
capabilities: DriverCaps<C>;
|
|
158
|
-
}
|
|
159
120
|
/**
|
|
160
121
|
* Data returned by `AppiumDriver.getAppiumSessions`
|
|
161
122
|
*
|
|
@@ -386,12 +347,6 @@ export interface ISessionHandler<C extends Constraints = Constraints, CreateResu
|
|
|
386
347
|
* @param driverData - the driver data for other currently-running sessions
|
|
387
348
|
*/
|
|
388
349
|
deleteSession(sessionId?: string, driverData?: DriverData[]): Promise<DeleteResult | void>;
|
|
389
|
-
/**
|
|
390
|
-
* Get data for all sessions running on an Appium server
|
|
391
|
-
*
|
|
392
|
-
* @returns A list of session data objects
|
|
393
|
-
*/
|
|
394
|
-
getSessions(): Promise<MultiSessionData[]>;
|
|
395
350
|
/**
|
|
396
351
|
* Get the data for the current session
|
|
397
352
|
*
|
|
@@ -516,10 +471,6 @@ export interface Core<C extends Constraints, Settings extends StringRecord = Str
|
|
|
516
471
|
isCommandsQueueEnabled: boolean;
|
|
517
472
|
eventHistory: EventHistory;
|
|
518
473
|
bidiEventSubs: Record<string, string[]>;
|
|
519
|
-
/**
|
|
520
|
-
* @deprecated Drivers no longer need to opt into BiDi support explicitly
|
|
521
|
-
*/
|
|
522
|
-
doesSupportBidi?: boolean;
|
|
523
474
|
updateBidiCommands(cmds: BidiModuleMap): void;
|
|
524
475
|
onUnexpectedShutdown(handler: () => any): void;
|
|
525
476
|
/**
|
|
@@ -597,6 +548,17 @@ export interface Driver<C extends Constraints = Constraints, CArgs extends Strin
|
|
|
597
548
|
* @returns The result of running the command
|
|
598
549
|
*/
|
|
599
550
|
executeCommand(cmd: string, ...args: any[]): Promise<any>;
|
|
551
|
+
/**
|
|
552
|
+
* A helper method to modify the command name before it's logged.
|
|
553
|
+
*
|
|
554
|
+
* Useful for resolving generic commands like 'execute' to a more specific
|
|
555
|
+
* name based on arguments (e.g., identifying custom extensions).
|
|
556
|
+
*
|
|
557
|
+
* @param cmd - The original command name
|
|
558
|
+
* @param args - Arguments passed to the command
|
|
559
|
+
* @returns A potentially updated command name
|
|
560
|
+
*/
|
|
561
|
+
clarifyCommandName?(cmd: string, args: string[]): string;
|
|
600
562
|
/** Execute a driver (WebDriver Bidi protocol) command by its name as defined in the bidi commands file
|
|
601
563
|
* @param bidiCmd - the name of the command in the bidi spec
|
|
602
564
|
* @param args - arguments to pass to the command
|
|
@@ -614,13 +576,6 @@ export interface Driver<C extends Constraints = Constraints, CArgs extends Strin
|
|
|
614
576
|
* session
|
|
615
577
|
*/
|
|
616
578
|
startNewCommandTimeout(): Promise<void>;
|
|
617
|
-
/**
|
|
618
|
-
* Reset the current session (run the delete session and create session subroutines)
|
|
619
|
-
*
|
|
620
|
-
* @deprecated Use explicit session management commands instead
|
|
621
|
-
* @privateRemarks This is implemented by `BaseDriver` and is used within `@appium/driver-test-support`
|
|
622
|
-
*/
|
|
623
|
-
reset(): Promise<void>;
|
|
624
579
|
/**
|
|
625
580
|
* The processed capabilities used to start the session represented by the current driver instance
|
|
626
581
|
*/
|
|
@@ -1044,144 +999,6 @@ export interface ExternalDriver<C extends Constraints = Constraints, Ctx = strin
|
|
|
1044
999
|
* @returns The formatted time
|
|
1045
1000
|
*/
|
|
1046
1001
|
getDeviceTime?(format?: string): Promise<string>;
|
|
1047
|
-
/**
|
|
1048
|
-
* List the performance data types supported by this driver, which can be used in a call to get
|
|
1049
|
-
* the performance data by type.
|
|
1050
|
-
*
|
|
1051
|
-
* @returns The list of types
|
|
1052
|
-
*
|
|
1053
|
-
* @deprecated
|
|
1054
|
-
*/
|
|
1055
|
-
getPerformanceDataTypes?(): Promise<string[]>;
|
|
1056
|
-
/**
|
|
1057
|
-
* Get the list of performance data associated with a given type
|
|
1058
|
-
*
|
|
1059
|
-
* @param packageName - the package name / id of the app to retrieve data for
|
|
1060
|
-
* @param dataType - the performance data type; one of those retrieved in a call to
|
|
1061
|
-
* getPerformanceDataTypes
|
|
1062
|
-
* @param dataReadTimeout - how long to wait for data before timing out
|
|
1063
|
-
*
|
|
1064
|
-
* @returns A list of performance data strings
|
|
1065
|
-
*
|
|
1066
|
-
* @deprecated
|
|
1067
|
-
*/
|
|
1068
|
-
getPerformanceData?(packageName: string, dataType: string, dataReadTimeout?: number): Promise<any>;
|
|
1069
|
-
/**
|
|
1070
|
-
* Press a device hardware key by its code for the default duration
|
|
1071
|
-
*
|
|
1072
|
-
* @param keycode - the keycode
|
|
1073
|
-
* @param metastate - the code denoting the simultaneous pressing of any meta keys (shift etc)
|
|
1074
|
-
* @param flags - the code denoting the combination of extra flags
|
|
1075
|
-
*
|
|
1076
|
-
* @deprecated
|
|
1077
|
-
*/
|
|
1078
|
-
pressKeyCode?(keycode: number, metastate?: number, flags?: number): Promise<void>;
|
|
1079
|
-
/**
|
|
1080
|
-
* Press a device hardware key by its code for a longer duration
|
|
1081
|
-
*
|
|
1082
|
-
* @param keycode - the keycode
|
|
1083
|
-
* @param metastate - the code denoting the simultaneous pressing of any meta keys (shift etc)
|
|
1084
|
-
* @param flags - the code denoting the combination of extra flags
|
|
1085
|
-
*
|
|
1086
|
-
* @deprecated
|
|
1087
|
-
*
|
|
1088
|
-
*/
|
|
1089
|
-
longPressKeyCode?(keycode: number, metastate?: number, flags?: number): Promise<void>;
|
|
1090
|
-
/**
|
|
1091
|
-
* Apply a synthetic fingerprint to the fingerprint detector of the device
|
|
1092
|
-
*
|
|
1093
|
-
* @param fingerprintId - the numeric ID of the fingerprint to use
|
|
1094
|
-
*
|
|
1095
|
-
* @deprecated
|
|
1096
|
-
*/
|
|
1097
|
-
fingerprint?(fingerprintId: number): Promise<void>;
|
|
1098
|
-
/**
|
|
1099
|
-
* Simulate sending an SMS message from a certain phone number to the device
|
|
1100
|
-
*
|
|
1101
|
-
* @param phoneNumber - the number to pretend the message is from
|
|
1102
|
-
* @param message - the SMS text
|
|
1103
|
-
*
|
|
1104
|
-
* @deprecated
|
|
1105
|
-
*/
|
|
1106
|
-
sendSMS?(phoneNumber: string, message: string): Promise<void>;
|
|
1107
|
-
/**
|
|
1108
|
-
* Simulate triggering a phone call from a phone number and having the device take an action in
|
|
1109
|
-
* response
|
|
1110
|
-
*
|
|
1111
|
-
* @param phoneNumber - the number to pretend the call is from
|
|
1112
|
-
* @param action - the action to take in response (accept, reject, etc...)
|
|
1113
|
-
*
|
|
1114
|
-
* @deprecated
|
|
1115
|
-
*/
|
|
1116
|
-
gsmCall?(phoneNumber: string, action: string): Promise<void>;
|
|
1117
|
-
/**
|
|
1118
|
-
* Simulate setting the GSM signal strength for a cell phone
|
|
1119
|
-
*
|
|
1120
|
-
* @param singalStrength - the strength in a driver-appropriate string
|
|
1121
|
-
*
|
|
1122
|
-
* @deprecated
|
|
1123
|
-
*/
|
|
1124
|
-
gsmSignal?(signalStrength: string | number): Promise<void>;
|
|
1125
|
-
/**
|
|
1126
|
-
* Do something with GSM voice (unclear; this should not be implemented anywhere)
|
|
1127
|
-
*
|
|
1128
|
-
* @param state - the state
|
|
1129
|
-
*
|
|
1130
|
-
* @deprecated
|
|
1131
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1132
|
-
*/
|
|
1133
|
-
gsmVoice?(state: string): Promise<void>;
|
|
1134
|
-
/**
|
|
1135
|
-
* Set the simulated power capacity of the device
|
|
1136
|
-
*
|
|
1137
|
-
* @param percent - how full the battery should become
|
|
1138
|
-
*
|
|
1139
|
-
* @deprecated
|
|
1140
|
-
*/
|
|
1141
|
-
powerCapacity?(percent: number): Promise<void>;
|
|
1142
|
-
/**
|
|
1143
|
-
* Set the AC-connected power state of the device
|
|
1144
|
-
*
|
|
1145
|
-
* @param state - whether the device is connected to power or not
|
|
1146
|
-
*
|
|
1147
|
-
* @deprecated
|
|
1148
|
-
*/
|
|
1149
|
-
powerAC?(state: string): Promise<void>;
|
|
1150
|
-
/**
|
|
1151
|
-
* Set the network speed of the device
|
|
1152
|
-
*
|
|
1153
|
-
* @param netspeed - the speed as a string, like '3G'
|
|
1154
|
-
*
|
|
1155
|
-
* @deprecated
|
|
1156
|
-
*/
|
|
1157
|
-
networkSpeed?(netspeed: string): Promise<void>;
|
|
1158
|
-
/**
|
|
1159
|
-
* Simulate a keyevent on the device
|
|
1160
|
-
*
|
|
1161
|
-
* @param keycode - the manufacturer defined keycode
|
|
1162
|
-
* @param metastate - the combination of meta startUnexpectedShutdown
|
|
1163
|
-
*
|
|
1164
|
-
* @deprecated
|
|
1165
|
-
*/
|
|
1166
|
-
keyevent?(keycode: string | number, metastate?: string | number): Promise<void>;
|
|
1167
|
-
/**
|
|
1168
|
-
* Get the current activity name
|
|
1169
|
-
*
|
|
1170
|
-
* @returns The activity name
|
|
1171
|
-
*
|
|
1172
|
-
* @deprecated
|
|
1173
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1174
|
-
*/
|
|
1175
|
-
getCurrentActivity?(): Promise<string>;
|
|
1176
|
-
/**
|
|
1177
|
-
* Get the current active app package name/id
|
|
1178
|
-
*
|
|
1179
|
-
* @returns The package name
|
|
1180
|
-
*
|
|
1181
|
-
* @deprecated
|
|
1182
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1183
|
-
*/
|
|
1184
|
-
getCurrentPackage?(): Promise<string>;
|
|
1185
1002
|
/**
|
|
1186
1003
|
* Install an app on a device
|
|
1187
1004
|
*
|
|
@@ -1268,148 +1085,6 @@ export interface ExternalDriver<C extends Constraints = Constraints, Ctx = strin
|
|
|
1268
1085
|
* @returns The base64-encoded zip file of the directory contents
|
|
1269
1086
|
*/
|
|
1270
1087
|
pullFolder?(path: string): Promise<string>;
|
|
1271
|
-
/**
|
|
1272
|
-
* Toggle airplane/flight mode for the device
|
|
1273
|
-
*
|
|
1274
|
-
* @deprecated
|
|
1275
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1276
|
-
*/
|
|
1277
|
-
toggleFlightMode?(): Promise<void>;
|
|
1278
|
-
/**
|
|
1279
|
-
* Toggle cell network data
|
|
1280
|
-
*
|
|
1281
|
-
* @deprecated
|
|
1282
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1283
|
-
*/
|
|
1284
|
-
toggleData?(): Promise<void>;
|
|
1285
|
-
/**
|
|
1286
|
-
* Toggle WiFi radio status
|
|
1287
|
-
*
|
|
1288
|
-
* @deprecated
|
|
1289
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1290
|
-
*/
|
|
1291
|
-
toggleWiFi?(): Promise<void>;
|
|
1292
|
-
/**
|
|
1293
|
-
* Toggle location services for the device
|
|
1294
|
-
*
|
|
1295
|
-
* @deprecated
|
|
1296
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1297
|
-
*/
|
|
1298
|
-
toggleLocationServices?(): Promise<void>;
|
|
1299
|
-
/**
|
|
1300
|
-
* Open the notifications shade/screen
|
|
1301
|
-
*
|
|
1302
|
-
* @deprecated
|
|
1303
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1304
|
-
*/
|
|
1305
|
-
openNotifications?(): Promise<void>;
|
|
1306
|
-
/**
|
|
1307
|
-
* Start an Android activity within an app
|
|
1308
|
-
*
|
|
1309
|
-
* @param appPackage - the app package id
|
|
1310
|
-
* @param appActivity - the activity name
|
|
1311
|
-
* @param appWaitPackage - the package id to wait for if different from the app package
|
|
1312
|
-
* @param appWaitActivity - the activity name to wait for being active if different from
|
|
1313
|
-
* appActivity
|
|
1314
|
-
* @param intentAction - the action for the intent to use to start the activity
|
|
1315
|
-
* @param intentCategory - the category for the intent
|
|
1316
|
-
* @param flags - the flags for the intent
|
|
1317
|
-
* @param optionalIntentArguments - additional arguments to be passed to launching the intent
|
|
1318
|
-
* @param dontStopAppOnReset - set to true to not stop the current app before launching the
|
|
1319
|
-
* activity
|
|
1320
|
-
*
|
|
1321
|
-
* @deprecated
|
|
1322
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1323
|
-
*/
|
|
1324
|
-
startActivity?(appPackage: string, appActivity: string, appWaitPackage?: string, appWaitActivity?: string, intentAction?: string, intentCategory?: string, intentFlags?: string, optionalIntentArguments?: string, dontStopAppOnReset?: boolean): Promise<void>;
|
|
1325
|
-
/**
|
|
1326
|
-
* Get information from the system bars of a device
|
|
1327
|
-
*
|
|
1328
|
-
* @returns An array of information objects of driver-specific shape
|
|
1329
|
-
*
|
|
1330
|
-
* @deprecated
|
|
1331
|
-
*/
|
|
1332
|
-
getSystemBars?(): Promise<unknown>;
|
|
1333
|
-
/**
|
|
1334
|
-
* Get the display's pixel density
|
|
1335
|
-
*
|
|
1336
|
-
* @returns The density
|
|
1337
|
-
*
|
|
1338
|
-
* @deprecated
|
|
1339
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1340
|
-
*/
|
|
1341
|
-
getDisplayDensity?(): Promise<number>;
|
|
1342
|
-
/**
|
|
1343
|
-
* End platform-specific code coverage tracing
|
|
1344
|
-
*
|
|
1345
|
-
* @param intent - the Android intent for the coverage activity
|
|
1346
|
-
* @param path - the path to place the results
|
|
1347
|
-
*
|
|
1348
|
-
* @deprecated
|
|
1349
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1350
|
-
*/
|
|
1351
|
-
endCoverage?(intent: string, path: string): Promise<void>;
|
|
1352
|
-
/**
|
|
1353
|
-
* Set the value of a text field but ensure the current value is replace and not appended
|
|
1354
|
-
*
|
|
1355
|
-
* @param value - the text to set
|
|
1356
|
-
* @param elementId - the element to set it in
|
|
1357
|
-
*
|
|
1358
|
-
* @deprecated
|
|
1359
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1360
|
-
*/
|
|
1361
|
-
replaceValue?(value: string, elementId: string): Promise<void>;
|
|
1362
|
-
/**
|
|
1363
|
-
* Check whether two elements are identical
|
|
1364
|
-
*
|
|
1365
|
-
* @param elementId - the first element's ID
|
|
1366
|
-
* @param otherElementId - the second element's ID
|
|
1367
|
-
*
|
|
1368
|
-
* @returns True if the elements are equal, false otherwise
|
|
1369
|
-
*
|
|
1370
|
-
* @deprecated
|
|
1371
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1372
|
-
*/
|
|
1373
|
-
equalsElement?(elementId: string, otherElementId: string): Promise<boolean>;
|
|
1374
|
-
/**
|
|
1375
|
-
* Get the list of IME engines
|
|
1376
|
-
*
|
|
1377
|
-
* @returns The list of IME engines
|
|
1378
|
-
*
|
|
1379
|
-
* @deprecated
|
|
1380
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1381
|
-
*/
|
|
1382
|
-
availableIMEEngines?(): Promise<string[]>;
|
|
1383
|
-
/**
|
|
1384
|
-
* Get the active IME engine
|
|
1385
|
-
*
|
|
1386
|
-
* @returns The name of the active engine
|
|
1387
|
-
*
|
|
1388
|
-
* @deprecated
|
|
1389
|
-
*/
|
|
1390
|
-
getActiveIMEEngine?(): Promise<string>;
|
|
1391
|
-
/**
|
|
1392
|
-
* Determine whether an IME is active
|
|
1393
|
-
*
|
|
1394
|
-
* @returns True if the IME is activated
|
|
1395
|
-
*
|
|
1396
|
-
* @deprecated
|
|
1397
|
-
*/
|
|
1398
|
-
isIMEActivated?(): Promise<boolean>;
|
|
1399
|
-
/**
|
|
1400
|
-
* Deactivate an IME engine
|
|
1401
|
-
*
|
|
1402
|
-
* @deprecated
|
|
1403
|
-
*/
|
|
1404
|
-
deactivateIMEEngine?(): Promise<void>;
|
|
1405
|
-
/**
|
|
1406
|
-
* Activate an IME engine
|
|
1407
|
-
*
|
|
1408
|
-
* @param engine - the name of the engine
|
|
1409
|
-
*
|
|
1410
|
-
* @deprecated
|
|
1411
|
-
*/
|
|
1412
|
-
activateIMEEngine?(engine: string): Promise<void>;
|
|
1413
1088
|
/**
|
|
1414
1089
|
* Get the device orientation
|
|
1415
1090
|
*
|
|
@@ -1422,89 +1097,6 @@ export interface ExternalDriver<C extends Constraints = Constraints, Ctx = strin
|
|
|
1422
1097
|
* @param orientation - the orientation string
|
|
1423
1098
|
*/
|
|
1424
1099
|
setOrientation?(orientation: string): Promise<void>;
|
|
1425
|
-
/**
|
|
1426
|
-
* Trigger a mouse button down
|
|
1427
|
-
*
|
|
1428
|
-
* @param button - the button ID
|
|
1429
|
-
*
|
|
1430
|
-
* @deprecated Use the Actions API instead
|
|
1431
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1432
|
-
*/
|
|
1433
|
-
buttonDown?(button?: number): Promise<void>;
|
|
1434
|
-
/**
|
|
1435
|
-
* Trigger a mouse button up
|
|
1436
|
-
*
|
|
1437
|
-
* @param button - the button ID
|
|
1438
|
-
*
|
|
1439
|
-
* @deprecated Use the Actions API instead
|
|
1440
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1441
|
-
*/
|
|
1442
|
-
buttonUp?(button?: number): Promise<void>;
|
|
1443
|
-
/**
|
|
1444
|
-
* Click the current mouse location
|
|
1445
|
-
*
|
|
1446
|
-
* @param button - the button ID
|
|
1447
|
-
*
|
|
1448
|
-
* @deprecated Use the Actions API instead
|
|
1449
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1450
|
-
*/
|
|
1451
|
-
clickCurrent?(button?: number): Promise<void>;
|
|
1452
|
-
/**
|
|
1453
|
-
* Double-click the current mouse location
|
|
1454
|
-
*
|
|
1455
|
-
* @deprecated Use the Actions API instead
|
|
1456
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1457
|
-
*/
|
|
1458
|
-
doubleClick?(): Promise<void>;
|
|
1459
|
-
/**
|
|
1460
|
-
* Perform a touch down event at the location specified
|
|
1461
|
-
*
|
|
1462
|
-
* @param x - the x coordinate
|
|
1463
|
-
* @param y - the y coordinate
|
|
1464
|
-
*
|
|
1465
|
-
* @deprecated Use the Actions API instead
|
|
1466
|
-
*/
|
|
1467
|
-
touchDown?(element: string, x: number, y: number): Promise<void>;
|
|
1468
|
-
/**
|
|
1469
|
-
* Perform a touch up event at the location specified
|
|
1470
|
-
*
|
|
1471
|
-
* @param x - the x coordinate
|
|
1472
|
-
* @param y - the y coordinate
|
|
1473
|
-
*
|
|
1474
|
-
* @deprecated Use the Actions API instead
|
|
1475
|
-
*/
|
|
1476
|
-
touchUp?(element: string, x: number, y: number): Promise<void>;
|
|
1477
|
-
/**
|
|
1478
|
-
* Perform a touch move event at the location specified
|
|
1479
|
-
*
|
|
1480
|
-
* @param x - the x coordinate
|
|
1481
|
-
* @param y - the y coordinate
|
|
1482
|
-
*
|
|
1483
|
-
* @deprecated Use the Actions API instead
|
|
1484
|
-
*/
|
|
1485
|
-
touchMove?(element: string, x: number, y: number): Promise<void>;
|
|
1486
|
-
/**
|
|
1487
|
-
* Perform a long touch down event at the location specified
|
|
1488
|
-
*
|
|
1489
|
-
* @param elementId - the id of the element to long touch
|
|
1490
|
-
*
|
|
1491
|
-
* @deprecated Use the Actions API instead
|
|
1492
|
-
*/
|
|
1493
|
-
touchLongClick?(element: string, x: number, y: number, duration: number): Promise<void>;
|
|
1494
|
-
/**
|
|
1495
|
-
* Perform a flick event at the location specified
|
|
1496
|
-
*
|
|
1497
|
-
* @param element - the element to make coordinates relative to
|
|
1498
|
-
* @param xSpeed - the horizontal flick speed (in driver-specific units)
|
|
1499
|
-
* @param ySpeed - the vertical flick speed (in driver-specific units)
|
|
1500
|
-
* @param xOffset - the x coordinate
|
|
1501
|
-
* @param yOffset - the y coordinate
|
|
1502
|
-
* @param speed - the speed (unclear how this relates to xSpeed and ySpeed)
|
|
1503
|
-
*
|
|
1504
|
-
* @deprecated Use the Actions API instead
|
|
1505
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1506
|
-
*/
|
|
1507
|
-
flick?(element?: string, xSpeed?: number, ySpeed?: number, xOffset?: number, yOffset?: number, speed?: number): Promise<void>;
|
|
1508
1100
|
/**
|
|
1509
1101
|
* Get the virtual or real geographical location of a device
|
|
1510
1102
|
*
|
|
@@ -1539,17 +1131,6 @@ export interface ExternalDriver<C extends Constraints = Constraints, Ctx = strin
|
|
|
1539
1131
|
* @returns The list of context names
|
|
1540
1132
|
*/
|
|
1541
1133
|
getContexts?(): Promise<Ctx[]>;
|
|
1542
|
-
/**
|
|
1543
|
-
* Get the index of an element on the page
|
|
1544
|
-
*
|
|
1545
|
-
* @param elementId - the element id
|
|
1546
|
-
*
|
|
1547
|
-
* @returns The page index
|
|
1548
|
-
*
|
|
1549
|
-
* @deprecated
|
|
1550
|
-
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
|
1551
|
-
*/
|
|
1552
|
-
getPageIndex?(elementId: string): Promise<string>;
|
|
1553
1134
|
/**
|
|
1554
1135
|
* Get the network connection state of a device
|
|
1555
1136
|
* @see {@link https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes}
|