@wdio/protocols 6.12.0 → 7.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/README.md +18 -0
- package/build/commands/appium.d.ts +546 -0
- package/build/commands/appium.d.ts.map +1 -0
- package/build/commands/appium.js +2 -0
- package/build/commands/chromium.d.ts +277 -0
- package/build/commands/chromium.d.ts.map +1 -0
- package/build/commands/chromium.js +2 -0
- package/build/commands/jsonwp.d.ts +764 -0
- package/build/commands/jsonwp.d.ts.map +1 -0
- package/build/commands/jsonwp.js +2 -0
- package/build/commands/mjsonwp.d.ts +75 -0
- package/build/commands/mjsonwp.d.ts.map +1 -0
- package/build/commands/mjsonwp.js +2 -0
- package/build/commands/saucelabs.d.ts +195 -0
- package/build/commands/saucelabs.d.ts.map +1 -0
- package/build/commands/saucelabs.js +2 -0
- package/build/commands/selenium.d.ts +44 -0
- package/build/commands/selenium.d.ts.map +1 -0
- package/build/commands/selenium.js +2 -0
- package/build/commands/webdriver.d.ts +596 -0
- package/build/commands/webdriver.d.ts.map +1 -0
- package/build/commands/webdriver.js +2 -0
- package/build/index.d.ts +43 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +28 -0
- package/build/types.d.ts +160 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/package.json +6 -6
- package/protocols/appium.json +5 -0
- package/protocols/chromium.json +2 -6
- package/protocols/jsonwp.json +5 -5
- package/protocols/saucelabs.json +2 -1
- package/protocols/webdriver.json +5 -5
- package/tsconfig.json +12 -0
- package/tsconfig.prod.json +12 -0
- package/index.d.ts +0 -92
- package/index.js +0 -7
package/README.md
CHANGED
|
@@ -32,6 +32,24 @@ import { WebDriverProtocol, MJsonWProtocol, JsonWProtocol, AppiumProtocol, Chrom
|
|
|
32
32
|
console.log(WebDriverProtocol['/session'].POST.description)
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
## TypeScript Interfaces
|
|
36
|
+
|
|
37
|
+
The package exposes TypeScript interfaces for all protocols. You can use them for your own project as follows:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import type { WebDriverCommands } from '@wdio/protocol'
|
|
41
|
+
|
|
42
|
+
import { WebDriverCommands, WebDriverCommandsAsync } from './src'
|
|
43
|
+
|
|
44
|
+
const browser = {} as WebDriverCommands
|
|
45
|
+
browser.sendAlertText(true)
|
|
46
|
+
// fails with "Argument of type 'boolean' is not assignable to parameter of type 'string'.ts(2345)"
|
|
47
|
+
|
|
48
|
+
const asyncBrowser = {} as WebDriverCommandsAsync
|
|
49
|
+
const a = await asyncBrowser.getTitle()
|
|
50
|
+
type foo = typeof a // string
|
|
51
|
+
```
|
|
52
|
+
|
|
35
53
|
----
|
|
36
54
|
|
|
37
55
|
For more information on WebdriverIO see the [homepage](https://webdriver.io).
|
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
import { StringsReturn, SettingsReturn, ProtocolCommandResponse } from '../types';
|
|
2
|
+
export default interface AppiumCommands {
|
|
3
|
+
/**
|
|
4
|
+
* Appium Protocol Command
|
|
5
|
+
*
|
|
6
|
+
* Perform a shake action on the device.
|
|
7
|
+
* @ref http://appium.io/docs/en/commands/device/interactions/shake/
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
shake(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Appium Protocol Command
|
|
13
|
+
*
|
|
14
|
+
* Lock the device.
|
|
15
|
+
* @ref http://appium.io/docs/en/commands/device/interactions/lock/
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
lock(seconds?: number): void;
|
|
19
|
+
/**
|
|
20
|
+
* Appium Protocol Command
|
|
21
|
+
*
|
|
22
|
+
* Unlock the device.
|
|
23
|
+
* @ref http://appium.io/docs/en/commands/device/interactions/unlock/
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
unlock(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Appium Protocol Command
|
|
29
|
+
*
|
|
30
|
+
* Check whether the device is locked or not.
|
|
31
|
+
* @ref http://appium.io/docs/en/commands/device/interactions/is-locked/
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
isLocked(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Appium Protocol Command
|
|
37
|
+
*
|
|
38
|
+
* Start recording the screen.
|
|
39
|
+
* @ref http://appium.io/docs/en/commands/device/recording-screen/start-recording-screen/
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
startRecordingScreen(options?: object): void;
|
|
43
|
+
/**
|
|
44
|
+
* Appium Protocol Command
|
|
45
|
+
*
|
|
46
|
+
* Stop recording screen
|
|
47
|
+
* @ref http://appium.io/docs/en/commands/device/recording-screen/stop-recording-screen/
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
stopRecordingScreen(remotePath?: string, username?: string, password?: string, method?: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Appium Protocol Command
|
|
53
|
+
*
|
|
54
|
+
* Returns the information types of the system state which is supported to read as like cpu, memory, network traffic, and battery.
|
|
55
|
+
* @ref http://appium.io/docs/en/commands/device/performance-data/performance-data-types/
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
getPerformanceDataTypes(): string[];
|
|
59
|
+
/**
|
|
60
|
+
* Appium Protocol Command
|
|
61
|
+
*
|
|
62
|
+
* Returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery.
|
|
63
|
+
* @ref http://appium.io/docs/en/commands/device/performance-data/get-performance-data/
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
getPerformanceData(packageName: string, dataType: string, dataReadTimeout?: number): string[];
|
|
67
|
+
/**
|
|
68
|
+
* Appium Protocol Command
|
|
69
|
+
*
|
|
70
|
+
* Press a particular key on the device.
|
|
71
|
+
* @ref http://appium.io/docs/en/commands/device/keys/press-keycode/
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
pressKeyCode(keycode: number, metastate?: number, flags?: number): void;
|
|
75
|
+
/**
|
|
76
|
+
* Appium Protocol Command
|
|
77
|
+
*
|
|
78
|
+
* Press and hold a particular key code on the device.
|
|
79
|
+
* @ref http://appium.io/docs/en/commands/device/keys/long-press-keycode/
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
longPressKeyCode(keycode: number, metastate?: number, flags?: number): void;
|
|
83
|
+
/**
|
|
84
|
+
* Appium Protocol Command
|
|
85
|
+
*
|
|
86
|
+
* Send a key code to the device.
|
|
87
|
+
* @ref https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
sendKeyEvent(keycode: string, metastate?: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Appium Protocol Command
|
|
93
|
+
*
|
|
94
|
+
* Rotate the device in three dimensions.
|
|
95
|
+
* @ref http://appium.io/docs/en/commands/device/interactions/rotate/
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
98
|
+
rotateDevice(x: number, y: number, radius: number, rotation: number, touchCount: number, duration: number, element?: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Appium Protocol Command
|
|
101
|
+
*
|
|
102
|
+
* Get the name of the current Android activity.
|
|
103
|
+
* @ref http://appium.io/docs/en/commands/device/activity/current-activity/
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
getCurrentActivity(): string;
|
|
107
|
+
/**
|
|
108
|
+
* Appium Protocol Command
|
|
109
|
+
*
|
|
110
|
+
* Get the name of the current Android package.
|
|
111
|
+
* @ref http://appium.io/docs/en/commands/device/activity/current-package/
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
getCurrentPackage(): string;
|
|
115
|
+
/**
|
|
116
|
+
* Appium Protocol Command
|
|
117
|
+
*
|
|
118
|
+
* Install the given app onto the device.
|
|
119
|
+
* @ref http://appium.io/docs/en/commands/device/app/install-app/
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
installApp(appPath: string): void;
|
|
123
|
+
/**
|
|
124
|
+
* Appium Protocol Command
|
|
125
|
+
*
|
|
126
|
+
* Activate the given app onto the device
|
|
127
|
+
* @ref http://appium.io/docs/en/commands/device/app/activate-app/
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
activateApp(appId?: string, bundleId?: string): void;
|
|
131
|
+
/**
|
|
132
|
+
* Appium Protocol Command
|
|
133
|
+
*
|
|
134
|
+
* Remove an app from the device.
|
|
135
|
+
* @ref http://appium.io/docs/en/commands/device/app/remove-app/
|
|
136
|
+
*
|
|
137
|
+
*/
|
|
138
|
+
removeApp(appId?: string, bundleId?: string): void;
|
|
139
|
+
/**
|
|
140
|
+
* Appium Protocol Command
|
|
141
|
+
*
|
|
142
|
+
* Terminate the given app on the device
|
|
143
|
+
* @ref http://appium.io/docs/en/commands/device/app/terminate-app/
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
terminateApp(appId?: string, bundleId?: string): void;
|
|
147
|
+
/**
|
|
148
|
+
* Appium Protocol Command
|
|
149
|
+
*
|
|
150
|
+
* Check whether the specified app is installed on the device.
|
|
151
|
+
* @ref http://appium.io/docs/en/commands/device/app/is-app-installed/
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
isAppInstalled(appId?: string, bundleId?: string): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Appium Protocol Command
|
|
157
|
+
*
|
|
158
|
+
* Get the given app status on the device
|
|
159
|
+
* @ref http://appium.io/docs/en/commands/device/app/app-state/
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
162
|
+
queryAppState(appId?: string, bundleId?: string): number;
|
|
163
|
+
/**
|
|
164
|
+
* Appium Protocol Command
|
|
165
|
+
*
|
|
166
|
+
* Hide soft keyboard.
|
|
167
|
+
* @ref http://appium.io/docs/en/commands/device/keys/hide-keyboard/
|
|
168
|
+
*
|
|
169
|
+
*/
|
|
170
|
+
hideKeyboard(strategy?: string, key?: string, keyCode?: string, keyName?: string): void;
|
|
171
|
+
/**
|
|
172
|
+
* Appium Protocol Command
|
|
173
|
+
*
|
|
174
|
+
* Whether or not the soft keyboard is shown.
|
|
175
|
+
* @ref http://appium.io/docs/en/commands/device/keys/is-keyboard-shown/
|
|
176
|
+
*
|
|
177
|
+
*/
|
|
178
|
+
isKeyboardShown(): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Appium Protocol Command
|
|
181
|
+
*
|
|
182
|
+
* Place a file onto the device in a particular place.
|
|
183
|
+
* @ref http://appium.io/docs/en/commands/device/files/push-file/
|
|
184
|
+
*
|
|
185
|
+
*/
|
|
186
|
+
pushFile(path: string, data: string): void;
|
|
187
|
+
/**
|
|
188
|
+
* Appium Protocol Command
|
|
189
|
+
*
|
|
190
|
+
* Retrieve a file from the device's file system.
|
|
191
|
+
* @ref http://appium.io/docs/en/commands/device/files/pull-file/
|
|
192
|
+
*
|
|
193
|
+
*/
|
|
194
|
+
pullFile(path: string): string;
|
|
195
|
+
/**
|
|
196
|
+
* Appium Protocol Command
|
|
197
|
+
*
|
|
198
|
+
* Retrieve a folder from the device's file system.
|
|
199
|
+
* @ref http://appium.io/docs/en/commands/device/files/pull-folder/
|
|
200
|
+
*
|
|
201
|
+
*/
|
|
202
|
+
pullFolder(path: string): void;
|
|
203
|
+
/**
|
|
204
|
+
* Appium Protocol Command
|
|
205
|
+
*
|
|
206
|
+
* Toggle airplane mode on device.
|
|
207
|
+
* @ref http://appium.io/docs/en/commands/device/network/toggle-airplane-mode/
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
toggleAirplaneMode(): void;
|
|
211
|
+
/**
|
|
212
|
+
* Appium Protocol Command
|
|
213
|
+
*
|
|
214
|
+
* Switch the state of data service.
|
|
215
|
+
* @ref http://appium.io/docs/en/commands/device/network/toggle-data/
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
toggleData(): void;
|
|
219
|
+
/**
|
|
220
|
+
* Appium Protocol Command
|
|
221
|
+
*
|
|
222
|
+
* Switch the state of the wifi service.
|
|
223
|
+
* @ref http://appium.io/docs/en/commands/device/network/toggle-wifi/
|
|
224
|
+
*
|
|
225
|
+
*/
|
|
226
|
+
toggleWiFi(): void;
|
|
227
|
+
/**
|
|
228
|
+
* Appium Protocol Command
|
|
229
|
+
*
|
|
230
|
+
* Switch the state of the location service.
|
|
231
|
+
* @ref http://appium.io/docs/en/commands/device/network/toggle-location-services/
|
|
232
|
+
*
|
|
233
|
+
*/
|
|
234
|
+
toggleLocationServices(): void;
|
|
235
|
+
/**
|
|
236
|
+
* Appium Protocol Command
|
|
237
|
+
*
|
|
238
|
+
* Set network speed (Emulator only)
|
|
239
|
+
* @ref http://appium.io/docs/en/commands/device/network/network-speed/
|
|
240
|
+
*
|
|
241
|
+
*/
|
|
242
|
+
toggleNetworkSpeed(): void;
|
|
243
|
+
/**
|
|
244
|
+
* Appium Protocol Command
|
|
245
|
+
*
|
|
246
|
+
* Open Android notifications (Emulator only).
|
|
247
|
+
* @ref http://appium.io/docs/en/commands/device/system/open-notifications/
|
|
248
|
+
*
|
|
249
|
+
*/
|
|
250
|
+
openNotifications(): void;
|
|
251
|
+
/**
|
|
252
|
+
* Appium Protocol Command
|
|
253
|
+
*
|
|
254
|
+
* Start an Android activity by providing package name and activity name.
|
|
255
|
+
* @ref http://appium.io/docs/en/commands/device/activity/start-activity/
|
|
256
|
+
*
|
|
257
|
+
*/
|
|
258
|
+
startActivity(appPackage: string, appActivity: string, appWaitPackage?: string, appWaitActivity?: string, intentAction?: string, intentCategory?: string, intentFlags?: string, optionalIntentArguments?: string, dontStopAppOnReset?: string): void;
|
|
259
|
+
/**
|
|
260
|
+
* Appium Protocol Command
|
|
261
|
+
*
|
|
262
|
+
* Retrieve visibility and bounds information of the status and navigation bars.
|
|
263
|
+
* @ref http://appium.io/docs/en/commands/device/system/system-bars/
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
266
|
+
getSystemBars(): object[];
|
|
267
|
+
/**
|
|
268
|
+
* Appium Protocol Command
|
|
269
|
+
*
|
|
270
|
+
* Get the time on the device.
|
|
271
|
+
* @ref http://appium.io/docs/en/commands/device/system/system-time/
|
|
272
|
+
*
|
|
273
|
+
*/
|
|
274
|
+
getDeviceTime(): string;
|
|
275
|
+
/**
|
|
276
|
+
* Appium Protocol Command
|
|
277
|
+
*
|
|
278
|
+
* Get display density from device.
|
|
279
|
+
* @ref https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints
|
|
280
|
+
*
|
|
281
|
+
*/
|
|
282
|
+
getDisplayDensity(): any;
|
|
283
|
+
/**
|
|
284
|
+
* Appium Protocol Command
|
|
285
|
+
*
|
|
286
|
+
* Simulate a [touch id](https://support.apple.com/en-ca/ht201371) event (iOS Simulator only). To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true and the Simulator must be [enrolled](https://support.apple.com/en-ca/ht201371). When you set allowTouchIdEnroll to true, it will set the Simulator to be enrolled by default. The enrollment state can be [toggled](http://appium.io/docs/en/commands/device/simulator/toggle-touch-id-enrollment/index.html). This call will only work if Appium process or its parent application (e.g. Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list.
|
|
287
|
+
* @ref http://appium.io/docs/en/commands/device/simulator/touch-id/
|
|
288
|
+
*
|
|
289
|
+
*/
|
|
290
|
+
touchId(match: boolean): void;
|
|
291
|
+
/**
|
|
292
|
+
* Appium Protocol Command
|
|
293
|
+
*
|
|
294
|
+
* Toggle the simulator being [enrolled](https://support.apple.com/en-ca/ht201371) to accept touchId (iOS Simulator only). To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true. When `allowTouchIdEnroll` is set to true the Simulator will be enrolled by default, and the 'Toggle Touch ID Enrollment' changes the enrollment state. This call will only work if the Appium process or its parent application (e.g., Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list.
|
|
295
|
+
* @ref http://appium.io/docs/en/commands/device/simulator/toggle-touch-id-enrollment/
|
|
296
|
+
*
|
|
297
|
+
*/
|
|
298
|
+
toggleEnrollTouchId(enabled?: boolean): void;
|
|
299
|
+
/**
|
|
300
|
+
* Appium Protocol Command
|
|
301
|
+
*
|
|
302
|
+
* Launch an app on device. iOS tests with XCUITest can also use the `mobile: launchApp` method. See detailed [documentation](http://appium.io/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management/index.html#mobile-launchapp).
|
|
303
|
+
* @ref http://appium.io/docs/en/commands/device/app/launch-app/
|
|
304
|
+
*
|
|
305
|
+
*/
|
|
306
|
+
launchApp(): void;
|
|
307
|
+
/**
|
|
308
|
+
* Appium Protocol Command
|
|
309
|
+
*
|
|
310
|
+
* Close an app on device.
|
|
311
|
+
* @ref http://appium.io/docs/en/commands/device/app/close-app/
|
|
312
|
+
*
|
|
313
|
+
*/
|
|
314
|
+
closeApp(): void;
|
|
315
|
+
/**
|
|
316
|
+
* Appium Protocol Command
|
|
317
|
+
*
|
|
318
|
+
* Reset the currently running app for this session.
|
|
319
|
+
* @ref http://appium.io/docs/en/commands/device/app/reset-app/
|
|
320
|
+
*
|
|
321
|
+
*/
|
|
322
|
+
reset(): void;
|
|
323
|
+
/**
|
|
324
|
+
* Appium Protocol Command
|
|
325
|
+
*
|
|
326
|
+
* Send the currently running app for this session to the background. iOS tests with XCUITest can also use the `mobile: terminateApp` method to terminate the current app (see detailed [documentation](http://appium.io/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management/index.html#mobile-terminateapp)), and the `mobile: activateApp` to activate an existing application on the device under test and moves it to the foreground (see detailed [documentation](http://appium.io/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management/index.html#mobile-activateapp)).
|
|
327
|
+
* @ref http://appium.io/docs/en/commands/device/app/background-app/
|
|
328
|
+
*
|
|
329
|
+
*/
|
|
330
|
+
background(seconds: (number | null)): void;
|
|
331
|
+
/**
|
|
332
|
+
* Appium Protocol Command
|
|
333
|
+
*
|
|
334
|
+
* Get test coverage data.
|
|
335
|
+
* @ref http://appium.io/docs/en/commands/device/app/end-test-coverage/
|
|
336
|
+
*
|
|
337
|
+
*/
|
|
338
|
+
endCoverage(intent: string, path: string): void;
|
|
339
|
+
/**
|
|
340
|
+
* Appium Protocol Command
|
|
341
|
+
*
|
|
342
|
+
* Get app strings.
|
|
343
|
+
* @ref http://appium.io/docs/en/commands/device/app/get-app-strings/
|
|
344
|
+
*
|
|
345
|
+
*/
|
|
346
|
+
getStrings(language?: string, stringFile?: string): StringsReturn;
|
|
347
|
+
/**
|
|
348
|
+
* Appium Protocol Command
|
|
349
|
+
*
|
|
350
|
+
* No description available, please see reference link.
|
|
351
|
+
* @ref https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints
|
|
352
|
+
*
|
|
353
|
+
*/
|
|
354
|
+
setValueImmediate(elementId: string, value: string): void;
|
|
355
|
+
/**
|
|
356
|
+
* Appium Protocol Command
|
|
357
|
+
*
|
|
358
|
+
* Replace the value to element directly.
|
|
359
|
+
* @ref https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints
|
|
360
|
+
*
|
|
361
|
+
*/
|
|
362
|
+
replaceValue(elementId: string, value: string): void;
|
|
363
|
+
/**
|
|
364
|
+
* Appium Protocol Command
|
|
365
|
+
*
|
|
366
|
+
* Retrieve the current settings on the device.
|
|
367
|
+
* @ref http://appium.io/docs/en/commands/session/settings/get-settings/
|
|
368
|
+
*
|
|
369
|
+
*/
|
|
370
|
+
getSettings(): SettingsReturn;
|
|
371
|
+
/**
|
|
372
|
+
* Appium Protocol Command
|
|
373
|
+
*
|
|
374
|
+
* Update the current setting on the device.
|
|
375
|
+
* @ref http://appium.io/docs/en/commands/session/settings/update-settings/
|
|
376
|
+
*
|
|
377
|
+
*/
|
|
378
|
+
updateSettings(settings: object): void;
|
|
379
|
+
/**
|
|
380
|
+
* Appium Protocol Command
|
|
381
|
+
*
|
|
382
|
+
* Callback url for asynchronous execution of JavaScript.
|
|
383
|
+
* @ref https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints
|
|
384
|
+
*
|
|
385
|
+
*/
|
|
386
|
+
receiveAsyncResponse(response: object): void;
|
|
387
|
+
/**
|
|
388
|
+
* Appium Protocol Command
|
|
389
|
+
*
|
|
390
|
+
* Make GSM call (Emulator only).
|
|
391
|
+
* @ref http://appium.io/docs/en/commands/device/network/gsm-call/
|
|
392
|
+
*
|
|
393
|
+
*/
|
|
394
|
+
gsmCall(phoneNumber: string, action: string): void;
|
|
395
|
+
/**
|
|
396
|
+
* Appium Protocol Command
|
|
397
|
+
*
|
|
398
|
+
* Set GSM signal strength (Emulator only).
|
|
399
|
+
* @ref http://appium.io/docs/en/commands/device/network/gsm-signal/
|
|
400
|
+
*
|
|
401
|
+
*/
|
|
402
|
+
gsmSignal(signalStrength: string, signalStrengh?: string): void;
|
|
403
|
+
/**
|
|
404
|
+
* Appium Protocol Command
|
|
405
|
+
*
|
|
406
|
+
* Set the battery percentage (Emulator only).
|
|
407
|
+
* @ref http://appium.io/docs/en/commands/device/emulator/power_capacity/
|
|
408
|
+
*
|
|
409
|
+
*/
|
|
410
|
+
powerCapacity(percent: number): void;
|
|
411
|
+
/**
|
|
412
|
+
* Appium Protocol Command
|
|
413
|
+
*
|
|
414
|
+
* Set the state of the battery charger to connected or not (Emulator only).
|
|
415
|
+
* @ref http://appium.io/docs/en/commands/device/emulator/power_ac/
|
|
416
|
+
*
|
|
417
|
+
*/
|
|
418
|
+
powerAC(state: string): void;
|
|
419
|
+
/**
|
|
420
|
+
* Appium Protocol Command
|
|
421
|
+
*
|
|
422
|
+
* Set GSM voice state (Emulator only).
|
|
423
|
+
* @ref http://appium.io/docs/en/commands/device/network/gsm-voice/
|
|
424
|
+
*
|
|
425
|
+
*/
|
|
426
|
+
gsmVoice(state: string): void;
|
|
427
|
+
/**
|
|
428
|
+
* Appium Protocol Command
|
|
429
|
+
*
|
|
430
|
+
* Simulate an SMS message (Emulator only).
|
|
431
|
+
* @ref http://appium.io/docs/en/commands/device/network/send-sms/
|
|
432
|
+
*
|
|
433
|
+
*/
|
|
434
|
+
sendSms(phoneNumber: string, message: string): void;
|
|
435
|
+
/**
|
|
436
|
+
* Appium Protocol Command
|
|
437
|
+
*
|
|
438
|
+
* Authenticate users by using their finger print scans on supported emulators.
|
|
439
|
+
* @ref http://appium.io/docs/en/commands/device/authentication/finger-print/
|
|
440
|
+
*
|
|
441
|
+
*/
|
|
442
|
+
fingerPrint(fingerprintId: number): void;
|
|
443
|
+
/**
|
|
444
|
+
* Appium Protocol Command
|
|
445
|
+
*
|
|
446
|
+
* Set the content of the system clipboard
|
|
447
|
+
* @ref http://appium.io/docs/en/commands/device/clipboard/set-clipboard/
|
|
448
|
+
*
|
|
449
|
+
*/
|
|
450
|
+
setClipboard(content: string, contentType?: string, label?: string): string;
|
|
451
|
+
/**
|
|
452
|
+
* Appium Protocol Command
|
|
453
|
+
*
|
|
454
|
+
* Get the content of the system clipboard
|
|
455
|
+
* @ref http://appium.io/docs/en/commands/device/clipboard/get-clipboard/
|
|
456
|
+
*
|
|
457
|
+
*/
|
|
458
|
+
getClipboard(contentType?: string): string;
|
|
459
|
+
/**
|
|
460
|
+
* Appium Protocol Command
|
|
461
|
+
*
|
|
462
|
+
* This functionality is only available from within a native context. 'Touch Perform' works similarly to the other singular touch interactions, except that this allows you to chain together more than one touch action as one command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch interactions impossible because some interactions need to be performed in one sequence. Vertical, for example, requires pressing down, moving to a different y coordinate, and then releasing. For it to work, there can't be a delay between the interactions.
|
|
463
|
+
* @ref http://appium.io/docs/en/commands/interactions/touch/touch-perform/
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```js
|
|
467
|
+
* // do a horizontal swipe by percentage
|
|
468
|
+
* const startPercentage = 10;
|
|
469
|
+
* const endPercentage = 90;
|
|
470
|
+
* const anchorPercentage = 50;
|
|
471
|
+
*
|
|
472
|
+
* const { width, height } = driver.getWindowSize();
|
|
473
|
+
* const anchor = height// anchorPercentage / 100;
|
|
474
|
+
* const startPoint = width// startPercentage / 100;
|
|
475
|
+
* const endPoint = width// endPercentage / 100;
|
|
476
|
+
* driver.touchPerform([
|
|
477
|
+
* {
|
|
478
|
+
* action: 'press',
|
|
479
|
+
* options: {
|
|
480
|
+
* x: startPoint,
|
|
481
|
+
* y: anchor,
|
|
482
|
+
* },
|
|
483
|
+
* },
|
|
484
|
+
* {
|
|
485
|
+
* action: 'wait',
|
|
486
|
+
* options: {
|
|
487
|
+
* ms: 100,
|
|
488
|
+
* },
|
|
489
|
+
* },
|
|
490
|
+
* {
|
|
491
|
+
* action: 'moveTo',
|
|
492
|
+
* options: {
|
|
493
|
+
* x: endPoint,
|
|
494
|
+
* y: anchor,
|
|
495
|
+
* },
|
|
496
|
+
* },
|
|
497
|
+
* {
|
|
498
|
+
* action: 'release',
|
|
499
|
+
* options: {},
|
|
500
|
+
* },
|
|
501
|
+
* ]);
|
|
502
|
+
* ```
|
|
503
|
+
*/
|
|
504
|
+
touchPerform(actions: object[]): void;
|
|
505
|
+
/**
|
|
506
|
+
* Appium Protocol Command
|
|
507
|
+
*
|
|
508
|
+
* This functionality is only available from within a native context. Perform a multi touch action sequence.
|
|
509
|
+
* @ref http://appium.io/docs/en/commands/interactions/touch/multi-touch-perform/
|
|
510
|
+
*
|
|
511
|
+
*/
|
|
512
|
+
multiTouchPerform(actions: object[]): void;
|
|
513
|
+
/**
|
|
514
|
+
* Appium Protocol Command
|
|
515
|
+
*
|
|
516
|
+
* This command allows you to define a webdriverio script in a string and send it to the Appium server to be executed locally to the server itself, thus reducing latency that might otherwise occur along with each command.
|
|
517
|
+
* @ref https://github.com/appium/appium/blob/master/docs/en/commands/session/execute-driver.md
|
|
518
|
+
*
|
|
519
|
+
*/
|
|
520
|
+
driverScript(script: string, type?: string, timeout?: number): ProtocolCommandResponse;
|
|
521
|
+
/**
|
|
522
|
+
* Appium Protocol Command
|
|
523
|
+
*
|
|
524
|
+
* Get events stored in appium server.
|
|
525
|
+
* @ref https://github.com/appium/appium/blob/master/docs/en/commands/session/events/get-events.md
|
|
526
|
+
*
|
|
527
|
+
*/
|
|
528
|
+
getEvents(type: string[]): ProtocolCommandResponse;
|
|
529
|
+
/**
|
|
530
|
+
* Appium Protocol Command
|
|
531
|
+
*
|
|
532
|
+
* Store a custom event.
|
|
533
|
+
* @ref https://github.com/appium/appium/blob/master/docs/en/commands/session/events/log-event.md
|
|
534
|
+
*
|
|
535
|
+
*/
|
|
536
|
+
logEvent(vendor: string, event: string): void;
|
|
537
|
+
/**
|
|
538
|
+
* Appium Protocol Command
|
|
539
|
+
*
|
|
540
|
+
* Performs images comparison using OpenCV framework features. It is expected that both OpenCV framework and opencv4nodejs module are installed on the machine where Appium server is running.
|
|
541
|
+
* @ref http://appium.io/docs/en/writing-running-appium/image-comparison/
|
|
542
|
+
*
|
|
543
|
+
*/
|
|
544
|
+
compareImages(mode: string, firstImage: string, secondImage: string, options: object): ProtocolCommandResponse;
|
|
545
|
+
}
|
|
546
|
+
//# sourceMappingURL=appium.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appium.d.ts","sourceRoot":"","sources":["../../src/commands/appium.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAGjF,MAAM,CAAC,OAAO,WAAW,cAAc;IAEnC;;;;;;OAMG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;;;;OAMG;IACH,MAAM,IAAI,IAAI,CAAC;IAEf;;;;;;OAMG;IACH,QAAQ,IAAI,OAAO,CAAC;IAEpB;;;;;;OAMG;IACH,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7C;;;;;;O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