appium-android-driver 5.13.1 → 5.13.3

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.
Files changed (151) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/index.js +43 -40
  3. package/build/lib/android-helpers.d.ts +136 -0
  4. package/build/lib/android-helpers.d.ts.map +1 -0
  5. package/build/lib/android-helpers.js +760 -679
  6. package/build/lib/android-helpers.js.map +1 -1
  7. package/build/lib/bootstrap.d.ts +29 -0
  8. package/build/lib/bootstrap.d.ts.map +1 -0
  9. package/build/lib/bootstrap.js +192 -179
  10. package/build/lib/bootstrap.js.map +1 -1
  11. package/build/lib/commands/actions.d.ts +209 -0
  12. package/build/lib/commands/actions.d.ts.map +1 -0
  13. package/build/lib/commands/actions.js +327 -265
  14. package/build/lib/commands/actions.js.map +1 -1
  15. package/build/lib/commands/alert.d.ts +10 -0
  16. package/build/lib/commands/alert.d.ts.map +1 -0
  17. package/build/lib/commands/alert.js +12 -18
  18. package/build/lib/commands/alert.js.map +1 -1
  19. package/build/lib/commands/app-management.d.ts +314 -0
  20. package/build/lib/commands/app-management.d.ts.map +1 -0
  21. package/build/lib/commands/app-management.js +278 -110
  22. package/build/lib/commands/app-management.js.map +1 -1
  23. package/build/lib/commands/context.d.ts +94 -0
  24. package/build/lib/commands/context.d.ts.map +1 -0
  25. package/build/lib/commands/context.js +412 -260
  26. package/build/lib/commands/context.js.map +1 -1
  27. package/build/lib/commands/coverage.d.ts +5 -0
  28. package/build/lib/commands/coverage.d.ts.map +1 -0
  29. package/build/lib/commands/coverage.js +14 -17
  30. package/build/lib/commands/coverage.js.map +1 -1
  31. package/build/lib/commands/element.d.ts +36 -0
  32. package/build/lib/commands/element.d.ts.map +1 -0
  33. package/build/lib/commands/element.js +97 -127
  34. package/build/lib/commands/element.js.map +1 -1
  35. package/build/lib/commands/emu-console.d.ts +49 -0
  36. package/build/lib/commands/emu-console.d.ts.map +1 -0
  37. package/build/lib/commands/emu-console.js +36 -25
  38. package/build/lib/commands/emu-console.js.map +1 -1
  39. package/build/lib/commands/execute.d.ts +6 -0
  40. package/build/lib/commands/execute.d.ts.map +1 -0
  41. package/build/lib/commands/execute.js +68 -69
  42. package/build/lib/commands/execute.js.map +1 -1
  43. package/build/lib/commands/file-actions.d.ts +129 -0
  44. package/build/lib/commands/file-actions.d.ts.map +1 -0
  45. package/build/lib/commands/file-actions.js +321 -178
  46. package/build/lib/commands/file-actions.js.map +1 -1
  47. package/build/lib/commands/find.d.ts +13 -0
  48. package/build/lib/commands/find.d.ts.map +1 -0
  49. package/build/lib/commands/find.js +69 -51
  50. package/build/lib/commands/find.js.map +1 -1
  51. package/build/lib/commands/general.d.ts +133 -0
  52. package/build/lib/commands/general.d.ts.map +1 -0
  53. package/build/lib/commands/general.js +275 -216
  54. package/build/lib/commands/general.js.map +1 -1
  55. package/build/lib/commands/ime.d.ts +11 -0
  56. package/build/lib/commands/ime.d.ts.map +1 -0
  57. package/build/lib/commands/ime.js +27 -33
  58. package/build/lib/commands/ime.js.map +1 -1
  59. package/build/lib/commands/index.d.ts +3 -0
  60. package/build/lib/commands/index.d.ts.map +1 -0
  61. package/build/lib/commands/index.js +32 -35
  62. package/build/lib/commands/index.js.map +1 -1
  63. package/build/lib/commands/intent.d.ts +418 -0
  64. package/build/lib/commands/intent.d.ts.map +1 -0
  65. package/build/lib/commands/intent.js +281 -151
  66. package/build/lib/commands/intent.js.map +1 -1
  67. package/build/lib/commands/keyboard.d.ts +6 -0
  68. package/build/lib/commands/keyboard.d.ts.map +1 -0
  69. package/build/lib/commands/keyboard.js +6 -14
  70. package/build/lib/commands/keyboard.js.map +1 -1
  71. package/build/lib/commands/log.d.ts +45 -0
  72. package/build/lib/commands/log.d.ts.map +1 -0
  73. package/build/lib/commands/log.js +117 -103
  74. package/build/lib/commands/log.js.map +1 -1
  75. package/build/lib/commands/media-projection.d.ts +144 -0
  76. package/build/lib/commands/media-projection.d.ts.map +1 -0
  77. package/build/lib/commands/media-projection.js +228 -171
  78. package/build/lib/commands/media-projection.js.map +1 -1
  79. package/build/lib/commands/network.d.ts +139 -0
  80. package/build/lib/commands/network.d.ts.map +1 -0
  81. package/build/lib/commands/network.js +249 -181
  82. package/build/lib/commands/network.js.map +1 -1
  83. package/build/lib/commands/performance.d.ts +101 -0
  84. package/build/lib/commands/performance.d.ts.map +1 -0
  85. package/build/lib/commands/performance.js +390 -236
  86. package/build/lib/commands/performance.js.map +1 -1
  87. package/build/lib/commands/permissions.d.ts +93 -0
  88. package/build/lib/commands/permissions.d.ts.map +1 -0
  89. package/build/lib/commands/permissions.js +133 -93
  90. package/build/lib/commands/permissions.js.map +1 -1
  91. package/build/lib/commands/recordscreen.d.ts +194 -0
  92. package/build/lib/commands/recordscreen.d.ts.map +1 -0
  93. package/build/lib/commands/recordscreen.js +293 -224
  94. package/build/lib/commands/recordscreen.js.map +1 -1
  95. package/build/lib/commands/shell.d.ts +8 -0
  96. package/build/lib/commands/shell.d.ts.map +1 -0
  97. package/build/lib/commands/shell.js +38 -43
  98. package/build/lib/commands/shell.js.map +1 -1
  99. package/build/lib/commands/streamscreen.d.ts +104 -0
  100. package/build/lib/commands/streamscreen.d.ts.map +1 -0
  101. package/build/lib/commands/streamscreen.js +364 -305
  102. package/build/lib/commands/streamscreen.js.map +1 -1
  103. package/build/lib/commands/system-bars.d.ts +100 -0
  104. package/build/lib/commands/system-bars.d.ts.map +1 -0
  105. package/build/lib/commands/system-bars.js +148 -90
  106. package/build/lib/commands/system-bars.js.map +1 -1
  107. package/build/lib/commands/touch.d.ts +30 -0
  108. package/build/lib/commands/touch.d.ts.map +1 -0
  109. package/build/lib/commands/touch.js +311 -287
  110. package/build/lib/commands/touch.js.map +1 -1
  111. package/build/lib/desired-caps.d.ts +353 -0
  112. package/build/lib/desired-caps.d.ts.map +1 -0
  113. package/build/lib/desired-caps.js +291 -292
  114. package/build/lib/desired-caps.js.map +1 -1
  115. package/build/lib/driver.d.ts +430 -0
  116. package/build/lib/driver.d.ts.map +1 -0
  117. package/build/lib/driver.js +449 -384
  118. package/build/lib/driver.js.map +1 -1
  119. package/build/lib/logger.d.ts +3 -0
  120. package/build/lib/logger.d.ts.map +1 -0
  121. package/build/lib/logger.js +5 -11
  122. package/build/lib/logger.js.map +1 -1
  123. package/build/lib/method-map.d.ts +389 -0
  124. package/build/lib/method-map.d.ts.map +1 -0
  125. package/build/lib/method-map.js +220 -394
  126. package/build/lib/method-map.js.map +1 -1
  127. package/build/lib/stubs.d.ts +8 -0
  128. package/build/lib/stubs.d.ts.map +1 -0
  129. package/build/lib/stubs.js +5 -0
  130. package/build/lib/stubs.js.map +1 -0
  131. package/build/lib/uiautomator.d.ts +24 -0
  132. package/build/lib/uiautomator.d.ts.map +1 -0
  133. package/build/lib/uiautomator.js +86 -82
  134. package/build/lib/uiautomator.js.map +1 -1
  135. package/build/lib/unlock-helpers.d.ts +38 -0
  136. package/build/lib/unlock-helpers.d.ts.map +1 -0
  137. package/build/lib/unlock-helpers.js +228 -204
  138. package/build/lib/unlock-helpers.js.map +1 -1
  139. package/build/lib/utils.d.ts +11 -0
  140. package/build/lib/utils.d.ts.map +1 -0
  141. package/build/lib/utils.js +23 -18
  142. package/build/lib/utils.js.map +1 -1
  143. package/build/lib/webview-helpers.d.ts +223 -0
  144. package/build/lib/webview-helpers.d.ts.map +1 -0
  145. package/build/lib/webview-helpers.js +476 -298
  146. package/build/lib/webview-helpers.js.map +1 -1
  147. package/index.js +3 -1
  148. package/lib/android-helpers.js +2 -1
  149. package/lib/stubs.ts +8 -0
  150. package/lib/unlock-helpers.js +2 -2
  151. package/package.json +24 -15
@@ -0,0 +1,209 @@
1
+ export default extensions;
2
+ export type FingerprintOpts = any;
3
+ export type SendSmsOptions = {
4
+ /**
5
+ * The phone number to send SMS to
6
+ */
7
+ phoneNumber: string;
8
+ /**
9
+ * The message payload
10
+ */
11
+ message: string;
12
+ };
13
+ export type GsmCallOptions = {
14
+ /**
15
+ * The phone number to call to
16
+ */
17
+ phoneNumber: string;
18
+ /**
19
+ * One of possible actions to take
20
+ */
21
+ action: call | accept | cancel | hold;
22
+ };
23
+ export type GsmSignalOptions = {
24
+ /**
25
+ * One of possible signal strength values, where 4 is the best signal.
26
+ */
27
+ strength: 0 | 1 | 2 | 3 | 4;
28
+ };
29
+ export type GsmVoiceOptions = {
30
+ state: on | off;
31
+ };
32
+ export type PowerAcOptions = {
33
+ state: on | off;
34
+ };
35
+ export type PowerCapacityOptions = {
36
+ /**
37
+ * - Percentage value in range [0, 100]
38
+ */
39
+ percent: number;
40
+ };
41
+ export type NetworkSpeedOptions = {
42
+ speed: gsm | scsd | gprs | edge | umts | hsdpa | lte | evdo | full;
43
+ };
44
+ /**
45
+ * Emulate sensors values on the connected emulator.
46
+ */
47
+ export type Sensor = {
48
+ /**
49
+ * - sensor type declared in adb.SENSORS
50
+ */
51
+ sensorType: string;
52
+ /**
53
+ * - value to set to the sensor
54
+ */
55
+ value: string;
56
+ };
57
+ export namespace commands {
58
+ function keyevent(keycode: any, metastate?: null): Promise<any>;
59
+ function pressKeyCode(keycode: any, metastate?: null): Promise<any>;
60
+ function longPressKeyCode(keycode: any, metastate?: null): Promise<any>;
61
+ function getOrientation(): Promise<any>;
62
+ function setOrientation(orientation: any): Promise<any>;
63
+ function fakeFlick(xSpeed: any, ySpeed: any): Promise<any>;
64
+ function fakeFlickElement(elementId: any, xoffset: any, yoffset: any, speed: any): Promise<any>;
65
+ function swipe(startX: any, startY: any, endX: any, endY: any, duration: any, touchCount: any, elId: any): Promise<any>;
66
+ function doSwipe(swipeOpts: any): Promise<any>;
67
+ function pinchClose(startX: any, startY: any, endX: any, endY: any, duration: any, percent: any, steps: any, elId: any): Promise<any>;
68
+ function pinchOpen(startX: any, startY: any, endX: any, endY: any, duration: any, percent: any, steps: any, elId: any): Promise<any>;
69
+ function flick(element: any, xSpeed: any, ySpeed: any, xOffset: any, yOffset: any, speed: any): Promise<void>;
70
+ function drag(startX: any, startY: any, endX: any, endY: any, duration: any, touchCount: any, elementId: any, destElId: any): Promise<any>;
71
+ function doDrag(dragOpts: any): Promise<any>;
72
+ function lock(seconds: any): Promise<void>;
73
+ function isLocked(): Promise<any>;
74
+ function unlock(): Promise<void>;
75
+ function openNotifications(): Promise<any>;
76
+ function setLocation(latitude: any, longitude: any): Promise<any>;
77
+ function fingerprint(fingerprintId: any): Promise<void>;
78
+ /**
79
+ * @typedef {Object} FingerprintOpts
80
+ * @param {string|number} fingerprintId The value is the finger_id for the finger that
81
+ * was "scanned". It is a unique integer that you assign for each virtual fingerprint.
82
+ * When the app is running you can run this same command each time the
83
+ * emulator prompts you for a fingerprint, you can run the adb command and pass it
84
+ * the finger_id to simulate the fingerprint scan.
85
+ */
86
+ /**
87
+ * Emulate fingerprint on Android Emulator.
88
+ * Only works on API 23+
89
+ *
90
+ * @param {FingerprintOpts} opts
91
+ */
92
+ function mobileFingerprint(opts?: any): Promise<void>;
93
+ function sendSMS(phoneNumber: any, message: any): Promise<void>;
94
+ /**
95
+ * @typedef {Object} SendSmsOptions
96
+ * @property {string} phoneNumber The phone number to send SMS to
97
+ * @property {string} message The message payload
98
+ */
99
+ /**
100
+ * Emulate sending an SMS to the given phone number.
101
+ * Only works on emulators.
102
+ *
103
+ * @param {SendSmsOptions} opts
104
+ */
105
+ function mobileSendSms(opts?: SendSmsOptions): Promise<void>;
106
+ function gsmCall(phoneNumber: any, action: any): Promise<void>;
107
+ /**
108
+ * @typedef {Object} GsmCallOptions
109
+ * @property {string} phoneNumber The phone number to call to
110
+ * @property {call|accept|cancel|hold} action One of possible actions to take
111
+ */
112
+ /**
113
+ * Emulate a GSM call to the given phone number.
114
+ * Only works on emulators.
115
+ *
116
+ * @param {GsmCallOptions} opts
117
+ */
118
+ function mobileGsmCall(opts?: GsmCallOptions): Promise<void>;
119
+ function gsmSignal(signalStrengh: any): Promise<void>;
120
+ /**
121
+ * @typedef {Object} GsmSignalOptions
122
+ * @property {0|1|2|3|4} strength One of possible signal strength values, where 4 is the best signal.
123
+ */
124
+ /**
125
+ * Emulate GSM signal strength change event.
126
+ * Only works on emulators.
127
+ *
128
+ * @param {GsmSignalOptions} opts
129
+ */
130
+ function mobileGsmSignal(opts?: GsmSignalOptions): Promise<void>;
131
+ function gsmVoice(state: any): Promise<void>;
132
+ /**
133
+ * @typedef {Object} GsmVoiceOptions
134
+ * @property {on|off} state
135
+ */
136
+ /**
137
+ * Emulate GSM voice state change event.
138
+ * Only works on emulators.
139
+ *
140
+ * @param {GsmVoiceOptions} opts
141
+ */
142
+ function mobileGsmVoice(opts?: GsmVoiceOptions): Promise<void>;
143
+ function powerAC(state: any): Promise<void>;
144
+ /**
145
+ * @typedef {Object} PowerAcOptions
146
+ * @property {on|off} state
147
+ */
148
+ /**
149
+ * Emulate AC power state change.
150
+ * Only works on emulators.
151
+ *
152
+ * @param {GsmVoiceOptions} opts
153
+ */
154
+ function mobilePowerAc(opts?: GsmVoiceOptions): Promise<void>;
155
+ function powerCapacity(batteryPercent: any): Promise<void>;
156
+ /**
157
+ * @typedef {Object} PowerCapacityOptions
158
+ * @property {number} percent - Percentage value in range [0, 100]
159
+ */
160
+ /**
161
+ * Emulate power capacity change.
162
+ * Only works on emulators.
163
+ *
164
+ * @param {PowerCapacityOptions} opts
165
+ */
166
+ function mobilePowerCapacity(opts?: PowerCapacityOptions): Promise<void>;
167
+ function networkSpeed(networkSpeed: any): Promise<void>;
168
+ /**
169
+ * @typedef {Object} NetworkSpeedOptions
170
+ * @property {gsm|scsd|gprs|edge|umts|hsdpa|lte|evdo|full} speed
171
+ */
172
+ /**
173
+ * Emulate different network connection speed modes.
174
+ * Only works on emulators.
175
+ *
176
+ * @param {NetworkSpeedOptions} opts
177
+ */
178
+ function mobileNetworkSpeed(opts?: NetworkSpeedOptions): Promise<void>;
179
+ /**
180
+ * Emulate sensors values on the connected emulator.
181
+ *
182
+ * @typedef {Object} Sensor
183
+ * @property {string} sensorType - sensor type declared in adb.SENSORS
184
+ * @property {string} value - value to set to the sensor
185
+ *
186
+ * @param {Object} Sensor
187
+ * @throws {Error} - If sensorType is not defined
188
+ * @throws {Error} - If value for the se sor is not defined
189
+ * @throws {Error} - If deviceType is not an emulator
190
+ */
191
+ function sensorSet(sensor?: {}): Promise<void>;
192
+ function getScreenshot(): Promise<any>;
193
+ }
194
+ export namespace helpers {
195
+ /**
196
+ * @param {ADB} adb
197
+ * @param {Object} opts
198
+ * @returns {Promise<sharp>}
199
+ */
200
+ function getScreenshotDataWithAdbShell(adb: ADB, opts: any): Promise<typeof sharp>;
201
+ /**
202
+ * @param {ADB} adb
203
+ * @returns {Promise<sharp>}
204
+ */
205
+ function getScreenshotDataWithAdbExecOut(adb: ADB): Promise<typeof sharp>;
206
+ }
207
+ declare const extensions: {};
208
+ import sharp from 'sharp';
209
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";;;;;;iBA0Lc,MAAM;;;;aACN,MAAM;;;;;;iBAuBN,MAAM;;;;YACN,6BAAuB;;;;;;cAuBvB,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC;;;WAuBT,QAAM;;;WAuBN,QAAM;;;;;;aAuBN,MAAM;;;WAuBN,2DAA2C;;;;;;;;;gBAkB3C,MAAM;;;;WACN,MAAM;;;IA1UpB,gEAIC;IAED,oEAEC;IAED,wEAEC;IAED,wCAMC;IAED,wDAOC;IAED,2DAEC;IAED,gGAGC;IAED,wHAeC;IAED,+CAMC;IAED,sIAQC;IAED,qIAGC;IAED,8GAMC;IAED,2IAOC;IAED,6CAMC;IAED,2CAYC;IAED,kCAEC;IAED,iCAEC;IAED,2CAEC;IAED,kEAEC;IAED,wDAKC;IAED;;;;;;;OAOG;IAEH;;;;;OAKG;IACH,sDAGC;IAED,gEAKC;IAED;;;;OAIG;IAEH;;;;;OAKG;IACH,6DAGC;IAED,+DAKC;IAED;;;;OAIG;IAEH;;;;;OAKG;IACH,6DAGC;IAED,sDAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,iEAGC;IAED,6CAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,+DAGC;IAED,4CAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,8DAGC;IAED,2DAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,yEAGC;IAED,wDAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,uEAGC;IAED;;;;;;;;;;;OAWG;IACH,+CAYC;IAkDD,uCAiCC;;;IAjFD;;;;OAIG;IACH,mFAmBC;IAED;;;OAGG;IACH,0EAgBC;;AA/YD,6BAAsB;kBATJ,OAAO"}