appium-xcuitest-driver 10.13.1 → 10.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.
- package/CHANGELOG.md +6 -0
- 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/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/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/lib/commands/element.js +0 -423
- package/lib/commands/find.js +0 -205
|
@@ -11,31 +11,23 @@ const lodash_1 = __importDefault(require("lodash"));
|
|
|
11
11
|
const css_converter_1 = require("../css-converter");
|
|
12
12
|
const driver_1 = require("appium/driver");
|
|
13
13
|
const support_1 = require("appium/support");
|
|
14
|
-
/**
|
|
15
|
-
* @this {XCUITestDriver}
|
|
16
|
-
*/
|
|
17
14
|
async function findElOrEls(strategy, selector, mult, context) {
|
|
18
15
|
if (this.isWebview()) {
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return await this.findNativeElementOrElements(strategy, selector, mult, context);
|
|
16
|
+
return mult
|
|
17
|
+
? await this.findWebElementOrElements(strategy, selector, true, context)
|
|
18
|
+
: await this.findWebElementOrElements(strategy, selector, false, context);
|
|
23
19
|
}
|
|
20
|
+
return mult
|
|
21
|
+
? await this.findNativeElementOrElements(strategy, selector, true, context)
|
|
22
|
+
: await this.findNativeElementOrElements(strategy, selector, false, context);
|
|
24
23
|
}
|
|
25
|
-
/**
|
|
26
|
-
* @this {XCUITestDriver}
|
|
27
|
-
* @privateRemarks I'm not sure what these objects are; they aren't `Element`.
|
|
28
|
-
* @returns {Promise<any|any[]|undefined>}
|
|
29
|
-
*/
|
|
30
24
|
async function findNativeElementOrElements(strategy, selector, mult, context) {
|
|
31
25
|
const initSelector = selector;
|
|
32
26
|
let rewroteSelector = false;
|
|
33
27
|
if (strategy === '-ios predicate string') {
|
|
34
|
-
// WebDriverAgent uses 'predicate string'
|
|
35
28
|
strategy = 'predicate string';
|
|
36
29
|
}
|
|
37
30
|
else if (strategy === '-ios class chain') {
|
|
38
|
-
// WebDriverAgent uses 'class chain'
|
|
39
31
|
strategy = WDA_CLASS_CHAIN_STRATEGY;
|
|
40
32
|
}
|
|
41
33
|
else if (strategy === 'css selector') {
|
|
@@ -43,12 +35,9 @@ async function findNativeElementOrElements(strategy, selector, mult, context) {
|
|
|
43
35
|
selector = css_converter_1.CssConverter.toIosClassChainSelector(selector);
|
|
44
36
|
}
|
|
45
37
|
if (strategy === 'class name') {
|
|
46
|
-
// XCUITest classes have `XCUIElementType` prepended
|
|
47
|
-
// first check if there is the old `UIA` prefix
|
|
48
38
|
if (selector.startsWith('UIA')) {
|
|
49
39
|
selector = selector.substring(3);
|
|
50
40
|
}
|
|
51
|
-
// now check if we need to add `XCUIElementType`
|
|
52
41
|
if (!selector.startsWith('XCUIElementType')) {
|
|
53
42
|
selector = stripViewFromSelector(`XCUIElementType${selector}`);
|
|
54
43
|
rewroteSelector = true;
|
|
@@ -61,8 +50,7 @@ async function findNativeElementOrElements(strategy, selector, mult, context) {
|
|
|
61
50
|
[strategy, selector] = rewriteMagicScrollable(mult, this.log);
|
|
62
51
|
}
|
|
63
52
|
else if (strategy === 'xpath') {
|
|
64
|
-
|
|
65
|
-
selector = selector.replace(/(^|\/)(UIA)([^[/]+)/g, (str, g1, g2, g3) => {
|
|
53
|
+
selector = selector.replace(/(^|\/)(UIA)([^[/]+)/g, (str, g1, _g2, g3) => {
|
|
66
54
|
rewroteSelector = true;
|
|
67
55
|
return g1 + stripViewFromSelector(`XCUIElementType${g3}`);
|
|
68
56
|
});
|
|
@@ -72,39 +60,32 @@ async function findNativeElementOrElements(strategy, selector, mult, context) {
|
|
|
72
60
|
`'${selector}' to match XCUI type. You should consider ` +
|
|
73
61
|
`updating your tests to use the new selectors directly`);
|
|
74
62
|
}
|
|
75
|
-
return
|
|
63
|
+
return mult
|
|
64
|
+
? await this.doNativeFind(strategy, selector, true, context)
|
|
65
|
+
: await this.doNativeFind(strategy, selector, false, context);
|
|
76
66
|
}
|
|
77
|
-
/**
|
|
78
|
-
* @this {XCUITestDriver}
|
|
79
|
-
*/
|
|
80
67
|
async function doNativeFind(strategy, selector, mult, context) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
const ctx = support_1.util.unwrapElement(context ?? null);
|
|
69
|
+
const endpoint = `/element${ctx ? `/${ctx}/element` : ''}${mult ? 's' : ''}`;
|
|
70
|
+
const body = {
|
|
84
71
|
using: strategy,
|
|
85
72
|
value: selector,
|
|
86
73
|
};
|
|
87
|
-
/** @type {import('./proxy-helper').AllowedHttpMethod} */
|
|
88
74
|
const method = 'POST';
|
|
89
|
-
|
|
90
|
-
// or an object if mult === false
|
|
91
|
-
/** @type {Element[]|undefined} */
|
|
92
|
-
let els;
|
|
75
|
+
let els = [];
|
|
93
76
|
try {
|
|
94
77
|
await this.implicitWaitForCondition(async () => {
|
|
95
78
|
try {
|
|
96
|
-
els =
|
|
79
|
+
els = (await this.proxyCommand(endpoint, method, body));
|
|
97
80
|
}
|
|
98
81
|
catch {
|
|
99
82
|
els = [];
|
|
100
83
|
}
|
|
101
|
-
// we succeed if we get some elements
|
|
102
84
|
return !lodash_1.default.isEmpty(els);
|
|
103
85
|
});
|
|
104
86
|
}
|
|
105
87
|
catch (err) {
|
|
106
88
|
if (err.message?.match(/Condition unmet/)) {
|
|
107
|
-
// condition was not met setting res to empty array
|
|
108
89
|
els = [];
|
|
109
90
|
}
|
|
110
91
|
else {
|
|
@@ -112,15 +93,21 @@ async function doNativeFind(strategy, selector, mult, context) {
|
|
|
112
93
|
}
|
|
113
94
|
}
|
|
114
95
|
if (mult) {
|
|
115
|
-
return els;
|
|
96
|
+
return Array.isArray(els) ? els : [els];
|
|
116
97
|
}
|
|
117
|
-
if (
|
|
98
|
+
if (Array.isArray(els)) {
|
|
99
|
+
if (lodash_1.default.isEmpty(els)) {
|
|
100
|
+
throw new driver_1.errors.NoSuchElementError();
|
|
101
|
+
}
|
|
102
|
+
return els[0];
|
|
103
|
+
}
|
|
104
|
+
if (!els) {
|
|
118
105
|
throw new driver_1.errors.NoSuchElementError();
|
|
119
106
|
}
|
|
120
107
|
return els;
|
|
121
108
|
}
|
|
122
109
|
/**
|
|
123
|
-
*
|
|
110
|
+
* Finds the first visible child element inside a context.
|
|
124
111
|
*/
|
|
125
112
|
async function getFirstVisibleChild(mult, context) {
|
|
126
113
|
this.log.info(`Getting first visible child`);
|
|
@@ -131,16 +118,10 @@ async function getFirstVisibleChild(mult, context) {
|
|
|
131
118
|
throw new Error('Cannot get first visible child without a context element');
|
|
132
119
|
}
|
|
133
120
|
let index = 1;
|
|
134
|
-
// loop through children via class-chain finds, until we run out of children
|
|
135
|
-
// or we find a visible one. This loop looks infinite but its not, because at
|
|
136
|
-
// some point the call to doNativeFind will throw with an Element Not Found
|
|
137
|
-
// error, when the index gets higher than the number of child elements. This
|
|
138
|
-
// is what we want because that error will halt the loop and make it all the
|
|
139
|
-
// way to the client.
|
|
140
121
|
while (true) {
|
|
141
122
|
const strategy = WDA_CLASS_CHAIN_STRATEGY;
|
|
142
123
|
const selector = `*[${index}]`;
|
|
143
|
-
const nthChild = await this.doNativeFind(strategy, selector, false, context);
|
|
124
|
+
const nthChild = (await this.doNativeFind(strategy, selector, false, context));
|
|
144
125
|
const visible = await this.getAttribute('visible', nthChild);
|
|
145
126
|
if (visible === 'true') {
|
|
146
127
|
this.log.info(`Found first visible child at position ${index}`);
|
|
@@ -149,17 +130,10 @@ async function getFirstVisibleChild(mult, context) {
|
|
|
149
130
|
index++;
|
|
150
131
|
}
|
|
151
132
|
}
|
|
152
|
-
// we override the xpath search for this first-visible-child selector, which
|
|
153
|
-
// looks like /*[@firstVisible="true"]
|
|
154
133
|
const MAGIC_FIRST_VIS_CHILD_SEL = /\/\*\[@firstVisible\s*=\s*('|")true\1\]/;
|
|
155
|
-
// we likewise override xpath search to provide a shortcut for finding all
|
|
156
|
-
// scrollable elements
|
|
157
134
|
const MAGIC_SCROLLABLE_SEL = /\/\/\*\[@scrollable\s*=\s*('|")true\1\]/;
|
|
158
135
|
const WDA_CLASS_CHAIN_STRATEGY = 'class chain';
|
|
159
|
-
// Check if the word 'View' is appended to selector and if it is, strip it out
|
|
160
136
|
function stripViewFromSelector(selector) {
|
|
161
|
-
// Don't strip it out if it's one of these 4 element types
|
|
162
|
-
// (see https://github.com/facebook/WebDriverAgent/blob/master/WebDriverAgentLib/Utilities/FBElementTypeTransformer.m for reference)
|
|
163
137
|
const keepView = [
|
|
164
138
|
'XCUIElementTypeScrollView',
|
|
165
139
|
'XCUIElementTypeCollectionView',
|
|
@@ -167,18 +141,10 @@ function stripViewFromSelector(selector) {
|
|
|
167
141
|
'XCUIElementTypeWebView',
|
|
168
142
|
].includes(selector);
|
|
169
143
|
if (!keepView && selector.indexOf('View') === selector.length - 4) {
|
|
170
|
-
return selector.
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
return selector;
|
|
144
|
+
return selector.substring(0, selector.length - 4);
|
|
174
145
|
}
|
|
146
|
+
return selector;
|
|
175
147
|
}
|
|
176
|
-
/**
|
|
177
|
-
*
|
|
178
|
-
* @param {boolean} mult
|
|
179
|
-
* @param {import('@appium/types').AppiumLogger|null} log
|
|
180
|
-
* @returns {[string, string]}
|
|
181
|
-
*/
|
|
182
148
|
function rewriteMagicScrollable(mult, log = null) {
|
|
183
149
|
const pred = ['ScrollView', 'Table', 'CollectionView', 'WebView']
|
|
184
150
|
.map((t) => `type == "XCUIElementType${t}"`)
|
|
@@ -192,8 +158,4 @@ function rewriteMagicScrollable(mult, log = null) {
|
|
|
192
158
|
`format with selector '${selector}'`);
|
|
193
159
|
return [strategy, selector];
|
|
194
160
|
}
|
|
195
|
-
/**
|
|
196
|
-
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
197
|
-
* @typedef {import('@appium/types').Element} Element
|
|
198
|
-
*/
|
|
199
161
|
//# sourceMappingURL=find.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../lib/commands/find.
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../lib/commands/find.ts"],"names":[],"mappings":";;;;;AAuCA,kCAeC;AA0BD,kEAkDC;AAmCD,oCA+CC;AAKD,oDAwBC;AAjPD,oDAAuB;AACvB,oDAA8C;AAC9C,0CAAqC;AACrC,4CAAoC;AAoC7B,KAAK,UAAU,WAAW,CAE/B,QAAgB,EAChB,QAAgB,EAChB,IAAa,EACb,OAAa;IAEb,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;QACrB,OAAO,IAAI;YACT,CAAC,CAAC,MAAM,IAAI,CAAC,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC;YACxE,CAAC,CAAC,MAAM,IAAI,CAAC,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IACD,O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Q,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClE,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAa,EAAE,MAA2B,IAAI;IAC5E,MAAM,IAAI,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,CAAC;SAC9D,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,2BAA2B,CAAC,GAAG,CAAC;SAC3C,IAAI,CAAC,MAAM,CAAC,CAAC;IAChB,MAAM,QAAQ,GAAG,wBAAwB,CAAC;IAC1C,IAAI,QAAQ,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,QAAQ,IAAI,KAAK,CAAC;IACpB,CAAC;IACD,GAAG,EAAE,IAAI,CACP,4DAA4D;QAC1D,yBAAyB,QAAQ,GAAG,CACvC,CAAC;IACF,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":"AAQA;;GAEG;AACH,8EAMC;AAED;;GAEG;AACH,iFAIC;AAED;;GAEG;AACH,oFAsBC;AAED;;;;;;;;;;;;GAYG;AACH,8EAPW,MAAM,aACN,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CASzB;AAED;;GAEG;AACH,uFAwCC;6BAGY,OAAO,WAAW,EAAE,cAAc;;;;;SAKjC,MAAM;;;;;;cACN,MAAM,OAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.back = back;
|
|
7
4
|
exports.forward = forward;
|
|
@@ -9,7 +6,6 @@ exports.closeWindow = closeWindow;
|
|
|
9
6
|
exports.mobileDeepLink = mobileDeepLink;
|
|
10
7
|
exports.nativeBack = nativeBack;
|
|
11
8
|
const driver_1 = require("appium/driver");
|
|
12
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
13
9
|
const asyncbox_1 = require("asyncbox");
|
|
14
10
|
const utils_1 = require("../utils");
|
|
15
11
|
// these two constitute the wait after closing a window
|
|
@@ -89,20 +85,22 @@ async function nativeBack() {
|
|
|
89
85
|
return await this.mobilePressButton('Menu');
|
|
90
86
|
}
|
|
91
87
|
try {
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
const navBar = await this.findNativeElementOrElements('class name', 'XCUIElementTypeNavigationBar', false);
|
|
89
|
+
let dstButton;
|
|
90
|
+
const backButtons = await this.findNativeElementOrElements('-ios predicate string', 'type == "XCUIElementTypeButton" AND label == "Back"', true, navBar);
|
|
91
|
+
if (backButtons.length === 0) {
|
|
92
|
+
const buttons = await this.findNativeElementOrElements('-ios predicate string', 'type == "XCUIElementTypeButton"', true, navBar);
|
|
93
|
+
if (buttons.length === 0) {
|
|
94
|
+
throw new Error('No buttons found in navigation bar');
|
|
95
|
+
}
|
|
99
96
|
this.log.debug(`Found navigation bar 'back' button. Clicking.`);
|
|
97
|
+
dstButton = buttons[0];
|
|
100
98
|
}
|
|
101
99
|
else {
|
|
102
|
-
this.log.debug(`
|
|
103
|
-
|
|
100
|
+
this.log.debug(`Did not find any navigation bar 'back' button. Clicking the first one.`);
|
|
101
|
+
dstButton = backButtons[0];
|
|
104
102
|
}
|
|
105
|
-
await this.nativeClick(
|
|
103
|
+
await this.nativeClick(dstButton);
|
|
106
104
|
}
|
|
107
105
|
catch (err) {
|
|
108
106
|
this.log.error(`Unable to find navigation bar and back button: ${err.message}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":";;AAWA,oBAMC;AAKD,0BAIC;AAKD,kCAsBC;AAeD,wCAKC;AAKD,gCAwCC;AAtHD,0CAAqC;AACrC,uCAA0C;AAC1C,oCAAkC;AAElC,uDAAuD;AACvD,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC;;GAEG;AACI,KAAK,UAAU,IAAI;IACxB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACzB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,OAAO;IAC3B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;IAC3B,CAAC;IACD,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,WAAW;IAC/B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACzB,MAAM,IAAI,eAAM,CAAC,mBAAmB,EAAE,CAAC;IACzC,CAAC;IAED,yEAAyE;IACzE,2EAA2E;IAC3E,MAAM,MAAM,GAAG,6EAA6E,CAAC;IAC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,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,2BAA2B,CACpD,uBAAuB,EACvB,iCAAiC,EACjC,IAAI,EACJ,MAAM,CACP,CAAC;YACF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;YACxD,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;YAChE,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;YACzF,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QAED,MAAM,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,kDAAkD,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;AACH,CAAC;AAED;;GAEG;AAEH;;;;;;GAMG"}
|
|
@@ -9,6 +9,9 @@ import {exec} from 'teen_process';
|
|
|
9
9
|
import {findAPortNotInUse, checkPortStatus} from 'portscanner';
|
|
10
10
|
import {Pyidevice} from '../device/clients/py-ios-device-client';
|
|
11
11
|
import {errors} from 'appium/driver';
|
|
12
|
+
import type {Simulator} from 'appium-ios-simulator';
|
|
13
|
+
import type {XCUITestDriver} from '../driver';
|
|
14
|
+
import type {CertificateList} from './types';
|
|
12
15
|
|
|
13
16
|
const CONFIG_EXTENSION = 'mobileconfig';
|
|
14
17
|
const HOST_PORT_RANGE = [38200, 38299];
|
|
@@ -62,11 +65,8 @@ const OPEN_SSL_PATTERN = /,\sCN\s=\s([^,]+)/;
|
|
|
62
65
|
|
|
63
66
|
/**
|
|
64
67
|
* Parses the common name of the certificate from the given string.
|
|
65
|
-
*
|
|
66
|
-
* @param {string} stringCertificate
|
|
67
|
-
* @returns {string} The common name of the certificate
|
|
68
68
|
*/
|
|
69
|
-
export function parseCommonName(stringCertificate) {
|
|
69
|
+
export function parseCommonName(stringCertificate: string): string {
|
|
70
70
|
const result = [LIBRE_SSL_PATTERN, OPEN_SSL_PATTERN].reduce((acc, r) => {
|
|
71
71
|
if (acc) {
|
|
72
72
|
return acc;
|
|
@@ -87,22 +87,28 @@ export function parseCommonName(stringCertificate) {
|
|
|
87
87
|
* certificates on Simulator over CLI.
|
|
88
88
|
*
|
|
89
89
|
* On real devices (or simulators before Xcode SDK 11.4), Apple provides no "official" way to do this via the command line. In such a case (and also as a fallback if CLI setup fails), this method tries to wrap the certificate into `.mobileconfig` format, then deploys the wrapped file to the internal HTTP server so that it can be opened via mobile Safari. This command then goes through the profile installation procedure by clicking the necessary buttons using WebDriverAgent.
|
|
90
|
-
* @param
|
|
91
|
-
* @param
|
|
92
|
-
* @param
|
|
93
|
-
* @returns
|
|
90
|
+
* @param content - Base64-encoded content of the public certificate in [PEM](https://knowledge.digicert.com/quovadis/ssl-certificates/ssl-general-topics/what-is-pem-format.html) format
|
|
91
|
+
* @param commonName - Common name of the certificate. If this is not set, the command will try to parse it from the provided `content`.
|
|
92
|
+
* @param isRoot - Defines where the certificate should be installed; either the Trusted Root Store (`true`) or the Keychain (`false`). On environments other than Xcode 11.4+ Simulator, this option is ignored.
|
|
93
|
+
* @returns The content of the generated `.mobileconfig` file as
|
|
94
94
|
* a base64-encoded string. This config might be useful for debugging purposes. If the certificate has been successfully set via CLI, then nothing is returned.
|
|
95
|
-
* @this {XCUITestDriver}
|
|
96
95
|
*/
|
|
97
|
-
export async function mobileInstallCertificate(
|
|
96
|
+
export async function mobileInstallCertificate(
|
|
97
|
+
this: XCUITestDriver,
|
|
98
|
+
content: string,
|
|
99
|
+
commonName?: string,
|
|
100
|
+
isRoot = true,
|
|
101
|
+
): Promise<string | void> {
|
|
98
102
|
if (_.isEmpty(content)) {
|
|
99
103
|
throw new Error('Certificate content should not be empty');
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
if (this.isSimulator()) {
|
|
103
107
|
try {
|
|
104
|
-
const methodName
|
|
105
|
-
|
|
108
|
+
const methodName: 'addRootCertificate' | 'addCertificate' = isRoot
|
|
109
|
+
? 'addRootCertificate'
|
|
110
|
+
: 'addCertificate';
|
|
111
|
+
await (this.device as Simulator).simctl[methodName](Buffer.from(content, 'base64').toString(), {
|
|
106
112
|
raw: true,
|
|
107
113
|
});
|
|
108
114
|
return;
|
|
@@ -188,11 +194,12 @@ export async function mobileInstallCertificate(content, commonName, isRoot = tru
|
|
|
188
194
|
}
|
|
189
195
|
}
|
|
190
196
|
} else {
|
|
191
|
-
await
|
|
197
|
+
await (this.device as Simulator).openUrl(certUrl);
|
|
192
198
|
}
|
|
193
199
|
|
|
194
200
|
let isCertAlreadyInstalled = false;
|
|
195
|
-
|
|
201
|
+
const platformVersion = this.opts.platformVersion ?? '';
|
|
202
|
+
if (util.compareVersions(platformVersion, '>=', '12.2')) {
|
|
196
203
|
if (await installPost122Certificate(this, cn)) {
|
|
197
204
|
await clickElement(this, Settings.Profile);
|
|
198
205
|
await trustCertificateInPreferences(this, cn);
|
|
@@ -238,17 +245,19 @@ export async function mobileInstallCertificate(content, commonName, isRoot = tru
|
|
|
238
245
|
*
|
|
239
246
|
* @see https://github.com/YueChen-C/py-ios-device
|
|
240
247
|
* @since 4.19.2
|
|
241
|
-
* @param
|
|
242
|
-
* @returns
|
|
243
|
-
*
|
|
244
|
-
* forwards the original pyidevice output)
|
|
248
|
+
* @param name - Name of the profile
|
|
249
|
+
* @returns Status acknowledgment if
|
|
250
|
+
* the certificate is successfully removed or 'None' (forwards pyidevice output)
|
|
245
251
|
* @throws {Error} If attempting to remove certificates for a simulated device or if `py-ios-device` is not installed
|
|
246
252
|
* @group Real Device Only
|
|
247
253
|
*/
|
|
248
|
-
export async function mobileRemoveCertificate(name) {
|
|
254
|
+
export async function mobileRemoveCertificate(this: XCUITestDriver, name: string): Promise<string> {
|
|
249
255
|
if (!this.isRealDevice()) {
|
|
250
256
|
throw new errors.NotImplementedError('This extension is only supported on real devices');
|
|
251
257
|
}
|
|
258
|
+
if (!this.opts.udid) {
|
|
259
|
+
throw new Error('udid capability is required');
|
|
260
|
+
}
|
|
252
261
|
const client = new Pyidevice({
|
|
253
262
|
udid: this.opts.udid,
|
|
254
263
|
log: this.log,
|
|
@@ -263,11 +272,10 @@ export async function mobileRemoveCertificate(name) {
|
|
|
263
272
|
* This only works _if and only if_ `py-ios-device` is installed on the same machine Appium is running on.
|
|
264
273
|
* @since 4.10.0
|
|
265
274
|
* @see https://github.com/YueChen-C/py-ios-device
|
|
266
|
-
* @returns
|
|
275
|
+
* @returns An object describing the certificates installed on the real device.
|
|
267
276
|
* @throws {Error} If attempting to list certificates for a simulated device or if `py-ios-device` is not installed
|
|
268
|
-
* @this {XCUITestDriver}
|
|
269
277
|
*/
|
|
270
|
-
export async function mobileListCertificates() {
|
|
278
|
+
export async function mobileListCertificates(this: XCUITestDriver): Promise<CertificateList> {
|
|
271
279
|
if (!this.isRealDevice()) {
|
|
272
280
|
throw new errors.NotImplementedError('This extension is only supported on real devices');
|
|
273
281
|
}
|
|
@@ -287,9 +295,9 @@ export async function mobileListCertificates() {
|
|
|
287
295
|
* Extracts the common name of the certificate from the given buffer.
|
|
288
296
|
*
|
|
289
297
|
* @param {Buffer} certBuffer
|
|
290
|
-
* @returns
|
|
298
|
+
* @returns The common name of the certificate
|
|
291
299
|
*/
|
|
292
|
-
async function extractCommonName(certBuffer) {
|
|
300
|
+
async function extractCommonName(certBuffer: Buffer): Promise<string> {
|
|
293
301
|
const tempCert = await tempDir.open({
|
|
294
302
|
prefix: 'cert',
|
|
295
303
|
suffix: '.cer',
|
|
@@ -315,12 +323,12 @@ async function extractCommonName(certBuffer) {
|
|
|
315
323
|
* for more details on such profiles.
|
|
316
324
|
*
|
|
317
325
|
* @param {Buffer} certBuffer - The actual content of PEM certificate encoded into NodeJS buffer
|
|
318
|
-
* @param
|
|
326
|
+
* @param commonName - Certificate's common name
|
|
319
327
|
* @returns {Object} The encoded structure of the given certificate, which is ready to be passed
|
|
320
328
|
* as an argument to plist builder
|
|
321
329
|
* @throws {Error} If the given certificate cannot be parsed
|
|
322
330
|
*/
|
|
323
|
-
function toMobileConfig(certBuffer, commonName) {
|
|
331
|
+
function toMobileConfig(certBuffer: Buffer, commonName: string): Record<string, any> {
|
|
324
332
|
const getUUID = () => util.uuidV4().toUpperCase();
|
|
325
333
|
const contentUuid = getUUID();
|
|
326
334
|
return {
|
|
@@ -345,8 +353,12 @@ function toMobileConfig(certBuffer, commonName) {
|
|
|
345
353
|
};
|
|
346
354
|
}
|
|
347
355
|
|
|
348
|
-
async function clickElement(
|
|
349
|
-
|
|
356
|
+
async function clickElement(
|
|
357
|
+
driver: XCUITestDriver,
|
|
358
|
+
locator: {type: string; value: string},
|
|
359
|
+
options: {timeout?: number; skipIfInvisible?: boolean} = {},
|
|
360
|
+
): Promise<boolean> {
|
|
361
|
+
let element: any = null;
|
|
350
362
|
const {timeout = 5000, skipIfInvisible = false} = options;
|
|
351
363
|
const lookupDelay = 500;
|
|
352
364
|
try {
|
|
@@ -365,7 +377,7 @@ async function clickElement(driver, locator, options = {}) {
|
|
|
365
377
|
return true;
|
|
366
378
|
}
|
|
367
379
|
|
|
368
|
-
async function installPre122Certificate(driver) {
|
|
380
|
+
async function installPre122Certificate(driver: XCUITestDriver): Promise<boolean> {
|
|
369
381
|
// Accept Safari alert
|
|
370
382
|
await clickElement(driver, Button.Allow, {
|
|
371
383
|
// certificate load might take some time on slow machines
|
|
@@ -393,7 +405,7 @@ async function installPre122Certificate(driver) {
|
|
|
393
405
|
return true;
|
|
394
406
|
}
|
|
395
407
|
|
|
396
|
-
async function trustCertificateInPreferences(driver, name) {
|
|
408
|
+
async function trustCertificateInPreferences(driver: XCUITestDriver, name: string): Promise<void> {
|
|
397
409
|
await clickElement(driver, Settings.General);
|
|
398
410
|
await clickElement(driver, Settings.About);
|
|
399
411
|
const switchLocator = {
|
|
@@ -401,14 +413,12 @@ async function trustCertificateInPreferences(driver, name) {
|
|
|
401
413
|
value: `**/XCUIElementTypeCell[\`label == '${name}'\`]/**/XCUIElementTypeSwitch`,
|
|
402
414
|
};
|
|
403
415
|
await retry(5, async () => {
|
|
404
|
-
await driver.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
direction: 'up',
|
|
411
|
-
});
|
|
416
|
+
const tableEl = await driver.findNativeElementOrElements(
|
|
417
|
+
'class name',
|
|
418
|
+
'XCUIElementTypeTable',
|
|
419
|
+
false,
|
|
420
|
+
);
|
|
421
|
+
await driver.mobileSwipe('up', undefined, tableEl);
|
|
412
422
|
await clickElement(driver, Settings.Certificate_Trust_Settings, {
|
|
413
423
|
timeout: 500,
|
|
414
424
|
});
|
|
@@ -433,7 +443,7 @@ async function trustCertificateInPreferences(driver, name) {
|
|
|
433
443
|
}
|
|
434
444
|
}
|
|
435
445
|
|
|
436
|
-
async function installPost122Certificate(driver, name) {
|
|
446
|
+
async function installPost122Certificate(driver: XCUITestDriver, name: string): Promise<boolean> {
|
|
437
447
|
// Accept Safari alert
|
|
438
448
|
await clickElement(driver, Button.Allow, {
|
|
439
449
|
// certificate load might take some time on slow machines
|
|
@@ -466,14 +476,12 @@ async function installPost122Certificate(driver, name) {
|
|
|
466
476
|
break;
|
|
467
477
|
}
|
|
468
478
|
|
|
469
|
-
await driver.
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
direction: 'up',
|
|
476
|
-
});
|
|
479
|
+
const tableEl = await driver.findNativeElementOrElements(
|
|
480
|
+
'class name',
|
|
481
|
+
'XCUIElementTypeTable',
|
|
482
|
+
false,
|
|
483
|
+
);
|
|
484
|
+
await driver.mobileSwipe('up', undefined, tableEl);
|
|
477
485
|
}
|
|
478
486
|
if (!isCertFound) {
|
|
479
487
|
throw new Error(`'${name}' cannot be found in the certificates list`);
|
|
@@ -498,6 +506,3 @@ async function installPost122Certificate(driver, name) {
|
|
|
498
506
|
return true;
|
|
499
507
|
}
|
|
500
508
|
|
|
501
|
-
/**
|
|
502
|
-
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
503
|
-
*/
|