@limrun/appium-xcuitest-driver 10.11.0-lim.3 → 10.14.6-lim.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/CHANGELOG.md +94 -0
- package/build/lib/commands/active-app-info.d.ts +4 -3
- package/build/lib/commands/active-app-info.d.ts.map +1 -1
- package/build/lib/commands/active-app-info.js +2 -3
- package/build/lib/commands/active-app-info.js.map +1 -1
- package/build/lib/commands/alert.d.ts +26 -31
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +20 -29
- package/build/lib/commands/alert.js.map +1 -1
- 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/app-strings.d.ts +6 -7
- package/build/lib/commands/app-strings.d.ts.map +1 -1
- package/build/lib/commands/app-strings.js +3 -8
- package/build/lib/commands/app-strings.js.map +1 -1
- package/build/lib/commands/appearance.d.ts +7 -9
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +13 -19
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/audit.d.ts +5 -33
- package/build/lib/commands/audit.d.ts.map +1 -1
- package/build/lib/commands/audit.js +3 -16
- package/build/lib/commands/audit.js.map +1 -1
- package/build/lib/commands/battery.d.ts +4 -4
- package/build/lib/commands/battery.d.ts.map +1 -1
- package/build/lib/commands/battery.js +3 -7
- package/build/lib/commands/battery.js.map +1 -1
- package/build/lib/commands/biometric.d.ts +12 -14
- package/build/lib/commands/biometric.d.ts.map +1 -1
- package/build/lib/commands/biometric.js +10 -19
- package/build/lib/commands/biometric.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/clipboard.d.ts +9 -11
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +8 -13
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/condition.d.ts +9 -72
- package/build/lib/commands/condition.d.ts.map +1 -1
- package/build/lib/commands/condition.js +5 -66
- package/build/lib/commands/condition.js.map +1 -1
- package/build/lib/commands/content-size.d.ts +16 -19
- package/build/lib/commands/content-size.d.ts.map +1 -1
- package/build/lib/commands/content-size.js +14 -22
- package/build/lib/commands/content-size.js.map +1 -1
- package/build/lib/commands/context.d.ts +130 -161
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +123 -108
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/device-info.d.ts +13 -0
- package/build/lib/commands/device-info.d.ts.map +1 -0
- package/build/lib/commands/device-info.js +20 -0
- package/build/lib/commands/device-info.js.map +1 -0
- 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/execute.d.ts +10 -22
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +13 -29
- package/build/lib/commands/execute.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/general.d.ts +84 -80
- package/build/lib/commands/general.d.ts.map +1 -1
- package/build/lib/commands/general.js +67 -54
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +16 -36
- package/build/lib/commands/geolocation.d.ts.map +1 -1
- package/build/lib/commands/geolocation.js +8 -25
- package/build/lib/commands/geolocation.js.map +1 -1
- package/build/lib/commands/gesture.d.ts +103 -119
- package/build/lib/commands/gesture.d.ts.map +1 -1
- package/build/lib/commands/gesture.js +98 -138
- package/build/lib/commands/gesture.js.map +1 -1
- package/build/lib/commands/increase-contrast.d.ts +10 -13
- package/build/lib/commands/increase-contrast.d.ts.map +1 -1
- package/build/lib/commands/increase-contrast.js +8 -16
- package/build/lib/commands/increase-contrast.js.map +1 -1
- package/build/lib/commands/iohid.d.ts +6 -1359
- package/build/lib/commands/iohid.d.ts.map +1 -1
- package/build/lib/commands/iohid.js +5 -10
- package/build/lib/commands/iohid.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +16 -13
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +14 -18
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/keychains.d.ts +2 -2
- package/build/lib/commands/keychains.d.ts.map +1 -1
- package/build/lib/commands/keychains.js +1 -4
- package/build/lib/commands/keychains.js.map +1 -1
- package/build/lib/commands/localization.d.ts +7 -6
- package/build/lib/commands/localization.d.ts.map +1 -1
- package/build/lib/commands/localization.js +7 -8
- package/build/lib/commands/localization.js.map +1 -1
- package/build/lib/commands/location.d.ts +8 -11
- package/build/lib/commands/location.d.ts.map +1 -1
- package/build/lib/commands/location.js +7 -15
- package/build/lib/commands/location.js.map +1 -1
- package/build/lib/commands/lock.d.ts +6 -10
- package/build/lib/commands/lock.d.ts.map +1 -1
- package/build/lib/commands/lock.js +3 -10
- package/build/lib/commands/lock.js.map +1 -1
- package/build/lib/commands/log.d.ts +42 -44
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +32 -53
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/memory.d.ts +4 -5
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +3 -8
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/navigation.d.ts +14 -26
- package/build/lib/commands/navigation.d.ts.map +1 -1
- package/build/lib/commands/navigation.js +22 -32
- package/build/lib/commands/navigation.js.map +1 -1
- package/build/lib/commands/notifications.d.ts +10 -10
- package/build/lib/commands/notifications.d.ts.map +1 -1
- package/build/lib/commands/notifications.js +8 -12
- package/build/lib/commands/notifications.js.map +1 -1
- package/build/lib/commands/pasteboard.d.ts +9 -10
- package/build/lib/commands/pasteboard.d.ts.map +1 -1
- package/build/lib/commands/pasteboard.js +8 -13
- package/build/lib/commands/pasteboard.js.map +1 -1
- package/build/lib/commands/pcap.d.ts +18 -38
- package/build/lib/commands/pcap.d.ts.map +1 -1
- package/build/lib/commands/pcap.js +9 -14
- package/build/lib/commands/pcap.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/permissions.d.ts +15 -17
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +12 -18
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/proxy-helper.d.ts +11 -11
- package/build/lib/commands/proxy-helper.d.ts.map +1 -1
- package/build/lib/commands/proxy-helper.js +15 -24
- package/build/lib/commands/proxy-helper.js.map +1 -1
- package/build/lib/commands/record-audio.d.ts +25 -52
- package/build/lib/commands/record-audio.d.ts.map +1 -1
- package/build/lib/commands/record-audio.js +17 -19
- package/build/lib/commands/record-audio.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +31 -62
- 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/commands/screenshots.d.ts +15 -9
- package/build/lib/commands/screenshots.d.ts.map +1 -1
- package/build/lib/commands/screenshots.js +16 -16
- package/build/lib/commands/screenshots.js.map +1 -1
- package/build/lib/commands/simctl.d.ts +16 -22
- package/build/lib/commands/simctl.d.ts.map +1 -1
- package/build/lib/commands/simctl.js +13 -17
- package/build/lib/commands/simctl.js.map +1 -1
- package/build/lib/commands/source.d.ts +10 -8
- package/build/lib/commands/source.d.ts.map +1 -1
- package/build/lib/commands/source.js +11 -14
- package/build/lib/commands/source.js.map +1 -1
- package/build/lib/commands/timeouts.d.ts +25 -32
- package/build/lib/commands/timeouts.d.ts.map +1 -1
- package/build/lib/commands/timeouts.js +19 -15
- package/build/lib/commands/timeouts.js.map +1 -1
- package/build/lib/commands/types.d.ts +80 -0
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/commands/web.d.ts +199 -202
- package/build/lib/commands/web.d.ts.map +1 -1
- package/build/lib/commands/web.js +216 -175
- package/build/lib/commands/web.js.map +1 -1
- package/build/lib/commands/xctest-record-screen.d.ts +17 -47
- package/build/lib/commands/xctest-record-screen.d.ts.map +1 -1
- package/build/lib/commands/xctest-record-screen.js +28 -59
- package/build/lib/commands/xctest-record-screen.js.map +1 -1
- package/build/lib/commands/xctest.d.ts +37 -37
- package/build/lib/commands/xctest.d.ts.map +1 -1
- package/build/lib/commands/xctest.js +38 -50
- package/build/lib/commands/xctest.js.map +1 -1
- package/build/lib/desired-caps.js +1 -1
- package/build/lib/device/log/ios-simulator-log.d.ts.map +1 -1
- package/build/lib/device/log/ios-simulator-log.js +2 -0
- package/build/lib/device/log/ios-simulator-log.js.map +1 -1
- package/build/lib/device/simulator-management.d.ts.map +1 -1
- package/build/lib/device/simulator-management.js +4 -5
- package/build/lib/device/simulator-management.js.map +1 -1
- package/build/lib/device-log/ios-crash-log.d.ts +1 -1
- package/build/lib/device-log/ios-crash-log.d.ts.map +1 -1
- package/build/lib/device-log/ios-simulator-log.d.ts +1 -1
- package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -1
- package/build/lib/doctor/optional-checks.d.ts +0 -9
- package/build/lib/doctor/optional-checks.d.ts.map +1 -1
- package/build/lib/doctor/optional-checks.js +1 -30
- package/build/lib/doctor/optional-checks.js.map +1 -1
- package/build/lib/driver.d.ts +11 -3
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +36 -12
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/build/lib/execute-method-map.js +0 -9
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/lib/simulator-management.js +3 -3
- package/build/lib/simulator-management.js.map +1 -1
- package/lib/commands/active-app-info.ts +15 -0
- package/lib/commands/alert.ts +98 -0
- package/lib/commands/app-management.ts +414 -0
- package/lib/commands/{app-strings.js → app-strings.ts} +10 -9
- package/lib/commands/appearance.ts +70 -0
- package/lib/commands/audit.ts +25 -0
- package/lib/commands/{battery.js → battery.ts} +10 -12
- package/lib/commands/biometric.ts +52 -0
- package/lib/commands/{certificate.js → certificate.ts} +55 -50
- package/lib/commands/clipboard.ts +37 -0
- package/lib/commands/{condition.js → condition.ts} +21 -77
- package/lib/commands/content-size.ts +67 -0
- package/lib/commands/{context.js → context.ts} +174 -146
- package/lib/commands/device-info.ts +24 -0
- package/lib/commands/element.ts +419 -0
- package/lib/commands/{execute.js → execute.ts} +42 -38
- package/lib/commands/{file-movement.js → file-movement.ts} +212 -235
- package/lib/commands/find.ts +277 -0
- package/lib/commands/{general.js → general.ts} +102 -77
- package/lib/commands/geolocation.ts +55 -0
- package/lib/commands/{gesture.js → gesture.ts} +225 -183
- package/lib/commands/increase-contrast.ts +49 -0
- package/lib/commands/{iohid.js → iohid.ts} +15 -13
- package/lib/commands/keyboard.ts +70 -0
- package/lib/commands/keychains.ts +16 -0
- package/lib/commands/{localization.js → localization.ts} +22 -12
- package/lib/commands/{location.js → location.ts} +19 -22
- package/lib/commands/lock.ts +43 -0
- package/lib/commands/{log.js → log.ts} +68 -68
- package/lib/commands/{memory.js → memory.ts} +9 -9
- package/lib/commands/{navigation.js → navigation.ts} +42 -39
- package/lib/commands/{notifications.js → notifications.ts} +22 -14
- package/lib/commands/pasteboard.ts +44 -0
- package/lib/commands/{pcap.js → pcap.ts} +28 -28
- package/lib/commands/{performance.js → performance.ts} +133 -114
- package/lib/commands/permissions.ts +90 -0
- package/lib/commands/{proxy-helper.js → proxy-helper.ts} +26 -26
- package/lib/commands/{record-audio.js → record-audio.ts} +35 -33
- package/lib/commands/{recordscreen.js → recordscreen.ts} +78 -50
- package/lib/commands/{screenshots.js → screenshots.ts} +27 -21
- package/lib/commands/simctl.ts +82 -0
- package/lib/commands/{source.js → source.ts} +23 -20
- package/lib/commands/timeouts.ts +95 -0
- package/lib/commands/types.ts +86 -0
- package/lib/commands/{web.js → web.ts} +314 -264
- package/lib/commands/{xctest-record-screen.js → xctest-record-screen.ts} +54 -71
- package/lib/commands/{xctest.js → xctest.ts} +78 -71
- package/lib/desired-caps.ts +1 -1
- package/lib/device/log/ios-simulator-log.ts +2 -0
- package/lib/device/simulator-management.ts +3 -6
- package/lib/doctor/optional-checks.ts +0 -33
- package/lib/driver.ts +38 -13
- package/lib/execute-method-map.ts +0 -9
- package/package.json +6 -5
- package/lib/commands/active-app-info.js +0 -12
- package/lib/commands/alert.js +0 -88
- package/lib/commands/app-management.js +0 -346
- package/lib/commands/appearance.js +0 -71
- package/lib/commands/audit.js +0 -31
- package/lib/commands/biometric.js +0 -52
- package/lib/commands/clipboard.js +0 -35
- package/lib/commands/content-size.js +0 -68
- package/lib/commands/deviceInfo.js +0 -27
- package/lib/commands/element.js +0 -423
- package/lib/commands/find.js +0 -205
- package/lib/commands/geolocation.js +0 -56
- package/lib/commands/increase-contrast.js +0 -50
- package/lib/commands/keyboard.js +0 -62
- package/lib/commands/keychains.js +0 -17
- package/lib/commands/lock.js +0 -46
- package/lib/commands/pasteboard.js +0 -43
- package/lib/commands/permissions.js +0 -85
- package/lib/commands/simctl.js +0 -71
- package/lib/commands/timeouts.js +0 -68
|
@@ -12,7 +12,6 @@ const driver_2 = require("appium/driver");
|
|
|
12
12
|
const support_1 = require("appium/support");
|
|
13
13
|
/**
|
|
14
14
|
* Collect the response of an async script execution
|
|
15
|
-
* @this {XCUITestDriver}
|
|
16
15
|
* @deprecated
|
|
17
16
|
* @privateRemarks It's unclear what this is for. Don't use it.
|
|
18
17
|
*/
|
|
@@ -34,12 +33,9 @@ async function receiveAsyncResponse(status, value) {
|
|
|
34
33
|
return this.asyncPromise.resolve(value);
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
|
-
* @template
|
|
38
|
-
* @
|
|
39
|
-
* @param
|
|
40
|
-
* @param {TArgs} [args]
|
|
41
|
-
* @this {XCUITestDriver}
|
|
42
|
-
* @returns {Promise<TReturn>}
|
|
36
|
+
* @template TReturn
|
|
37
|
+
* @param script - Either a script to run, or in the case of an Execute Method, the name of the script to execute.
|
|
38
|
+
* @param args
|
|
43
39
|
*/
|
|
44
40
|
async function execute(script, args) {
|
|
45
41
|
// TODO: create a type that converts args to the parameters of the associated method using the `command` prop of `executeMethodMap`
|
|
@@ -49,7 +45,7 @@ async function execute(script, args) {
|
|
|
49
45
|
return await this.executeMethod(script, [executeMethodArgs]);
|
|
50
46
|
}
|
|
51
47
|
else if (this.isWebContext()) {
|
|
52
|
-
const atomsArgs = this.convertElementsForAtoms(
|
|
48
|
+
const atomsArgs = this.convertElementsForAtoms(args);
|
|
53
49
|
const result = await this.executeAtom('execute_script', [script, atomsArgs]);
|
|
54
50
|
return this.cacheWebElements(result);
|
|
55
51
|
}
|
|
@@ -58,7 +54,6 @@ async function execute(script, args) {
|
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
/**
|
|
61
|
-
* @this {XCUITestDriver}
|
|
62
57
|
* @group Mobile Web Only
|
|
63
58
|
*/
|
|
64
59
|
async function executeAsync(script, args) {
|
|
@@ -67,20 +62,18 @@ async function executeAsync(script, args) {
|
|
|
67
62
|
}
|
|
68
63
|
args = this.convertElementsForAtoms(args);
|
|
69
64
|
this.asyncWaitMs = this.asyncWaitMs || 0;
|
|
70
|
-
const promise =
|
|
65
|
+
const promise = this.remote.executeAtomAsync('execute_async_script', [script, args, this.asyncWaitMs], this.curWebFrames);
|
|
71
66
|
return this.cacheWebElements(await this.waitForAtom(promise));
|
|
72
67
|
}
|
|
73
68
|
/**
|
|
74
69
|
* Checks if script expects a particular parameter (either optional or required).
|
|
75
|
-
* @template
|
|
76
|
-
* @param
|
|
77
|
-
* @param
|
|
70
|
+
* @template Script
|
|
71
|
+
* @param script - Script name
|
|
72
|
+
* @param param - Parameter name
|
|
78
73
|
* @returns {boolean}
|
|
79
74
|
*/
|
|
80
75
|
function executeMethodExpectsParam(script, param) {
|
|
81
|
-
/** @type {ReadonlyArray<string>|undefined} */
|
|
82
76
|
let required;
|
|
83
|
-
/** @type {ReadonlyArray<string>|undefined} */
|
|
84
77
|
let optional;
|
|
85
78
|
const execMethodDef = driver_1.XCUITestDriver.executeMethodMap[script];
|
|
86
79
|
if ('params' in execMethodDef) {
|
|
@@ -95,7 +88,7 @@ function executeMethodExpectsParam(script, param) {
|
|
|
95
88
|
return allParams.has(param);
|
|
96
89
|
}
|
|
97
90
|
/**
|
|
98
|
-
* @param
|
|
91
|
+
* @param script
|
|
99
92
|
* @returns {script is keyof XCUITestDriver.executeMethodMap}
|
|
100
93
|
*/
|
|
101
94
|
function isExecuteMethod(script) {
|
|
@@ -103,15 +96,14 @@ function isExecuteMethod(script) {
|
|
|
103
96
|
}
|
|
104
97
|
/**
|
|
105
98
|
* Massages the arguments going into an execute method.
|
|
106
|
-
* @param
|
|
107
|
-
* @param
|
|
108
|
-
* @returns {StringRecord<unknown>}
|
|
99
|
+
* @param script
|
|
100
|
+
* @param args
|
|
109
101
|
*/
|
|
110
102
|
function preprocessExecuteMethodArgs(script, args) {
|
|
111
103
|
if (lodash_1.default.isArray(args)) {
|
|
112
104
|
args = lodash_1.default.first(args);
|
|
113
105
|
}
|
|
114
|
-
const executeMethodArgs =
|
|
106
|
+
const executeMethodArgs = (args ?? {});
|
|
115
107
|
/**
|
|
116
108
|
* Renames the deprecated `element` key to `elementId`. Historically,
|
|
117
109
|
* all of the pre-Execute-Method-Map execute methods accepted an `element` _or_ and `elementId` param.
|
|
@@ -127,16 +119,8 @@ function preprocessExecuteMethodArgs(script, args) {
|
|
|
127
119
|
* Most of these Execute Methods (typically beginning with `mobile*`) will accept an `Element|string` for `elementId`, in practice they will only ever get a `string`. `Element|string` in the method's docstring is simply for documentation purposes.
|
|
128
120
|
*/
|
|
129
121
|
if ('elementId' in executeMethodArgs && executeMethodExpectsParam(script, 'elementId')) {
|
|
130
|
-
executeMethodArgs.elementId = support_1.util.unwrapElement(
|
|
131
|
-
/** @type {import('@appium/types').Element|string} */ (executeMethodArgs.elementId));
|
|
122
|
+
executeMethodArgs.elementId = support_1.util.unwrapElement(executeMethodArgs.elementId);
|
|
132
123
|
}
|
|
133
124
|
return executeMethodArgs;
|
|
134
125
|
}
|
|
135
|
-
/**
|
|
136
|
-
* @template [T=any]
|
|
137
|
-
* @typedef {import('@appium/types').StringRecord<T>} StringRecord
|
|
138
|
-
*/
|
|
139
|
-
/**
|
|
140
|
-
* @typedef {readonly any[] | readonly [StringRecord] | Readonly<StringRecord>} ExecuteMethodArgs
|
|
141
|
-
*/
|
|
142
126
|
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.ts"],"names":[],"mappings":";;;;;AAWA,oDAyBC;AAOD,0BAiBC;AAKD,oCAiBC;AAlFD,oDAAuB;AACvB,sCAAyC;AACzC,0CAA0E;AAC1E,4CAAoC;AAGpC;;;;GAIG;AACI,KAAK,UAAU,oBAAoB,CAExC,MAAiC,EACjC,KAAU;IAEV,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,4BAA4B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpE,IAAI,CAAC,cAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QACtC,IAAI,CAAC,G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driver';
|
|
2
|
+
import type { ContainerObject, ContainerRootSupplier } from './types';
|
|
1
3
|
/**
|
|
2
|
-
* Parses the actual path and the bundle identifier from the given path string
|
|
4
|
+
* Parses the actual path and the bundle identifier from the given path string.
|
|
3
5
|
*
|
|
4
|
-
* @
|
|
5
|
-
* @param
|
|
6
|
-
* match `CONTAINER_PATH_PATTERN` regexp, otherwise an error is going
|
|
7
|
-
* to be thrown. A valid string example: `@bundle.identifier:container_type/relative_path_in_container`
|
|
8
|
-
* @param {import('./types').ContainerRootSupplier|string} [containerRootSupplier] - Container root path supplier function or string value
|
|
9
|
-
* @returns {Promise<import('./types').ContainerObject>}
|
|
6
|
+
* @param remotePath - Path string matching `CONTAINER_PATH_PATTERN`, e.g. `@bundle.id:container/relative/path`
|
|
7
|
+
* @param containerRootSupplier - Container root path supplier or explicit root
|
|
10
8
|
*/
|
|
11
|
-
export function parseContainerPath(this:
|
|
9
|
+
export declare function parseContainerPath(this: XCUITestDriver, remotePath: string, containerRootSupplier?: ContainerRootSupplier | string): Promise<ContainerObject>;
|
|
12
10
|
/**
|
|
13
|
-
* Pushes the given data to a file on the remote device
|
|
11
|
+
* Pushes the given data to a file on the remote device.
|
|
14
12
|
*
|
|
15
|
-
* @param
|
|
13
|
+
* @param remotePath The full path to the remote file or
|
|
16
14
|
* a file inside a package bundle. Check the documentation on
|
|
17
15
|
* `pushFileToRealDevice` and `pushFileToSimulator` for more information
|
|
18
16
|
* on acceptable values.
|
|
19
|
-
* @param
|
|
17
|
+
* @param base64Data Base64 encoded data to be written to the
|
|
20
18
|
* remote file. The remote file will be silently overridden if it already exists.
|
|
21
19
|
* @throws {Error} If there was an error while pushing the data
|
|
22
|
-
* @this {XCUITestDriver}
|
|
23
20
|
*/
|
|
24
|
-
export function pushFile(this:
|
|
21
|
+
export declare function pushFile(this: XCUITestDriver, remotePath: string, base64Data: string | number[] | Buffer): Promise<void>;
|
|
25
22
|
/**
|
|
26
23
|
* Pushes the given data to a file on the remote device.
|
|
27
24
|
*
|
|
28
|
-
* @param
|
|
25
|
+
* @param remotePath - The full path to the remote file
|
|
29
26
|
* or a specially formatted path, which points to an item inside an app bundle.
|
|
30
|
-
* @param
|
|
31
|
-
* @this {XCUITestDriver}
|
|
27
|
+
* @param payload - Base64-encoded content of the file to be pushed.
|
|
32
28
|
*/
|
|
33
|
-
export function mobilePushFile(this:
|
|
29
|
+
export declare function mobilePushFile(this: XCUITestDriver, remotePath: string, payload: string): Promise<void>;
|
|
34
30
|
/**
|
|
35
31
|
* Pulls a remote file from the device.
|
|
36
32
|
*
|
|
37
|
-
* @param
|
|
33
|
+
* @param remotePath The full path to the remote file
|
|
38
34
|
* or a specially formatted path, which points to an item inside app bundle.
|
|
39
35
|
* See the documentation for `pullFromRealDevice` and `pullFromSimulator`
|
|
40
36
|
* to get more information on acceptable values.
|
|
41
|
-
* @returns
|
|
37
|
+
* @returns Base64 encoded content of the pulled file
|
|
42
38
|
* @throws {Error} If the pull operation failed
|
|
43
|
-
* @this {XCUITestDriver}
|
|
44
39
|
*/
|
|
45
|
-
export function pullFile(this:
|
|
40
|
+
export declare function pullFile(this: XCUITestDriver, remotePath: string): Promise<string>;
|
|
46
41
|
/**
|
|
47
42
|
* Pulls a remote file from the device.
|
|
48
43
|
*
|
|
49
|
-
* @param
|
|
44
|
+
* @param remotePath - The full path to the remote file
|
|
50
45
|
* 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.
|
|
51
|
-
* @returns
|
|
52
|
-
* @this {XCUITestDriver}
|
|
46
|
+
* @returns The same as in `pullFile`
|
|
53
47
|
*/
|
|
54
|
-
export function mobilePullFile(this:
|
|
48
|
+
export declare function mobilePullFile(this: XCUITestDriver, remotePath: string): Promise<string>;
|
|
55
49
|
/**
|
|
56
50
|
* Delete a remote folder from the device.
|
|
57
51
|
*
|
|
58
|
-
* @param
|
|
59
|
-
* @
|
|
60
|
-
* @returns {Promise<void>}
|
|
52
|
+
* @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.
|
|
53
|
+
* @returns Nothing
|
|
61
54
|
*/
|
|
62
|
-
export function mobileDeleteFolder(this:
|
|
55
|
+
export declare function mobileDeleteFolder(this: XCUITestDriver, remotePath: string): Promise<void>;
|
|
63
56
|
/**
|
|
64
57
|
* Delete a remote file from the device.
|
|
65
58
|
*
|
|
66
|
-
* @param
|
|
67
|
-
* @
|
|
68
|
-
* @returns {Promise<void>}
|
|
59
|
+
* @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.
|
|
60
|
+
* @returns Nothing
|
|
69
61
|
*/
|
|
70
|
-
export function mobileDeleteFile(this:
|
|
62
|
+
export declare function mobileDeleteFile(this: XCUITestDriver, remotePath: string): Promise<void>;
|
|
71
63
|
/**
|
|
72
64
|
* Pulls the whole folder from the remote device
|
|
73
65
|
*
|
|
74
|
-
* @param
|
|
66
|
+
* @param remotePath The full path to a folder on the
|
|
75
67
|
* remote device or a folder inside an application bundle
|
|
76
|
-
* @returns
|
|
68
|
+
* @returns Zipped and base64-encoded content of the folder
|
|
77
69
|
* @throws {Error} If there was a failure while getting the folder content
|
|
78
|
-
* @this {XCUITestDriver}
|
|
79
70
|
*/
|
|
80
|
-
export function pullFolder(this:
|
|
71
|
+
export declare function pullFolder(this: XCUITestDriver, remotePath: string): Promise<string>;
|
|
81
72
|
/**
|
|
82
73
|
* Pulls the whole folder from the device under test.
|
|
83
74
|
*
|
|
84
|
-
* @param
|
|
85
|
-
* @returns
|
|
86
|
-
* @this {XCUITestDriver}
|
|
75
|
+
* @param remotePath - The full path to the remote folder
|
|
76
|
+
* @returns The same as `pullFolder`
|
|
87
77
|
*/
|
|
88
|
-
export function mobilePullFolder(this:
|
|
89
|
-
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
78
|
+
export declare function mobilePullFolder(this: XCUITestDriver, remotePath: string): Promise<string>;
|
|
90
79
|
//# sourceMappingURL=file-movement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-movement.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-movement.
|
|
1
|
+
{"version":3,"file":"file-movement.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-movement.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,eAAe,EAAE,qBAAqB,EAAC,MAAM,SAAS,CAAC;AASpE;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,MAAM,EAClB,qBAAqB,CAAC,EAAE,qBAAqB,GAAG,MAAM,GACrD,OAAO,CAAC,eAAe,CAAC,CA8B1B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GACrC,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUxF;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9F;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAA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