appium-android-driver 5.13.1 → 5.13.2

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 +7 -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 +23 -14
@@ -0,0 +1,194 @@
1
+ export default commands;
2
+ export type StartRecordingOptions = {
3
+ /**
4
+ * - The path to the remote location, where the captured video should be uploaded.
5
+ * The following protocols are supported: http/https, ftp.
6
+ * Null or empty string value (the default setting) means the content of resulting
7
+ * file should be encoded as Base64 and passed as the endpount response value.
8
+ * An exception will be thrown if the generated media file is too big to
9
+ * fit into the available process memory.
10
+ * This option only has an effect if there is screen recording process in progreess
11
+ * and `forceRestart` parameter is not set to `true`.
12
+ */
13
+ remotePath: string | null;
14
+ /**
15
+ * - The name of the user for the remote authentication. Only works if `remotePath` is provided.
16
+ */
17
+ user: string | null;
18
+ /**
19
+ * - The password for the remote authentication. Only works if `remotePath` is provided.
20
+ */
21
+ pass: string | null;
22
+ /**
23
+ * [PUT] - The http multipart upload method name. Only works if `remotePath` is provided.
24
+ */
25
+ method: string | null;
26
+ /**
27
+ * - Additional headers mapping for multipart http(s) uploads
28
+ */
29
+ headers: any | null;
30
+ /**
31
+ * [file] - The name of the form field, where the file content BLOB should be stored for
32
+ * http(s) uploads
33
+ */
34
+ fileFieldName: string | null;
35
+ /**
36
+ * - Additional form fields for multipart http(s) uploads
37
+ */
38
+ formFields: (any | Array<Pair>) | null;
39
+ /**
40
+ * - The format is widthxheight.
41
+ * The default value is the device's native display resolution (if supported),
42
+ * 1280x720 if not. For best results,
43
+ * use a size supported by your device's Advanced Video Coding (AVC) encoder.
44
+ * For example, "1280x720"
45
+ */
46
+ videoSize: string | null;
47
+ /**
48
+ * - Set it to `true` in order to display additional information on the video overlay,
49
+ * such as a timestamp, that is helpful in videos captured to illustrate bugs.
50
+ * This option is only supported since API level 27 (Android P).
51
+ */
52
+ bugReport: boolean | null;
53
+ /**
54
+ * - The maximum recording time, in seconds. The default value is 180 (3 minutes).
55
+ * The maximum value is 1800 (30 minutes). If the passed value is greater than 180 then
56
+ * the algorithm will try to schedule multiple screen recording chunks and merge the
57
+ * resulting videos into a single media file using `ffmpeg` utility.
58
+ * If the utility is not available in PATH then the most recent screen recording chunk is
59
+ * going to be returned.
60
+ */
61
+ timeLimit: (string | number) | null;
62
+ /**
63
+ * - The video bit rate for the video, in bits per second.
64
+ * The default value is 4000000 (4 Mbit/s). You can increase the bit rate to improve video quality,
65
+ * but doing so results in larger movie files.
66
+ */
67
+ bitRate: (string | number) | null;
68
+ /**
69
+ * - Whether to try to catch and upload/return the currently running screen recording
70
+ * (`false`, the default setting) or ignore the result of it and start a new recording
71
+ * immediately (`true`).
72
+ */
73
+ forceRestart: boolean | null;
74
+ };
75
+ export type StopRecordingOptions = {
76
+ /**
77
+ * - The path to the remote location, where the resulting video should be uploaded.
78
+ * The following protocols are supported: http/https, ftp.
79
+ * Null or empty string value (the default setting) means the content of resulting
80
+ * file should be encoded as Base64 and passed as the endpount response value.
81
+ * An exception will be thrown if the generated media file is too big to
82
+ * fit into the available process memory.
83
+ */
84
+ remotePath: string | null;
85
+ /**
86
+ * - The name of the user for the remote authentication.
87
+ */
88
+ user: string | null;
89
+ /**
90
+ * - The password for the remote authentication.
91
+ */
92
+ pass: string | null;
93
+ /**
94
+ * - The http multipart upload method name. The 'PUT' one is used by default.
95
+ */
96
+ method: string | null;
97
+ /**
98
+ * - Additional headers mapping for multipart http(s) uploads
99
+ */
100
+ headers: any | null;
101
+ /**
102
+ * [file] - The name of the form field, where the file content BLOB should be stored for
103
+ * http(s) uploads
104
+ */
105
+ fileFieldName: string | null;
106
+ /**
107
+ * - Additional form fields for multipart http(s) uploads
108
+ */
109
+ formFields: (any | Array<Pair>) | null;
110
+ };
111
+ export namespace commands {
112
+ /**
113
+ * @typedef {Object} StartRecordingOptions
114
+ *
115
+ * @property {?string} remotePath - The path to the remote location, where the captured video should be uploaded.
116
+ * The following protocols are supported: http/https, ftp.
117
+ * Null or empty string value (the default setting) means the content of resulting
118
+ * file should be encoded as Base64 and passed as the endpount response value.
119
+ * An exception will be thrown if the generated media file is too big to
120
+ * fit into the available process memory.
121
+ * This option only has an effect if there is screen recording process in progreess
122
+ * and `forceRestart` parameter is not set to `true`.
123
+ * @property {?string} user - The name of the user for the remote authentication. Only works if `remotePath` is provided.
124
+ * @property {?string} pass - The password for the remote authentication. Only works if `remotePath` is provided.
125
+ * @property {?string} method [PUT] - The http multipart upload method name. Only works if `remotePath` is provided.
126
+ * @property {?Object} headers - Additional headers mapping for multipart http(s) uploads
127
+ * @property {?string} fileFieldName [file] - The name of the form field, where the file content BLOB should be stored for
128
+ * http(s) uploads
129
+ * @property {?Object|Array<Pair>} formFields - Additional form fields for multipart http(s) uploads
130
+ * @property {?string} videoSize - The format is widthxheight.
131
+ * The default value is the device's native display resolution (if supported),
132
+ * 1280x720 if not. For best results,
133
+ * use a size supported by your device's Advanced Video Coding (AVC) encoder.
134
+ * For example, "1280x720"
135
+ * @property {?boolean} bugReport - Set it to `true` in order to display additional information on the video overlay,
136
+ * such as a timestamp, that is helpful in videos captured to illustrate bugs.
137
+ * This option is only supported since API level 27 (Android P).
138
+ * @property {?string|number} timeLimit - The maximum recording time, in seconds. The default value is 180 (3 minutes).
139
+ * The maximum value is 1800 (30 minutes). If the passed value is greater than 180 then
140
+ * the algorithm will try to schedule multiple screen recording chunks and merge the
141
+ * resulting videos into a single media file using `ffmpeg` utility.
142
+ * If the utility is not available in PATH then the most recent screen recording chunk is
143
+ * going to be returned.
144
+ * @property {?string|number} bitRate - The video bit rate for the video, in bits per second.
145
+ * The default value is 4000000 (4 Mbit/s). You can increase the bit rate to improve video quality,
146
+ * but doing so results in larger movie files.
147
+ * @property {?boolean} forceRestart - Whether to try to catch and upload/return the currently running screen recording
148
+ * (`false`, the default setting) or ignore the result of it and start a new recording
149
+ * immediately (`true`).
150
+ */
151
+ /**
152
+ * Record the display of a real devices running Android 4.4 (API level 19) and higher.
153
+ * Emulators are supported since API level 27 (Android P).
154
+ * It records screen activity to an MPEG-4 file. Audio is not recorded with the video file.
155
+ * If screen recording has been already started then the command will stop it forcefully and start a new one.
156
+ * The previously recorded video file will be deleted.
157
+ *
158
+ * @param {?StartRecordingOptions} options - The available options.
159
+ * @returns {string} Base64-encoded content of the recorded media file if
160
+ * any screen recording is currently running or an empty string.
161
+ * @throws {Error} If screen recording has failed to start or is not supported on the device under test.
162
+ */
163
+ function startRecordingScreen(options?: StartRecordingOptions | null): string;
164
+ /**
165
+ * @typedef {Object} StopRecordingOptions
166
+ *
167
+ * @property {?string} remotePath - The path to the remote location, where the resulting video should be uploaded.
168
+ * The following protocols are supported: http/https, ftp.
169
+ * Null or empty string value (the default setting) means the content of resulting
170
+ * file should be encoded as Base64 and passed as the endpount response value.
171
+ * An exception will be thrown if the generated media file is too big to
172
+ * fit into the available process memory.
173
+ * @property {?string} user - The name of the user for the remote authentication.
174
+ * @property {?string} pass - The password for the remote authentication.
175
+ * @property {?string} method - The http multipart upload method name. The 'PUT' one is used by default.
176
+ * @property {?Object} headers - Additional headers mapping for multipart http(s) uploads
177
+ * @property {?string} fileFieldName [file] - The name of the form field, where the file content BLOB should be stored for
178
+ * http(s) uploads
179
+ * @property {?Object|Array<Pair>} formFields - Additional form fields for multipart http(s) uploads
180
+ */
181
+ /**
182
+ * Stop recording the screen.
183
+ * If no screen recording has been started before then the method returns an empty string.
184
+ *
185
+ * @param {?StopRecordingOptions} options - The available options.
186
+ * @returns {string} Base64-encoded content of the recorded media file if 'remotePath'
187
+ * parameter is falsy or an empty string.
188
+ * @throws {Error} If there was an error while getting the name of a media file
189
+ * or the file content cannot be uploaded to the remote location
190
+ * or screen recording is not supported on the device under test.
191
+ */
192
+ function stopRecordingScreen(options?: StopRecordingOptions | null): string;
193
+ }
194
+ //# sourceMappingURL=recordscreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordscreen.d.ts","sourceRoot":"","sources":["../../../lib/commands/recordscreen.js"],"names":[],"mappings":";;;;;;;;;;;;gBAgKe,MAAM;;;;UAQN,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;;;;;;mBAEN,MAAM;;;;iBAEN,MAAO,WAAW;;;;;;;;eAClB,MAAM;;;;;;eAKN,OAAO;;;;;;;;;gBAGP,MAAM,GAAC,MAAM;;;;;;cAMb,MAAM,GAAC,MAAM;;;;;;kBAGb,OAAO;;;;;;;;;;;gBA+DP,MAAM;;;;UAMN,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;;;;;;mBAEN,MAAM;;;;iBAEN,MAAO,WAAW;;;IA9GjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IAEH;;;;;;;;;;;OAWG;IACH,8EAyCC;IAED;;;;;;;;;;;;;;;;OAgBG;IAEH;;;;;;;;;;OAUG;IACH,4EA8DC"}