appium-webdriveragent 5.6.2 → 5.8.0
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 +14 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBWebDriverAttributes.m +7 -0
- package/WebDriverAgentLib/Routing/FBElement.h +3 -0
- package/WebDriverAgentLib/Utilities/FBMacros.h +4 -0
- package/WebDriverAgentLib/Utilities/FBXPath.m +27 -4
- package/WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m +1 -0
- package/WebDriverAgentTests/IntegrationTests/FBXPathIntegrationTests.m +4 -3
- package/WebDriverAgentTests/IntegrationTests/XCUIElementFBFindTests.m +1 -1
- package/WebDriverAgentTests/UnitTests/Doubles/XCElementSnapshotDouble.m +6 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.h +2 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.m +2 -0
- package/WebDriverAgentTests/UnitTests/FBXPathTests.m +6 -5
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.m +1 -0
- package/build/index.js +39 -36
- package/build/lib/check-dependencies.d.ts +3 -0
- package/build/lib/check-dependencies.d.ts.map +1 -0
- package/build/lib/check-dependencies.js +38 -32
- package/build/lib/check-dependencies.js.map +1 -1
- package/build/lib/constants.d.ts +12 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +8 -10
- package/build/lib/constants.js.map +1 -1
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -11
- package/build/lib/logger.js.map +1 -1
- package/build/lib/no-session-proxy.d.ts +6 -0
- package/build/lib/no-session-proxy.d.ts.map +1 -0
- package/build/lib/no-session-proxy.js +22 -26
- package/build/lib/no-session-proxy.js.map +1 -1
- package/build/lib/utils.d.ts +127 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +347 -211
- package/build/lib/utils.js.map +1 -1
- package/build/lib/webdriveragent.d.ts +145 -0
- package/build/lib/webdriveragent.d.ts.map +1 -0
- package/build/lib/webdriveragent.js +478 -367
- package/build/lib/webdriveragent.js.map +1 -1
- package/build/lib/xcodebuild.d.ts +58 -0
- package/build/lib/xcodebuild.d.ts.map +1 -0
- package/build/lib/xcodebuild.js +367 -289
- package/build/lib/xcodebuild.js.map +1 -1
- package/lib/check-dependencies.js +3 -4
- package/lib/utils.js +10 -7
- package/lib/webdriveragent.js +14 -9
- package/lib/xcodebuild.js +39 -7
- package/package.json +28 -18
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";;AAAA,6CAAyC;AAEzC,MAAM,GAAG,GAAG,gBAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAE/C,kBAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-session-proxy.d.ts","sourceRoot":"","sources":["../../lib/no-session-proxy.js"],"names":[],"mappings":";AAGA;IAKE,iCAaC;CACF;wBAtBuB,qBAAqB"}
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _baseDriver = require("@appium/base-driver");
|
|
9
|
-
class NoSessionProxy extends _baseDriver.JWProxy {
|
|
10
|
-
constructor(opts = {}) {
|
|
11
|
-
super(opts);
|
|
12
|
-
}
|
|
13
|
-
getUrlForProxy(url) {
|
|
14
|
-
if (url === '') {
|
|
15
|
-
url = '/';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoSessionProxy = void 0;
|
|
4
|
+
const base_driver_1 = require("@appium/base-driver");
|
|
5
|
+
class NoSessionProxy extends base_driver_1.JWProxy {
|
|
6
|
+
constructor(opts = {}) {
|
|
7
|
+
super(opts);
|
|
16
8
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
getUrlForProxy(url) {
|
|
10
|
+
if (url === '') {
|
|
11
|
+
url = '/';
|
|
12
|
+
}
|
|
13
|
+
const proxyBase = `${this.scheme}://${this.server}:${this.port}${this.base}`;
|
|
14
|
+
let remainingUrl = '';
|
|
15
|
+
if ((new RegExp('^/')).test(url)) {
|
|
16
|
+
remainingUrl = url;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new Error(`Did not know what to do with url '${url}'`);
|
|
20
|
+
}
|
|
21
|
+
remainingUrl = remainingUrl.replace(/\/$/, ''); // can't have trailing slashes
|
|
22
|
+
return proxyBase + remainingUrl;
|
|
23
23
|
}
|
|
24
|
-
remainingUrl = remainingUrl.replace(/\/$/, '');
|
|
25
|
-
return proxyBase + remainingUrl;
|
|
26
|
-
}
|
|
27
24
|
}
|
|
28
25
|
exports.NoSessionProxy = NoSessionProxy;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZURyaXZlciIsInJlcXVpcmUiLCJOb1Nlc3Npb25Qcm94eSIsIkpXUHJveHkiLCJjb25zdHJ1Y3RvciIsIm9wdHMiLCJnZXRVcmxGb3JQcm94eSIsInVybCIsInByb3h5QmFzZSIsInNjaGVtZSIsInNlcnZlciIsInBvcnQiLCJiYXNlIiwicmVtYWluaW5nVXJsIiwiUmVnRXhwIiwidGVzdCIsIkVycm9yIiwicmVwbGFjZSIsImV4cG9ydHMiLCJfZGVmYXVsdCIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi9saW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UFDO0VBQ25DQyxXQUFXQSxDQUFFQyxJQUFJLEdBQUcsQ0FBQyxDQUFDLEVBQUU7SUFDdEIsS0FBSyxDQUFDQSxJQUFJLENBQUM7RUFDYjtFQUVBQyxjQUFjQSxDQUFFQyxHQUFHLEVBQUU7SUFDbkIsSUFBSUEsR0FBRyxLQUFLLEVBQUUsRUFBRTtNQUNkQSxHQUFHLEdBQUcsR0FBRztJQUNYO0lBQ0EsTUFBTUMsU0FBUyxHQUFJLEdBQUUsSUFBSSxDQUFDQyxNQUFPLE1BQUssSUFBSSxDQUFDQyxNQUFPLElBQUcsSUFBSSxDQUFDQyxJQUFLLEdBQUUsSUFBSSxDQUFDQyxJQUFLLEVBQUM7SUFDNUUsSUFBSUMsWUFBWSxHQUFHLEVBQUU7SUFDckIsSUFBSyxJQUFJQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUVDLElBQUksQ0FBQ1IsR0FBRyxDQUFDLEVBQUU7TUFDaENNLFlBQVksR0FBR04sR0FBRztJQUNwQixDQUFDLE1BQU07TUFDTCxNQUFNLElBQUlTLEtBQUssQ0FBRSxxQ0FBb0NULEdBQUksR0FBRSxDQUFDO0lBQzlEO0lBQ0FNLFlBQVksR0FBR0EsWUFBWSxDQUFDSSxPQUFPLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQztJQUM5QyxPQUFPVCxTQUFTLEdBQUdLLFlBQVk7RUFDakM7QUFDRjtBQUFDSyxPQUFBLENBQUFoQixjQUFBLEdBQUFBLGNBQUE7QUFBQSxJQUFBaUIsUUFBQSxHQUdjakIsY0FBYztBQUFBZ0IsT0FBQSxDQUFBRSxPQUFBLEdBQUFELFFBQUEifQ==
|
|
26
|
+
exports.default = NoSessionProxy;
|
|
27
|
+
//# sourceMappingURL=no-session-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-session-proxy.js","
|
|
1
|
+
{"version":3,"file":"no-session-proxy.js","sourceRoot":"","sources":["../../lib/no-session-proxy.js"],"names":[],"mappings":";;;AAAA,qDAA8C;AAG9C,MAAM,cAAe,SAAQ,qBAAO;IAClC,YAAa,IAAI,GAAG,EAAE;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED,cAAc,CAAE,GAAG;QACjB,IAAI,GAAG,KAAK,EAAE,EAAE;YACd,GAAG,GAAG,GAAG,CAAC;SACX;QACD,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC7E,IAAI,YAAY,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YAChC,YAAY,GAAG,GAAG,CAAC;SACpB;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,qCAAqC,GAAG,GAAG,CAAC,CAAC;SAC9D;QACD,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,8BAA8B;QAC9E,OAAO,SAAS,GAAG,YAAY,CAAC;IAClC,CAAC;CACF;AAEQ,wCAAc;AACvB,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export const BOOTSTRAP_PATH: string;
|
|
2
|
+
/**
|
|
3
|
+
* Information of the device under test
|
|
4
|
+
*/
|
|
5
|
+
export type DeviceInfo = {
|
|
6
|
+
/**
|
|
7
|
+
* - Equals to true if the current device is a real device
|
|
8
|
+
*/
|
|
9
|
+
isRealDevice: string;
|
|
10
|
+
/**
|
|
11
|
+
* - The device UDID.
|
|
12
|
+
*/
|
|
13
|
+
udid: string;
|
|
14
|
+
/**
|
|
15
|
+
* - The platform version of OS.
|
|
16
|
+
*/
|
|
17
|
+
platformVersion: string;
|
|
18
|
+
/**
|
|
19
|
+
* - The platform name of iOS, tvOS
|
|
20
|
+
*/
|
|
21
|
+
platformName: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Update WebDriverAgentRunner project bundle ID with newBundleId.
|
|
25
|
+
* This method assumes project file is in the correct state.
|
|
26
|
+
* @param {string} agentPath - Path to the .xcodeproj directory.
|
|
27
|
+
* @param {string} newBundleId the new bundle ID used to update.
|
|
28
|
+
*/
|
|
29
|
+
export function updateProjectFile(agentPath: string, newBundleId: string): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Reset WebDriverAgentRunner project bundle ID to correct state.
|
|
32
|
+
* @param {string} agentPath - Path to the .xcodeproj directory.
|
|
33
|
+
*/
|
|
34
|
+
export function resetProjectFile(agentPath: string): Promise<void>;
|
|
35
|
+
export function setRealDeviceSecurity(keychainPath: any, keychainPassword: any): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Return the WDA object which appends existing xctest runner content
|
|
38
|
+
* @param {string} platformName - The name of the platform
|
|
39
|
+
* @param {number|string} wdaRemotePort - The remote port number
|
|
40
|
+
* @return {object} returns a runner object which has USE_PORT
|
|
41
|
+
*/
|
|
42
|
+
export function getAdditionalRunContent(platformName: string, wdaRemotePort: number | string): object;
|
|
43
|
+
/**
|
|
44
|
+
* Return the name of xctestrun file
|
|
45
|
+
* @param {DeviceInfo} deviceInfo
|
|
46
|
+
* @param {string} version - The Xcode SDK version of OS.
|
|
47
|
+
* @return {string} returns xctestrunFilePath for given device
|
|
48
|
+
*/
|
|
49
|
+
export function getXctestrunFileName(deviceInfo: DeviceInfo, version: string): string;
|
|
50
|
+
export function generateXcodeConfigFile(orgId: any, signingId: any): Promise<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Information of the device under test
|
|
53
|
+
* @typedef {Object} DeviceInfo
|
|
54
|
+
* @property {string} isRealDevice - Equals to true if the current device is a real device
|
|
55
|
+
* @property {string} udid - The device UDID.
|
|
56
|
+
* @property {string} platformVersion - The platform version of OS.
|
|
57
|
+
* @property {string} platformName - The platform name of iOS, tvOS
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* Creates xctestrun file per device & platform version.
|
|
61
|
+
* We expects to have WebDriverAgentRunner_iphoneos${sdkVersion|platformVersion}-arm64.xctestrun for real device
|
|
62
|
+
* and WebDriverAgentRunner_iphonesimulator${sdkVersion|platformVersion}-x86_64.xctestrun for simulator located @bootstrapPath
|
|
63
|
+
* Newer Xcode (Xcode 10.0 at least) generate xctestrun file following sdkVersion.
|
|
64
|
+
* e.g. Xcode which has iOS SDK Version 12.2 generate WebDriverAgentRunner_iphonesimulator.2-x86_64.xctestrun
|
|
65
|
+
* even if the cap has platform version 11.4
|
|
66
|
+
*
|
|
67
|
+
* @param {DeviceInfo} deviceInfo
|
|
68
|
+
* @param {string} sdkVersion - The Xcode SDK version of OS.
|
|
69
|
+
* @param {string} bootstrapPath - The folder path containing xctestrun file.
|
|
70
|
+
* @param {number|string} wdaRemotePort - The remote port WDA is listening on.
|
|
71
|
+
* @return {Promise<string>} returns xctestrunFilePath for given device
|
|
72
|
+
* @throws if WebDriverAgentRunner_iphoneos${sdkVersion|platformVersion}-arm64.xctestrun for real device
|
|
73
|
+
* or WebDriverAgentRunner_iphonesimulator${sdkVersion|platformVersion}-x86_64.xctestrun for simulator is not found @bootstrapPath,
|
|
74
|
+
* then it will throw file not found exception
|
|
75
|
+
*/
|
|
76
|
+
export function setXctestrunFile(deviceInfo: DeviceInfo, sdkVersion: string, bootstrapPath: string, wdaRemotePort: number | string): Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Return the path of xctestrun if it exists
|
|
79
|
+
* @param {DeviceInfo} deviceInfo
|
|
80
|
+
* @param {string} sdkVersion - The Xcode SDK version of OS.
|
|
81
|
+
* @param {string} bootstrapPath - The folder path containing xctestrun file.
|
|
82
|
+
* @returns {Promise<string>}
|
|
83
|
+
*/
|
|
84
|
+
export function getXctestrunFilePath(deviceInfo: DeviceInfo, sdkVersion: string, bootstrapPath: string): Promise<string>;
|
|
85
|
+
export function killProcess(name: any, proc: any): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Generate a random integer.
|
|
88
|
+
*
|
|
89
|
+
* @return {number} A random integer number in range [low, hight). `low`` is inclusive and `high` is exclusive.
|
|
90
|
+
*/
|
|
91
|
+
export function randomInt(low: any, high: any): number;
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves WDA upgrade timestamp
|
|
94
|
+
*
|
|
95
|
+
* @return {Promise<number?>} The UNIX timestamp of the package manifest. The manifest only gets modified on
|
|
96
|
+
* package upgrade.
|
|
97
|
+
*/
|
|
98
|
+
export function getWDAUpgradeTimestamp(): Promise<number | null>;
|
|
99
|
+
/**
|
|
100
|
+
* Kills running XCTest processes for the particular device.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} udid - The device UDID.
|
|
103
|
+
* @param {boolean} isSimulator - Equals to true if the current device is a Simulator
|
|
104
|
+
*/
|
|
105
|
+
export function resetTestProcesses(udid: string, isSimulator: boolean): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Get the IDs of processes listening on the particular system port.
|
|
108
|
+
* It is also possible to apply additional filtering based on the
|
|
109
|
+
* process command line.
|
|
110
|
+
*
|
|
111
|
+
* @param {string|number} port - The port number.
|
|
112
|
+
* @param {?Function} filteringFunc - Optional lambda function, which
|
|
113
|
+
* receives command line string of the particular process
|
|
114
|
+
* listening on given port, and is expected to return
|
|
115
|
+
* either true or false to include/exclude the corresponding PID
|
|
116
|
+
* from the resulting array.
|
|
117
|
+
* @returns {Promise<string[]>} - the list of matched process ids.
|
|
118
|
+
*/
|
|
119
|
+
export function getPIDsListeningOnPort(port: string | number, filteringFunc?: Function | null): Promise<string[]>;
|
|
120
|
+
export function killAppUsingPattern(pgrepPattern: any): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Return true if the platformName is tvOS
|
|
123
|
+
* @param {string} platformName The name of the platorm
|
|
124
|
+
* @returns {boolean} Return true if the platformName is tvOS
|
|
125
|
+
*/
|
|
126
|
+
export function isTvOS(platformName: string): boolean;
|
|
127
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAmCA,oCAA8C;;;;;;;;kBA2IhC,MAAM;;;;UACN,MAAM;;;;qBACN,MAAM;;;;kBACN,MAAM;;AAlEpB;;;;;GAKG;AACH,6CAHW,MAAM,eACN,MAAM,iBAchB;AAED;;;GAGG;AACH,4CAFW,MAAM,iBAiBhB;AAED,+FAKC;AAiDD;;;;;GAKG;AACH,sDAJW,MAAM,iBACN,MAAM,GAAC,MAAM,GACZ,MAAM,CAajB;AA4CD;;;;;GAKG;AACH,iDAJW,UAAU,WACV,MAAM,GACL,MAAM,CAMjB;AAtHD,qFAUC;AAED;;;;;;;EAOE;AACF;;;;;;;;;;;;;;;;GAgBG;AACH,6CATW,UAAU,cACV,MAAM,iBACN,MAAM,iBACN,MAAM,GAAC,MAAM,GACZ,QAAQ,MAAM,CAAC,CAa1B;AAqBD;;;;;;GAMG;AACH,iDALW,UAAU,cACV,MAAM,iBACN,MAAM,GACJ,QAAQ,MAAM,CAAC,CAkC3B;AAeD,iEA4BC;AAED;;;;GAIG;AACH,gDAFY,MAAM,CAIjB;AAED;;;;;GAKG;AACH,0CAHY,QAAQ,MAAM,QAAE,CAU3B;AAED;;;;;GAKG;AACH,yCAHW,MAAM,eACN,OAAO,iBAWjB;AAED;;;;;;;;;;;;GAYG;AACH,6CARW,MAAM,GAAC,MAAM,oCAMX,QAAQ,MAAM,EAAE,CAAC,CAgC7B;AAnVD,sEAqCC;AAED;;;;GAIG;AACH,qCAHW,MAAM,GACJ,OAAO,CAInB"}
|