appium-xcuitest-driver 10.13.1 → 10.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.
- package/CHANGELOG.md +12 -0
- package/build/lib/commands/app-management.d.ts +99 -76
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +83 -73
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/certificate.d.ts +14 -19
- package/build/lib/commands/certificate.d.ts.map +1 -1
- package/build/lib/commands/certificate.js +24 -31
- package/build/lib/commands/certificate.js.map +1 -1
- package/build/lib/commands/element.d.ts +83 -67
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +111 -134
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/file-movement.d.ts +31 -42
- package/build/lib/commands/file-movement.d.ts.map +1 -1
- package/build/lib/commands/file-movement.js +146 -205
- package/build/lib/commands/file-movement.js.map +1 -1
- package/build/lib/commands/find.d.ts +20 -12
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +27 -65
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/navigation.d.ts.map +1 -1
- package/build/lib/commands/navigation.js +12 -14
- package/build/lib/commands/navigation.js.map +1 -1
- package/build/lib/commands/performance.d.ts +36 -55
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +93 -86
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +31 -63
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +29 -28
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/build/lib/execute-method-map.js +0 -1
- package/build/lib/execute-method-map.js.map +1 -1
- package/lib/commands/app-management.ts +414 -0
- package/lib/commands/{certificate.js → certificate.ts} +55 -50
- package/lib/commands/element.ts +419 -0
- package/lib/commands/{file-movement.js → file-movement.ts} +212 -235
- package/lib/commands/find.ts +277 -0
- package/lib/commands/navigation.js +20 -14
- package/lib/commands/{performance.js → performance.ts} +133 -114
- package/lib/commands/{recordscreen.js → recordscreen.ts} +78 -50
- package/lib/execute-method-map.ts +0 -1
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
- package/lib/commands/app-management.js +0 -346
- package/lib/commands/element.js +0 -423
- package/lib/commands/find.js +0 -205
|
@@ -25,14 +25,10 @@ const CONTAINER_TYPE_SEPARATOR = ':';
|
|
|
25
25
|
const CONTAINER_DOCUMENTS_PATH = 'Documents';
|
|
26
26
|
const OBJECT_NOT_FOUND_ERROR_MESSAGE = 'OBJECT_NOT_FOUND';
|
|
27
27
|
/**
|
|
28
|
-
* Parses the actual path and the bundle identifier from the given path string
|
|
28
|
+
* Parses the actual path and the bundle identifier from the given path string.
|
|
29
29
|
*
|
|
30
|
-
* @
|
|
31
|
-
* @param
|
|
32
|
-
* match `CONTAINER_PATH_PATTERN` regexp, otherwise an error is going
|
|
33
|
-
* to be thrown. A valid string example: `@bundle.identifier:container_type/relative_path_in_container`
|
|
34
|
-
* @param {import('./types').ContainerRootSupplier|string} [containerRootSupplier] - Container root path supplier function or string value
|
|
35
|
-
* @returns {Promise<import('./types').ContainerObject>}
|
|
30
|
+
* @param remotePath - Path string matching `CONTAINER_PATH_PATTERN`, e.g. `@bundle.id:container/relative/path`
|
|
31
|
+
* @param containerRootSupplier - Container root path supplier or explicit root
|
|
36
32
|
*/
|
|
37
33
|
async function parseContainerPath(remotePath, containerRootSupplier) {
|
|
38
34
|
const match = CONTAINER_PATH_PATTERN.exec(remotePath);
|
|
@@ -41,7 +37,8 @@ async function parseContainerPath(remotePath, containerRootSupplier) {
|
|
|
41
37
|
`starts with '${CONTAINER_PATH_MARKER}' and is separated from the ` +
|
|
42
38
|
`relative path with a single slash. '${remotePath}' is given instead`);
|
|
43
39
|
}
|
|
44
|
-
|
|
40
|
+
const [, bundleIdMatch, relativePath] = match;
|
|
41
|
+
let bundleId = bundleIdMatch;
|
|
45
42
|
let containerType = null;
|
|
46
43
|
const typeSeparatorPos = bundleId.indexOf(CONTAINER_TYPE_SEPARATOR);
|
|
47
44
|
// We only consider container type exists if its length is greater than zero
|
|
@@ -63,11 +60,126 @@ async function parseContainerPath(remotePath, containerRootSupplier) {
|
|
|
63
60
|
return { bundleId, pathInContainer, containerType };
|
|
64
61
|
}
|
|
65
62
|
/**
|
|
63
|
+
* Pushes the given data to a file on the remote device.
|
|
64
|
+
*
|
|
65
|
+
* @param remotePath The full path to the remote file or
|
|
66
|
+
* a file inside a package bundle. Check the documentation on
|
|
67
|
+
* `pushFileToRealDevice` and `pushFileToSimulator` for more information
|
|
68
|
+
* on acceptable values.
|
|
69
|
+
* @param base64Data Base64 encoded data to be written to the
|
|
70
|
+
* remote file. The remote file will be silently overridden if it already exists.
|
|
71
|
+
* @throws {Error} If there was an error while pushing the data
|
|
72
|
+
*/
|
|
73
|
+
async function pushFile(remotePath, base64Data) {
|
|
74
|
+
if (remotePath.endsWith('/')) {
|
|
75
|
+
throw new driver_1.errors.InvalidArgumentError(`It is expected that remote path points to a file and not to a folder. ` +
|
|
76
|
+
`'${remotePath}' is given instead`);
|
|
77
|
+
}
|
|
78
|
+
let b64StringData;
|
|
79
|
+
if (lodash_1.default.isArray(base64Data)) {
|
|
80
|
+
// some clients (ahem) java, send a byte array encoding utf8 characters
|
|
81
|
+
// instead of a string, which would be infinitely better!
|
|
82
|
+
b64StringData = Buffer.from(base64Data).toString('utf8');
|
|
83
|
+
}
|
|
84
|
+
else if (Buffer.isBuffer(base64Data)) {
|
|
85
|
+
b64StringData = base64Data.toString('utf8');
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
b64StringData = base64Data;
|
|
89
|
+
}
|
|
90
|
+
return this.isSimulator()
|
|
91
|
+
? await pushFileToSimulator.bind(this)(remotePath, b64StringData)
|
|
92
|
+
: await pushFileToRealDevice.bind(this)(remotePath, b64StringData);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Pushes the given data to a file on the remote device.
|
|
96
|
+
*
|
|
97
|
+
* @param remotePath - The full path to the remote file
|
|
98
|
+
* or a specially formatted path, which points to an item inside an app bundle.
|
|
99
|
+
* @param payload - Base64-encoded content of the file to be pushed.
|
|
100
|
+
*/
|
|
101
|
+
async function mobilePushFile(remotePath, payload) {
|
|
102
|
+
return await this.pushFile(remotePath, payload);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Pulls a remote file from the device.
|
|
106
|
+
*
|
|
107
|
+
* @param remotePath The full path to the remote file
|
|
108
|
+
* or a specially formatted path, which points to an item inside app bundle.
|
|
109
|
+
* See the documentation for `pullFromRealDevice` and `pullFromSimulator`
|
|
110
|
+
* to get more information on acceptable values.
|
|
111
|
+
* @returns Base64 encoded content of the pulled file
|
|
112
|
+
* @throws {Error} If the pull operation failed
|
|
113
|
+
*/
|
|
114
|
+
async function pullFile(remotePath) {
|
|
115
|
+
if (remotePath.endsWith('/')) {
|
|
116
|
+
throw new driver_1.errors.InvalidArgumentError(`It is expected that remote path points to a file and not to a folder. ` +
|
|
117
|
+
`'${remotePath}' is given instead`);
|
|
118
|
+
}
|
|
119
|
+
return this.isSimulator()
|
|
120
|
+
? await pullFromSimulator.bind(this)(remotePath, true)
|
|
121
|
+
: await pullFromRealDevice.bind(this)(remotePath, true);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Pulls a remote file from the device.
|
|
125
|
+
*
|
|
126
|
+
* @param remotePath - The full path to the remote file
|
|
127
|
+
* or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
|
|
128
|
+
* @returns The same as in `pullFile`
|
|
129
|
+
*/
|
|
130
|
+
async function mobilePullFile(remotePath) {
|
|
131
|
+
return await this.pullFile(remotePath);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Delete a remote folder from the device.
|
|
135
|
+
*
|
|
136
|
+
* @param remotePath - The full path to the remote folder or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
|
|
137
|
+
* @returns Nothing
|
|
138
|
+
*/
|
|
139
|
+
async function mobileDeleteFolder(remotePath) {
|
|
140
|
+
if (!remotePath.endsWith('/')) {
|
|
141
|
+
remotePath = `${remotePath}/`;
|
|
142
|
+
}
|
|
143
|
+
await deleteFileOrFolder.bind(this)(remotePath);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Delete a remote file from the device.
|
|
66
147
|
*
|
|
67
|
-
* @param
|
|
68
|
-
* @
|
|
69
|
-
|
|
148
|
+
* @param remotePath - The full path to the remote file or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
|
|
149
|
+
* @returns Nothing
|
|
150
|
+
*/
|
|
151
|
+
async function mobileDeleteFile(remotePath) {
|
|
152
|
+
if (remotePath.endsWith('/')) {
|
|
153
|
+
throw new driver_1.errors.InvalidArgumentError(`It is expected that remote path points to a file and not to a folder. ` +
|
|
154
|
+
`'${remotePath}' is given instead`);
|
|
155
|
+
}
|
|
156
|
+
await deleteFileOrFolder.bind(this)(remotePath);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Pulls the whole folder from the remote device
|
|
160
|
+
*
|
|
161
|
+
* @param remotePath The full path to a folder on the
|
|
162
|
+
* remote device or a folder inside an application bundle
|
|
163
|
+
* @returns Zipped and base64-encoded content of the folder
|
|
164
|
+
* @throws {Error} If there was a failure while getting the folder content
|
|
70
165
|
*/
|
|
166
|
+
async function pullFolder(remotePath) {
|
|
167
|
+
if (!remotePath.endsWith('/')) {
|
|
168
|
+
remotePath = `${remotePath}/`;
|
|
169
|
+
}
|
|
170
|
+
return this.isSimulator()
|
|
171
|
+
? await pullFromSimulator.bind(this)(remotePath, false)
|
|
172
|
+
: await pullFromRealDevice.bind(this)(remotePath, false);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Pulls the whole folder from the device under test.
|
|
176
|
+
*
|
|
177
|
+
* @param remotePath - The full path to the remote folder
|
|
178
|
+
* @returns The same as `pullFolder`
|
|
179
|
+
*/
|
|
180
|
+
async function mobilePullFolder(remotePath) {
|
|
181
|
+
return await this.pullFolder(remotePath);
|
|
182
|
+
}
|
|
71
183
|
function verifyIsSubPath(originalPath, root) {
|
|
72
184
|
const normalizedRoot = path_1.default.normalize(root);
|
|
73
185
|
const normalizedPath = path_1.default.normalize(path_1.default.dirname(originalPath));
|
|
@@ -76,13 +188,6 @@ function verifyIsSubPath(originalPath, root) {
|
|
|
76
188
|
throw new Error(`'${normalizedPath}' is expected to be a subpath of '${normalizedRoot}'`);
|
|
77
189
|
}
|
|
78
190
|
}
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @this {XCUITestDriver}
|
|
82
|
-
* @param {string} [bundleId]
|
|
83
|
-
* @param {string} [containerType]
|
|
84
|
-
* @returns {Promise<any>}
|
|
85
|
-
*/
|
|
86
191
|
async function createAfcClient(bundleId, containerType) {
|
|
87
192
|
const udid = this.device.udid;
|
|
88
193
|
if (!bundleId) {
|
|
@@ -97,20 +202,9 @@ async function createAfcClient(bundleId, containerType) {
|
|
|
97
202
|
? await service.vendDocuments(bundleId)
|
|
98
203
|
: await service.vendContainer(bundleId);
|
|
99
204
|
}
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* @param {string} [containerType]
|
|
103
|
-
* @returns {boolean}
|
|
104
|
-
*/
|
|
105
205
|
function isDocumentsContainer(containerType) {
|
|
106
|
-
return lodash_1.default.toLower(containerType) === lodash_1.default.toLower(CONTAINER_DOCUMENTS_PATH);
|
|
206
|
+
return lodash_1.default.toLower(containerType ?? '') === lodash_1.default.toLower(CONTAINER_DOCUMENTS_PATH);
|
|
107
207
|
}
|
|
108
|
-
/**
|
|
109
|
-
*
|
|
110
|
-
* @this {XCUITestDriver}
|
|
111
|
-
* @param {string} remotePath
|
|
112
|
-
* @returns {Promise<{service: any, relativePath: string}>}
|
|
113
|
-
*/
|
|
114
208
|
async function createService(remotePath) {
|
|
115
209
|
if (CONTAINER_PATH_PATTERN.test(remotePath)) {
|
|
116
210
|
const { bundleId, pathInContainer, containerType } = await parseContainerPath.bind(this)(remotePath);
|
|
@@ -128,22 +222,14 @@ async function createService(remotePath) {
|
|
|
128
222
|
/**
|
|
129
223
|
* Save the given base64 data chunk as a binary file on the Simulator under test.
|
|
130
224
|
*
|
|
131
|
-
* @
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* '@com.myapp.bla:data/RelativePathInContainer/111.png'. The '@' character at the
|
|
136
|
-
* beginning of the argument is mandatory in such case. The colon at the end of bundle identifier
|
|
137
|
-
* is optional and is used to distinguish the container type.
|
|
138
|
-
* Possible values there are 'app', 'data', 'groups', '<A specific App Group container>'.
|
|
139
|
-
* The default value is 'app'.
|
|
140
|
-
* The relative folder path is ignored if the file is going to be uploaded
|
|
141
|
-
* to the default media folder and only the file name is considered important.
|
|
142
|
-
* @param {string} base64Data - Base-64 encoded content of the file to be uploaded.
|
|
225
|
+
* @param remotePath - Remote path on the simulator. Supports bundle-id-prefixed format
|
|
226
|
+
* (e.g. `@com.myapp.bla:data/path/in/container/file.png`) to target
|
|
227
|
+
* application containers; otherwise uploads to the default media folder.
|
|
228
|
+
* @param base64Data - Base-64 encoded content of the file to be uploaded.
|
|
143
229
|
*/
|
|
144
230
|
async function pushFileToSimulator(remotePath, base64Data) {
|
|
145
231
|
const buffer = Buffer.from(base64Data, 'base64');
|
|
146
|
-
const device =
|
|
232
|
+
const device = this.device;
|
|
147
233
|
if (CONTAINER_PATH_PATTERN.test(remotePath)) {
|
|
148
234
|
const { bundleId, pathInContainer: dstPath } = await parseContainerPath.bind(this)(remotePath, async (appBundle, containerType) => await device.simctl.getAppContainer(appBundle, containerType));
|
|
149
235
|
this.log.info(`Parsed bundle identifier '${bundleId}' from '${remotePath}'. ` +
|
|
@@ -166,22 +252,12 @@ async function pushFileToSimulator(remotePath, base64Data) {
|
|
|
166
252
|
}
|
|
167
253
|
}
|
|
168
254
|
/**
|
|
169
|
-
* Save the given base64 data chunk as a binary file on
|
|
255
|
+
* Save the given base64 data chunk as a binary file on a real device.
|
|
170
256
|
*
|
|
171
|
-
* @
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* `@<app_bundle_id>:<optional_container_type>/<path_to_the_file_or_folder_inside_container>`
|
|
176
|
-
* format to pull a file or a folder from an application container of the given type.
|
|
177
|
-
* The only supported container type is 'documents'. If the container type is not set
|
|
178
|
-
* explicitly for a bundle id, then the default application container is going to be mounted
|
|
179
|
-
* (aka --container ifuse argument)
|
|
180
|
-
* e.g. If `@com.myapp.bla:documents/111.png` is provided,
|
|
181
|
-
* `On My iPhone/<app name>` in Files app will be mounted in the host machine.
|
|
182
|
-
* Base64 encoded `111.png` will be pushed into `On My iPhone/<app name>/111.png`
|
|
183
|
-
* as base64 decoded data.
|
|
184
|
-
* @param {string} base64Data - Base-64 encoded content of the file to be uploaded.
|
|
257
|
+
* @param remotePath - Remote path on the device. Supports the same bundle-id-prefixed
|
|
258
|
+
* format as simulator uploads (e.g. `@com.myapp.bla:documents/file.png`)
|
|
259
|
+
* to target application containers; otherwise defaults to media folder.
|
|
260
|
+
* @param base64Data - Base-64 encoded content of the file to be uploaded.
|
|
185
261
|
*/
|
|
186
262
|
async function pushFileToRealDevice(remotePath, base64Data) {
|
|
187
263
|
const { service, relativePath } = await createService.bind(this)(remotePath);
|
|
@@ -196,12 +272,6 @@ async function pushFileToRealDevice(remotePath, base64Data) {
|
|
|
196
272
|
service.close();
|
|
197
273
|
}
|
|
198
274
|
}
|
|
199
|
-
/**
|
|
200
|
-
*
|
|
201
|
-
* @this {XCUITestDriver}
|
|
202
|
-
* @param {string} remotePath
|
|
203
|
-
* @returns {Promise<void>}
|
|
204
|
-
*/
|
|
205
275
|
async function deleteFileOrFolder(remotePath) {
|
|
206
276
|
return this.isSimulator()
|
|
207
277
|
? await deleteFromSimulator.bind(this)(remotePath)
|
|
@@ -211,19 +281,18 @@ async function deleteFileOrFolder(remotePath) {
|
|
|
211
281
|
* Get the content of given file or folder from iOS Simulator and return it as base-64 encoded string.
|
|
212
282
|
* Folder content is recursively packed into a zip archive.
|
|
213
283
|
*
|
|
214
|
-
* @
|
|
215
|
-
* @param {string} remotePath - The path to a file or a folder, which exists in the corresponding application
|
|
284
|
+
* @param remotePath - The path to a file or a folder, which exists in the corresponding application
|
|
216
285
|
* container on Simulator. Use
|
|
217
286
|
* `@<app_bundle_id>:<optional_container_type>/<path_to_the_file_or_folder_inside_container>`
|
|
218
287
|
* format to pull a file or a folder from an application container of the given type.
|
|
219
288
|
* Possible container types are `app`, `data`, `groups`, `<A specific App Group container>`.
|
|
220
289
|
* The default type is `app`.
|
|
221
|
-
* @param
|
|
222
|
-
* @returns
|
|
290
|
+
* @param isFile - Whether the destination item is a file or a folder
|
|
291
|
+
* @returns Base-64 encoded content of the file.
|
|
223
292
|
*/
|
|
224
293
|
async function pullFromSimulator(remotePath, isFile) {
|
|
225
294
|
let pathOnServer;
|
|
226
|
-
const device =
|
|
295
|
+
const device = this.device;
|
|
227
296
|
if (CONTAINER_PATH_PATTERN.test(remotePath)) {
|
|
228
297
|
const { bundleId, pathInContainer: dstPath } = await parseContainerPath.bind(this)(remotePath, async (appBundle, containerType) => await device.simctl.getAppContainer(appBundle, containerType));
|
|
229
298
|
this.log.info(`Parsed bundle identifier '${bundleId}' from '${remotePath}'. ` +
|
|
@@ -248,8 +317,7 @@ async function pullFromSimulator(remotePath, isFile) {
|
|
|
248
317
|
* Get the content of given file or folder from the real device under test and return it as base-64 encoded string.
|
|
249
318
|
* Folder content is recursively packed into a zip archive.
|
|
250
319
|
*
|
|
251
|
-
* @
|
|
252
|
-
* @param {string} remotePath - The path to an existing remote file on the device. This variable can be prefixed with
|
|
320
|
+
* @param remotePath - The path to an existing remote file on the device. This variable can be prefixed with
|
|
253
321
|
* bundle id, so then the file will be downloaded from the corresponding
|
|
254
322
|
* application container instead of the default media folder. Use
|
|
255
323
|
* `@<app_bundle_id>:<optional_container_type>/<path_to_the_file_or_folder_inside_container>`
|
|
@@ -262,8 +330,8 @@ async function pullFromSimulator(remotePath, isFile) {
|
|
|
262
330
|
* `On My iPhone/<app name>/111.png` will be pulled into the mounted host machine
|
|
263
331
|
* and Appium returns the data as base64-encoded string to client.
|
|
264
332
|
* `@com.myapp.bla:documents/` means `On My iPhone/<app name>`.
|
|
265
|
-
* @param
|
|
266
|
-
* @returns
|
|
333
|
+
* @param isFile - Whether the destination item is a file or a folder
|
|
334
|
+
* @returns Base-64 encoded content of the remote file
|
|
267
335
|
*/
|
|
268
336
|
async function pullFromRealDevice(remotePath, isFile) {
|
|
269
337
|
const { service, relativePath } = await createService.bind(this)(remotePath);
|
|
@@ -286,18 +354,17 @@ async function pullFromRealDevice(remotePath, isFile) {
|
|
|
286
354
|
/**
|
|
287
355
|
* Remove the file or folder from the device
|
|
288
356
|
*
|
|
289
|
-
* @
|
|
290
|
-
* @param {string} remotePath - The path to a file or a folder, which exists in the corresponding application
|
|
357
|
+
* @param remotePath - The path to a file or a folder, which exists in the corresponding application
|
|
291
358
|
* container on Simulator. Use
|
|
292
359
|
* `@<app_bundle_id>:<optional_container_type>/<path_to_the_file_or_folder_inside_container>`
|
|
293
360
|
* format to pull a file or a folder from an application container of the given type.
|
|
294
361
|
* Possible container types are 'app', 'data', 'groups', '<A specific App Group container>'.
|
|
295
362
|
* The default type is 'app'.
|
|
296
|
-
* @returns
|
|
363
|
+
* @returns Nothing
|
|
297
364
|
*/
|
|
298
365
|
async function deleteFromSimulator(remotePath) {
|
|
299
366
|
let pathOnServer;
|
|
300
|
-
const device =
|
|
367
|
+
const device = this.device;
|
|
301
368
|
if (CONTAINER_PATH_PATTERN.test(remotePath)) {
|
|
302
369
|
const { bundleId, pathInContainer: dstPath } = await parseContainerPath.bind(this)(remotePath, async (appBundle, containerType) => await device.simctl.getAppContainer(appBundle, containerType));
|
|
303
370
|
this.log.info(`Parsed bundle identifier '${bundleId}' from '${remotePath}'. ` +
|
|
@@ -318,8 +385,7 @@ async function deleteFromSimulator(remotePath) {
|
|
|
318
385
|
/**
|
|
319
386
|
* Remove the file or folder from the device
|
|
320
387
|
*
|
|
321
|
-
* @
|
|
322
|
-
* @param {string} remotePath - The path to an existing remote file on the device. This variable can be prefixed with
|
|
388
|
+
* @param remotePath - The path to an existing remote file on the device. This variable can be prefixed with
|
|
323
389
|
* bundle id, so then the file will be downloaded from the corresponding
|
|
324
390
|
* application container instead of the default media folder. Use
|
|
325
391
|
* `@<app_bundle_id>:<optional_container_type>/<path_to_the_file_or_folder_inside_container>`
|
|
@@ -332,7 +398,7 @@ async function deleteFromSimulator(remotePath) {
|
|
|
332
398
|
* `On My iPhone/<app name>/111.png` will be pulled into the mounted host machine
|
|
333
399
|
* and Appium returns the data as base64-encoded string to client.
|
|
334
400
|
* `@com.myapp.bla:documents/` means `On My iPhone/<app name>`.
|
|
335
|
-
* @returns
|
|
401
|
+
* @returns Nothing
|
|
336
402
|
*/
|
|
337
403
|
async function deleteFromRealDevice(remotePath) {
|
|
338
404
|
const { service, relativePath } = await createService.bind(this)(remotePath);
|
|
@@ -349,129 +415,4 @@ async function deleteFromRealDevice(remotePath) {
|
|
|
349
415
|
service.close();
|
|
350
416
|
}
|
|
351
417
|
}
|
|
352
|
-
/**
|
|
353
|
-
* Pushes the given data to a file on the remote device
|
|
354
|
-
*
|
|
355
|
-
* @param {string} remotePath The full path to the remote file or
|
|
356
|
-
* a file inside a package bundle. Check the documentation on
|
|
357
|
-
* `pushFileToRealDevice` and `pushFileToSimulator` for more information
|
|
358
|
-
* on acceptable values.
|
|
359
|
-
* @param {string} base64Data Base64 encoded data to be written to the
|
|
360
|
-
* remote file. The remote file will be silently overridden if it already exists.
|
|
361
|
-
* @throws {Error} If there was an error while pushing the data
|
|
362
|
-
* @this {XCUITestDriver}
|
|
363
|
-
*/
|
|
364
|
-
async function pushFile(remotePath, base64Data) {
|
|
365
|
-
if (remotePath.endsWith('/')) {
|
|
366
|
-
throw new driver_1.errors.InvalidArgumentError(`It is expected that remote path points to a file and not to a folder. ` +
|
|
367
|
-
`'${remotePath}' is given instead`);
|
|
368
|
-
}
|
|
369
|
-
if (lodash_1.default.isArray(base64Data)) {
|
|
370
|
-
// some clients (ahem) java, send a byte array encoding utf8 characters
|
|
371
|
-
// instead of a string, which would be infinitely better!
|
|
372
|
-
base64Data = Buffer.from(base64Data).toString('utf8');
|
|
373
|
-
}
|
|
374
|
-
return this.isSimulator()
|
|
375
|
-
? await pushFileToSimulator.bind(this)(remotePath, base64Data)
|
|
376
|
-
: await pushFileToRealDevice.bind(this)(remotePath, base64Data);
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Pushes the given data to a file on the remote device.
|
|
380
|
-
*
|
|
381
|
-
* @param {string} remotePath - The full path to the remote file
|
|
382
|
-
* or a specially formatted path, which points to an item inside an app bundle.
|
|
383
|
-
* @param {string} payload - Base64-encoded content of the file to be pushed.
|
|
384
|
-
* @this {XCUITestDriver}
|
|
385
|
-
*/
|
|
386
|
-
async function mobilePushFile(remotePath, payload) {
|
|
387
|
-
return await this.pushFile(remotePath, payload);
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Pulls a remote file from the device.
|
|
391
|
-
*
|
|
392
|
-
* @param {string} remotePath The full path to the remote file
|
|
393
|
-
* or a specially formatted path, which points to an item inside app bundle.
|
|
394
|
-
* See the documentation for `pullFromRealDevice` and `pullFromSimulator`
|
|
395
|
-
* to get more information on acceptable values.
|
|
396
|
-
* @returns {Promise<string>} Base64 encoded content of the pulled file
|
|
397
|
-
* @throws {Error} If the pull operation failed
|
|
398
|
-
* @this {XCUITestDriver}
|
|
399
|
-
*/
|
|
400
|
-
async function pullFile(remotePath) {
|
|
401
|
-
if (remotePath.endsWith('/')) {
|
|
402
|
-
throw new driver_1.errors.InvalidArgumentError(`It is expected that remote path points to a file and not to a folder. ` +
|
|
403
|
-
`'${remotePath}' is given instead`);
|
|
404
|
-
}
|
|
405
|
-
return this.isSimulator()
|
|
406
|
-
? await pullFromSimulator.bind(this)(remotePath, true)
|
|
407
|
-
: await pullFromRealDevice.bind(this)(remotePath, true);
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Pulls a remote file from the device.
|
|
411
|
-
*
|
|
412
|
-
* @param {string} remotePath - The full path to the remote file
|
|
413
|
-
* or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
|
|
414
|
-
* @returns {Promise<string>} The same as in `pullFile`
|
|
415
|
-
* @this {XCUITestDriver}
|
|
416
|
-
*/
|
|
417
|
-
async function mobilePullFile(remotePath) {
|
|
418
|
-
return await this.pullFile(remotePath);
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Delete a remote folder from the device.
|
|
422
|
-
*
|
|
423
|
-
* @param {string} remotePath - The full path to the remote folder or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
|
|
424
|
-
* @this {XCUITestDriver}
|
|
425
|
-
* @returns {Promise<void>}
|
|
426
|
-
*/
|
|
427
|
-
async function mobileDeleteFolder(remotePath) {
|
|
428
|
-
if (!remotePath.endsWith('/')) {
|
|
429
|
-
remotePath = `${remotePath}/`;
|
|
430
|
-
}
|
|
431
|
-
await deleteFileOrFolder.bind(this)(remotePath);
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* Delete a remote file from the device.
|
|
435
|
-
*
|
|
436
|
-
* @param {string} remotePath - The full path to the remote file or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
|
|
437
|
-
* @this {XCUITestDriver}
|
|
438
|
-
* @returns {Promise<void>}
|
|
439
|
-
*/
|
|
440
|
-
async function mobileDeleteFile(remotePath) {
|
|
441
|
-
if (remotePath.endsWith('/')) {
|
|
442
|
-
throw new driver_1.errors.InvalidArgumentError(`It is expected that remote path points to a file and not to a folder. ` +
|
|
443
|
-
`'${remotePath}' is given instead`);
|
|
444
|
-
}
|
|
445
|
-
await deleteFileOrFolder.bind(this)(remotePath);
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* Pulls the whole folder from the remote device
|
|
449
|
-
*
|
|
450
|
-
* @param {string} remotePath The full path to a folder on the
|
|
451
|
-
* remote device or a folder inside an application bundle
|
|
452
|
-
* @returns {Promise<string>} Zipped and base64-encoded content of the folder
|
|
453
|
-
* @throws {Error} If there was a failure while getting the folder content
|
|
454
|
-
* @this {XCUITestDriver}
|
|
455
|
-
*/
|
|
456
|
-
async function pullFolder(remotePath) {
|
|
457
|
-
if (!remotePath.endsWith('/')) {
|
|
458
|
-
remotePath = `${remotePath}/`;
|
|
459
|
-
}
|
|
460
|
-
return this.isSimulator()
|
|
461
|
-
? await pullFromSimulator.bind(this)(remotePath, false)
|
|
462
|
-
: await pullFromRealDevice.bind(this)(remotePath, false);
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Pulls the whole folder from the device under test.
|
|
466
|
-
*
|
|
467
|
-
* @param {string} remotePath - The full path to the remote folder
|
|
468
|
-
* @returns {Promise<string>} The same as `pullFolder`
|
|
469
|
-
* @this {XCUITestDriver}
|
|
470
|
-
*/
|
|
471
|
-
async function mobilePullFolder(remotePath) {
|
|
472
|
-
return await this.pullFolder(remotePath);
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
476
|
-
*/
|
|
477
418
|
//# sourceMappingURL=file-movement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-movement.js","sourceRoot":"","sources":["../../../lib/commands/file-movement.js"],"names":[],"mappings":";;;;;AA4BA,gDA6BC;AA0UD,4BAeC;AA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**
|
|
2
|
-
*
|
|
4
|
+
* Finds elements, delegating to web or native based on context.
|
|
3
5
|
*/
|
|
4
|
-
export function findElOrEls(this:
|
|
6
|
+
export declare function findElOrEls(this: XCUITestDriver, strategy: string, selector: string, mult: true, context?: any): Promise<Element[]>;
|
|
7
|
+
export declare function findElOrEls(this: XCUITestDriver, strategy: string, selector: string, mult: false, context?: any): Promise<Element>;
|
|
8
|
+
export declare function findElOrEls(this: XCUITestDriver, strategy: string, selector: string, mult: boolean, context?: any): Promise<Element | Element[]>;
|
|
9
|
+
export declare function findElOrEls(this: XCUITestDriver, strategy: string, selector: string, mult: boolean, context?: any): Promise<Element | Element[]>;
|
|
5
10
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @privateRemarks I'm not sure what these objects are; they aren't `Element`.
|
|
8
|
-
* @returns {Promise<any|any[]|undefined>}
|
|
11
|
+
* Finds elements natively with strategy/selector rewriting for WDA.
|
|
9
12
|
*/
|
|
10
|
-
export function findNativeElementOrElements(this:
|
|
13
|
+
export declare function findNativeElementOrElements(this: XCUITestDriver, strategy: string, selector: string, mult: true, context?: any): Promise<Element[]>;
|
|
14
|
+
export declare function findNativeElementOrElements(this: XCUITestDriver, strategy: string, selector: string, mult: false, context?: any): Promise<Element>;
|
|
15
|
+
export declare function findNativeElementOrElements(this: XCUITestDriver, strategy: string, selector: string, mult: boolean, context?: any): Promise<Element | Element[]>;
|
|
11
16
|
/**
|
|
12
|
-
*
|
|
17
|
+
* Finds elements natively and returns either a single element or an array depending on `mult`.
|
|
18
|
+
*
|
|
19
|
+
* Returns an array when `mult` is true; otherwise returns a single element.
|
|
13
20
|
*/
|
|
14
|
-
export function doNativeFind(this:
|
|
21
|
+
export declare function doNativeFind(this: XCUITestDriver, strategy: string, selector: string, mult: true, context?: any): Promise<Element[]>;
|
|
22
|
+
export declare function doNativeFind(this: XCUITestDriver, strategy: string, selector: string, mult: false, context?: any): Promise<Element>;
|
|
23
|
+
export declare function doNativeFind(this: XCUITestDriver, strategy: string, selector: string, mult: boolean, context?: any): Promise<Element | Element[]>;
|
|
24
|
+
export declare function doNativeFind(this: XCUITestDriver, strategy: string, selector: string, mult: boolean, context?: any): Promise<Element | Element[]>;
|
|
15
25
|
/**
|
|
16
|
-
*
|
|
26
|
+
* Finds the first visible child element inside a context.
|
|
17
27
|
*/
|
|
18
|
-
export function getFirstVisibleChild(this:
|
|
19
|
-
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
20
|
-
export type Element = import("@appium/types").Element;
|
|
28
|
+
export declare function getFirstVisibleChild(this: XCUITestDriver, mult: boolean, context: Element | string | null): Promise<Element>;
|
|
21
29
|
//# sourceMappingURL=find.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../lib/commands/find.
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../lib/commands/find.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,OAAO,EAAe,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAG9C;;GAEG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,GAAG,GACZ,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;AACtB,wBAAsB,WAAW,CAC/B,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,KAAK,EACX,OAAO,CAAC,EAAE,GAAG,GACZ,OAAO,CAAC,OAAO,CAAC,CAAC;AACpB,wBAAsB,WAAW,CAC/B,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,GAAG,GAC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