appium-mac2-driver 3.2.1 → 3.2.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 +7 -0
- package/build/lib/commands/record-screen.d.ts +11 -12
- package/build/lib/commands/record-screen.d.ts.map +1 -1
- package/build/lib/commands/record-screen.js +2 -0
- package/build/lib/commands/record-screen.js.map +1 -1
- package/build/lib/constraints.d.ts +56 -0
- package/build/lib/constraints.d.ts.map +1 -0
- package/build/lib/constraints.js +57 -0
- package/build/lib/constraints.js.map +1 -0
- package/build/lib/driver.d.ts +30 -90
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +56 -45
- package/build/lib/driver.js.map +1 -1
- package/build/lib/method-map.d.ts +1 -1
- package/build/lib/method-map.d.ts.map +1 -1
- package/build/lib/method-map.js +6 -6
- package/build/lib/method-map.js.map +1 -1
- package/lib/commands/record-screen.js +1 -1
- package/lib/constraints.ts +60 -0
- package/lib/{driver.js → driver.ts} +118 -65
- package/lib/{method-map.js → method-map.ts} +7 -6
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
- package/build/lib/desired-caps.d.ts +0 -66
- package/build/lib/desired-caps.d.ts.map +0 -1
- package/build/lib/desired-caps.js +0 -58
- package/build/lib/desired-caps.js.map +0 -1
- package/lib/desired-caps.js +0 -55
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.2.2](https://github.com/appium/appium-mac2-driver/compare/v3.2.1...v3.2.2) (2025-11-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* Migrate driver.js to typescript ([#350](https://github.com/appium/appium-mac2-driver/issues/350)) ([e1b351f](https://github.com/appium/appium-mac2-driver/commit/e1b351f05de0c48d2c67bfaff22f04193e699943))
|
|
7
|
+
|
|
1
8
|
## [3.2.1](https://github.com/appium/appium-mac2-driver/compare/v3.2.0...v3.2.1) (2025-11-12)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -100,17 +100,7 @@ export class startRecordingScreen {
|
|
|
100
100
|
* or screen recording is not supported on the device under test.
|
|
101
101
|
*/
|
|
102
102
|
export function stopRecordingScreen(this: import("../driver").Mac2Driver, remotePath?: string, user?: string, pass?: string, method?: string, headers?: import("@appium/types").StringRecord | [string, any][], fileFieldName?: string, formFields?: import("@appium/types").StringRecord | [string, string][]): Promise<string>;
|
|
103
|
-
export
|
|
104
|
-
export type ScreenRecorderOptions = {
|
|
105
|
-
fps?: number | undefined;
|
|
106
|
-
deviceId: string | number;
|
|
107
|
-
preset?: string | undefined;
|
|
108
|
-
captureCursor?: boolean | undefined;
|
|
109
|
-
captureClicks?: boolean | undefined;
|
|
110
|
-
videoFilter?: string | undefined;
|
|
111
|
-
timeLimit?: number | undefined;
|
|
112
|
-
};
|
|
113
|
-
declare class ScreenRecorder {
|
|
103
|
+
export class ScreenRecorder {
|
|
114
104
|
/**
|
|
115
105
|
*
|
|
116
106
|
* @param {string} videoPath
|
|
@@ -134,5 +124,14 @@ declare class ScreenRecorder {
|
|
|
134
124
|
start(): Promise<void>;
|
|
135
125
|
stop(force?: boolean): Promise<any>;
|
|
136
126
|
}
|
|
137
|
-
export
|
|
127
|
+
export type Mac2Driver = import("../driver").Mac2Driver;
|
|
128
|
+
export type ScreenRecorderOptions = {
|
|
129
|
+
fps?: number | undefined;
|
|
130
|
+
deviceId: string | number;
|
|
131
|
+
preset?: string | undefined;
|
|
132
|
+
captureCursor?: boolean | undefined;
|
|
133
|
+
captureClicks?: boolean | undefined;
|
|
134
|
+
videoFilter?: string | undefined;
|
|
135
|
+
timeLimit?: number | undefined;
|
|
136
|
+
};
|
|
138
137
|
//# sourceMappingURL=record-screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-screen.d.ts","sourceRoot":"","sources":["../../../lib/commands/record-screen.js"],"names":[],"mappings":"AAgLA;;;;;;;;;;;;;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QAAQ,GAAC,UAAU,kBAOtF,OAAO,kBAEP,OAAO,iBAEP,OAAO,iBAkDjB;;IAhFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,4DA3BW,MAAM,GAAC,MAAM,cAGb,MAAM,GAAC,MAAM,gBAEb,MAAM,QAIN,MAAM,GAAC,MAAM,WAEb,WAAW,GAAC,WAAW,GAAC,UAAU,GAAC,QAAQ,GAAC,MAAM,GAAC,QAAQ,GAAC,MAAM,GAAC,QAAQ,GAAC,UAAU,kBAOtF,OAAO,kBAEP,OAAO,iBAEP,OAAO,EAkDjB;IArBC,gCAA2B;;AAuB7B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,uFAtBW,MAAM,SAMN,MAAM,SACN,MAAM,WACN,MAAM,YACN,OAAO,eAAe,EAAE,YAAY,GAAC,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,kBAEpD,MAAM,eAEN,OAAO,eAAe,EAAE,YAAY,GAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAErD,OAAO,CAAC,MAAM,CAAC,CAoC3B;AA1RD;IACE;;;;;OAKG;IACH,uBAJW,MAAM,OACN,OAAO,eAAe,EAAE,YAAY,QACpC,qBAAqB,EAe/B;IAZC,2CAAe;IACf,mBAA2B;IAC3B,cAAoB;IACpB,aAA+D;IAC/D,2BAA8B;IAC9B,oCAAwC;IACxC,oCAAwC;IACxC,gBAA4C;IAC5C,iCAAoC;IACpC,mBAEsB;IAGxB,gCAEC;IAED,qBAEC;IAED,uCAaC;IAED,uBAmEC;IAED,oCA4BC;CACF;yBA8IY,OAAO,WAAW,EAAE,UAAU;;;cAM7B,MAAM,GAAC,MAAM"}
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ScreenRecorder = void 0;
|
|
6
7
|
exports.startRecordingScreen = startRecordingScreen;
|
|
7
8
|
exports.stopRecordingScreen = stopRecordingScreen;
|
|
8
9
|
const lodash_1 = __importDefault(require("lodash"));
|
|
@@ -166,6 +167,7 @@ class ScreenRecorder {
|
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
169
|
}
|
|
170
|
+
exports.ScreenRecorder = ScreenRecorder;
|
|
169
171
|
/**
|
|
170
172
|
* Record the display in background while the automated test is running.
|
|
171
173
|
* This method requires FFMPEG (https://www.ffmpeg.org/download.html) to be installed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-screen.js","sourceRoot":"","sources":["../../../lib/commands/record-screen.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-screen.js","sourceRoot":"","sources":["../../../lib/commands/record-screen.js"],"names":[],"mappings":";;;;;;AAmNA,oDA6CC;AA4BD,kDA6BC;AAzTD,oDAAuB;AACvB,uCAA4C;AAC5C,4CAAmD;AACnD,+CAA0C;AAC1C,wDAAyB;AACzB,uCAAgD;AAGhD,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,kBAAkB,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AACjD,MAAM,wBAAwB,GAAG,EAAE,GAAG,IAAI,CAAC;AAC3C,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC;;GAEG;AACH,KAAK,UAAU,iBAAiB,CAAE,GAAG;IACnC,IAAI,CAAC;QACH,OAAO,MAAM,YAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,GAAG,CAAC,kBAAkB,CAC1B,GAAG,aAAa,+BAA+B;YAC/C,kCAA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CAAC,qDAAqD,CAAC,CAAC;QACtE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IACpD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACpE,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,OAAO,GAAG;QACd,IAAI;QACJ,IAAI;QACJ,MAAM;QACN,OAAO;QACP,aAAa;QACb,UAAU;KACX,CAAC;IACF,OAAO,MAAM,6BAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AAAA,CAAC;AAEF;;GAEG;AAEH;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
declare const MAC2_CONSTRAINTS: {
|
|
2
|
+
readonly systemPort: {
|
|
3
|
+
readonly isNumber: true;
|
|
4
|
+
};
|
|
5
|
+
readonly systemHost: {
|
|
6
|
+
readonly isString: true;
|
|
7
|
+
};
|
|
8
|
+
readonly showServerLogs: {
|
|
9
|
+
readonly isBoolean: true;
|
|
10
|
+
};
|
|
11
|
+
readonly bootstrapRoot: {
|
|
12
|
+
readonly isString: true;
|
|
13
|
+
};
|
|
14
|
+
readonly serverStartupTimeout: {
|
|
15
|
+
readonly isNumber: true;
|
|
16
|
+
};
|
|
17
|
+
readonly bundleId: {
|
|
18
|
+
readonly isString: true;
|
|
19
|
+
};
|
|
20
|
+
readonly arguments: {
|
|
21
|
+
readonly isArray: true;
|
|
22
|
+
};
|
|
23
|
+
readonly environment: {
|
|
24
|
+
readonly isObject: true;
|
|
25
|
+
};
|
|
26
|
+
readonly noReset: {
|
|
27
|
+
readonly isBoolean: true;
|
|
28
|
+
};
|
|
29
|
+
readonly skipAppKill: {
|
|
30
|
+
readonly isBoolean: true;
|
|
31
|
+
};
|
|
32
|
+
readonly prerun: {
|
|
33
|
+
readonly isObject: true;
|
|
34
|
+
};
|
|
35
|
+
readonly postrun: {
|
|
36
|
+
readonly isObject: true;
|
|
37
|
+
};
|
|
38
|
+
readonly webDriverAgentMacUrl: {
|
|
39
|
+
readonly isString: true;
|
|
40
|
+
};
|
|
41
|
+
readonly appPath: {
|
|
42
|
+
readonly isString: true;
|
|
43
|
+
};
|
|
44
|
+
readonly appLocale: {
|
|
45
|
+
readonly isObject: true;
|
|
46
|
+
};
|
|
47
|
+
readonly appTimeZone: {
|
|
48
|
+
readonly isString: true;
|
|
49
|
+
};
|
|
50
|
+
readonly initialDeeplinkUrl: {
|
|
51
|
+
readonly isString: true;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export default MAC2_CONSTRAINTS;
|
|
55
|
+
export type Mac2Constraints = typeof MAC2_CONSTRAINTS;
|
|
56
|
+
//# sourceMappingURL=constraints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDU,CAAC;AAEjC,eAAe,gBAAgB,CAAC;AAEhC,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const MAC2_CONSTRAINTS = {
|
|
4
|
+
systemPort: {
|
|
5
|
+
isNumber: true,
|
|
6
|
+
},
|
|
7
|
+
systemHost: {
|
|
8
|
+
isString: true,
|
|
9
|
+
},
|
|
10
|
+
showServerLogs: {
|
|
11
|
+
isBoolean: true,
|
|
12
|
+
},
|
|
13
|
+
bootstrapRoot: {
|
|
14
|
+
isString: true,
|
|
15
|
+
},
|
|
16
|
+
serverStartupTimeout: {
|
|
17
|
+
isNumber: true,
|
|
18
|
+
},
|
|
19
|
+
bundleId: {
|
|
20
|
+
isString: true,
|
|
21
|
+
},
|
|
22
|
+
arguments: {
|
|
23
|
+
isArray: true,
|
|
24
|
+
},
|
|
25
|
+
environment: {
|
|
26
|
+
isObject: true,
|
|
27
|
+
},
|
|
28
|
+
noReset: {
|
|
29
|
+
isBoolean: true,
|
|
30
|
+
},
|
|
31
|
+
skipAppKill: {
|
|
32
|
+
isBoolean: true,
|
|
33
|
+
},
|
|
34
|
+
prerun: {
|
|
35
|
+
isObject: true,
|
|
36
|
+
},
|
|
37
|
+
postrun: {
|
|
38
|
+
isObject: true,
|
|
39
|
+
},
|
|
40
|
+
webDriverAgentMacUrl: {
|
|
41
|
+
isString: true,
|
|
42
|
+
},
|
|
43
|
+
appPath: {
|
|
44
|
+
isString: true,
|
|
45
|
+
},
|
|
46
|
+
appLocale: {
|
|
47
|
+
isObject: true,
|
|
48
|
+
},
|
|
49
|
+
appTimeZone: {
|
|
50
|
+
isString: true,
|
|
51
|
+
},
|
|
52
|
+
initialDeeplinkUrl: {
|
|
53
|
+
isString: true,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
exports.default = MAC2_CONSTRAINTS;
|
|
57
|
+
//# sourceMappingURL=constraints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":";;AAEA,MAAM,gBAAgB,GAAG;IACvB,UAAU,EAAE;QACV,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,SAAS,EAAE,IAAI;KAChB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,IAAI;KACf;IACD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;KACd;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,SAAS,EAAE,IAAI;KAChB;IACD,WAAW,EAAE;QACX,SAAS,EAAE,IAAI;KAChB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,IAAI;KACf;IACD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,IAAI;KACf;IACD,kBAAkB,EAAE;QAClB,QAAQ,EAAE,IAAI;KACf;CAC6B,CAAC;AAEjC,kBAAe,gBAAgB,CAAC"}
|
package/build/lib/driver.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import type { RouteMatcher, HTTPMethod, HTTPBody, DefaultCreateSessionResult, DriverData, InitialOpts, StringRecord, ExternalDriver, W3CDriverCaps } from '@appium/types';
|
|
2
|
+
import { BaseDriver } from 'appium/driver';
|
|
3
|
+
import { type WDAMacServer } from './wda-mac';
|
|
4
|
+
import { type Mac2Constraints } from './constraints';
|
|
5
|
+
import * as appManagemenetCommands from './commands/app-management';
|
|
6
|
+
import * as appleScriptCommands from './commands/applescript';
|
|
7
|
+
import * as executeCommands from './commands/execute';
|
|
8
|
+
import * as findCommands from './commands/find';
|
|
9
|
+
import * as gesturesCommands from './commands/gestures';
|
|
10
|
+
import * as navigationCommands from './commands/navigation';
|
|
11
|
+
import * as recordScreenCommands from './commands/record-screen';
|
|
12
|
+
import * as screenshotCommands from './commands/screenshots';
|
|
13
|
+
import * as sourceCommands from './commands/source';
|
|
14
|
+
import * as clipboardCommands from './commands/clipboard';
|
|
15
|
+
import * as nativeScreenRecordingCommands from './commands/native-record-screen';
|
|
16
|
+
export declare class Mac2Driver extends BaseDriver<Mac2Constraints, StringRecord> implements ExternalDriver<Mac2Constraints, string, StringRecord> {
|
|
17
|
+
private isProxyActive;
|
|
18
|
+
private _wda;
|
|
19
|
+
_videoChunksBroadcaster: nativeScreenRecordingCommands.NativeVideoChunksBroadcaster;
|
|
20
|
+
_screenRecorder: recordScreenCommands.ScreenRecorder | null;
|
|
21
|
+
proxyReqRes: (...args: any) => any;
|
|
2
22
|
static newMethodMap: {
|
|
3
23
|
readonly '/session/:sessionId/appium/start_recording_screen': {
|
|
4
24
|
readonly POST: {
|
|
@@ -204,86 +224,18 @@ export class Mac2Driver extends BaseDriver<any, import("@appium/types").StringRe
|
|
|
204
224
|
};
|
|
205
225
|
};
|
|
206
226
|
};
|
|
207
|
-
constructor(opts?:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
/** @type {nativeScreenRecordingCommands.NativeVideoChunksBroadcaster} */
|
|
213
|
-
_videoChunksBroadcaster: nativeScreenRecordingCommands.NativeVideoChunksBroadcaster;
|
|
214
|
-
desiredCapConstraints: {
|
|
215
|
-
systemPort: {
|
|
216
|
-
isNumber: boolean;
|
|
217
|
-
};
|
|
218
|
-
systemHost: {
|
|
219
|
-
isString: boolean;
|
|
220
|
-
};
|
|
221
|
-
showServerLogs: {
|
|
222
|
-
isBoolean: boolean;
|
|
223
|
-
};
|
|
224
|
-
bootstrapRoot: {
|
|
225
|
-
isString: boolean;
|
|
226
|
-
};
|
|
227
|
-
serverStartupTimeout: {
|
|
228
|
-
isNumber: boolean;
|
|
229
|
-
};
|
|
230
|
-
bundleId: {
|
|
231
|
-
isString: boolean;
|
|
232
|
-
};
|
|
233
|
-
arguments: {
|
|
234
|
-
isArray: boolean;
|
|
235
|
-
};
|
|
236
|
-
environment: {
|
|
237
|
-
isObject: boolean;
|
|
238
|
-
};
|
|
239
|
-
noReset: {
|
|
240
|
-
isBoolean: boolean;
|
|
241
|
-
};
|
|
242
|
-
skipAppKill: {
|
|
243
|
-
isBoolean: boolean;
|
|
244
|
-
};
|
|
245
|
-
prerun: {
|
|
246
|
-
isObject: boolean;
|
|
247
|
-
};
|
|
248
|
-
postrun: {
|
|
249
|
-
isObject: boolean;
|
|
250
|
-
};
|
|
251
|
-
webDriverAgentMacUrl: {
|
|
252
|
-
isString: boolean;
|
|
253
|
-
};
|
|
254
|
-
appPath: {
|
|
255
|
-
isString: boolean;
|
|
256
|
-
};
|
|
257
|
-
appLocale: {
|
|
258
|
-
isObject: boolean;
|
|
259
|
-
};
|
|
260
|
-
appTimeZone: {
|
|
261
|
-
isString: boolean;
|
|
262
|
-
};
|
|
263
|
-
initialDeeplinkUrl: {
|
|
264
|
-
isString: boolean;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
settings: DeviceSettings<{}>;
|
|
268
|
-
onSettingsUpdate(key: any, value: any): Promise<any>;
|
|
269
|
-
resetState(): void;
|
|
270
|
-
proxyReqRes: any;
|
|
271
|
-
_screenRecorder: any;
|
|
272
|
-
proxyActive(sessionId: any): boolean;
|
|
273
|
-
getProxyAvoidList(sessionId: any): import("@appium/types").RouteMatcher[];
|
|
227
|
+
constructor(opts?: InitialOpts);
|
|
228
|
+
onSettingsUpdate(key: string, value: unknown): Promise<void>;
|
|
229
|
+
get wda(): WDAMacServer;
|
|
230
|
+
proxyActive(sessionId: string): boolean;
|
|
231
|
+
getProxyAvoidList(sessionId: string): RouteMatcher[];
|
|
274
232
|
canProxy(): boolean;
|
|
275
|
-
|
|
276
|
-
*
|
|
277
|
-
* @param {string} url
|
|
278
|
-
* @param {import('@appium/types').HTTPMethod} method
|
|
279
|
-
* @param {any} body
|
|
280
|
-
* @returns {Promise<any>}
|
|
281
|
-
*/
|
|
282
|
-
proxyCommand(url: string, method: import("@appium/types").HTTPMethod, body?: any): Promise<any>;
|
|
233
|
+
proxyCommand(url: string, method: HTTPMethod, body?: HTTPBody): Promise<any>;
|
|
283
234
|
getStatus(): Promise<any>;
|
|
284
235
|
getWindowRect(): Promise<any>;
|
|
285
|
-
createSession(
|
|
236
|
+
createSession(w3cCaps1: W3CMac2DriverCaps, w3cCaps2?: W3CMac2DriverCaps, w3cCaps3?: W3CMac2DriverCaps, driverData?: DriverData[]): Promise<DefaultCreateSessionResult<Mac2Constraints>>;
|
|
286
237
|
deleteSession(): Promise<void>;
|
|
238
|
+
private resetState;
|
|
287
239
|
macosLaunchApp: typeof appManagemenetCommands.macosLaunchApp;
|
|
288
240
|
macosActivateApp: typeof appManagemenetCommands.macosActivateApp;
|
|
289
241
|
macosTerminateApp: typeof appManagemenetCommands.macosTerminateApp;
|
|
@@ -319,17 +271,5 @@ export class Mac2Driver extends BaseDriver<any, import("@appium/types").StringRe
|
|
|
319
271
|
macosSource: typeof sourceCommands.macosSource;
|
|
320
272
|
}
|
|
321
273
|
export default Mac2Driver;
|
|
322
|
-
|
|
323
|
-
import * as nativeScreenRecordingCommands from './commands/native-record-screen';
|
|
324
|
-
import { DeviceSettings } from 'appium/driver';
|
|
325
|
-
import * as appManagemenetCommands from './commands/app-management';
|
|
326
|
-
import * as appleScriptCommands from './commands/applescript';
|
|
327
|
-
import * as executeCommands from './commands/execute';
|
|
328
|
-
import * as findCommands from './commands/find';
|
|
329
|
-
import * as gesturesCommands from './commands/gestures';
|
|
330
|
-
import * as clipboardCommands from './commands/clipboard';
|
|
331
|
-
import * as navigationCommands from './commands/navigation';
|
|
332
|
-
import * as recordScreenCommands from './commands/record-screen';
|
|
333
|
-
import * as screenshotCommands from './commands/screenshots';
|
|
334
|
-
import * as sourceCommands from './commands/source';
|
|
274
|
+
type W3CMac2DriverCaps = W3CDriverCaps<Mac2Constraints>;
|
|
335
275
|
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.
|
|
1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WAAW,kCAA4B;IAEvC,aAAa,wCAAkC;IAC/C,UAAU,qCAA+B;IACzC,WAAW,sCAAgC;IAC3C,UAAU,qCAA+B;IACzC,eAAe,0CAAoC;IACnD,UAAU,qCAA+B;IACzC,gBAAgB,2CAAqC;IACrD,iBAAiB,4CAAsC;IACvD,wBAAwB,mDAA6C;IACrE,SAAS,oCAA8B;IACvC,iBAAiB,4CAAsC;IACvD,QAAQ,mCAA6B;IACrC,cAAc,yCAAmC;IACjD,iBAAiB,4CAAsC;IACvD,wBAAwB,mDAA6C;IAErE,iBAAiB,6CAAuC;IACxD,iBAAiB,6CAAuC;IAExD,aAAa,0CAAoC;IAEjD,oBAAoB,mDAA6C;IACjE,mBAAmB,kDAA4C;IAE/D,+BAA+B,uEAAiE;IAChG,iCAAiC,yEAAmE;IACpG,8BAA8B,sEAAgE;IAC9F,iBAAiB,yDAAmD;IAEpE,gBAAgB,6CAAuC;IAEvD,WAAW,oCAA8B;CAC1C;AAED,eAAe,UAAU,CAAC;AAc1B,KAAK,iBAAiB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC"}
|
package/build/lib/driver.js
CHANGED
|
@@ -40,7 +40,7 @@ exports.Mac2Driver = void 0;
|
|
|
40
40
|
const lodash_1 = __importDefault(require("lodash"));
|
|
41
41
|
const driver_1 = require("appium/driver");
|
|
42
42
|
const wda_mac_1 = require("./wda-mac");
|
|
43
|
-
const
|
|
43
|
+
const constraints_1 = __importDefault(require("./constraints"));
|
|
44
44
|
const appManagemenetCommands = __importStar(require("./commands/app-management"));
|
|
45
45
|
const appleScriptCommands = __importStar(require("./commands/applescript"));
|
|
46
46
|
const executeCommands = __importStar(require("./commands/execute"));
|
|
@@ -51,11 +51,10 @@ const recordScreenCommands = __importStar(require("./commands/record-screen"));
|
|
|
51
51
|
const screenshotCommands = __importStar(require("./commands/screenshots"));
|
|
52
52
|
const sourceCommands = __importStar(require("./commands/source"));
|
|
53
53
|
const clipboardCommands = __importStar(require("./commands/clipboard"));
|
|
54
|
+
const nativeScreenRecordingCommands = __importStar(require("./commands/native-record-screen"));
|
|
54
55
|
const logger_1 = __importDefault(require("./logger"));
|
|
55
56
|
const method_map_1 = require("./method-map");
|
|
56
57
|
const execute_method_map_1 = require("./execute-method-map");
|
|
57
|
-
const nativeScreenRecordingCommands = __importStar(require("./commands/native-record-screen"));
|
|
58
|
-
/** @type {import('@appium/types').RouteMatcher[]} */
|
|
59
58
|
const NO_PROXY = [
|
|
60
59
|
['GET', new RegExp('^/session/[^/]+/appium')],
|
|
61
60
|
['POST', new RegExp('^/session/[^/]+/appium')],
|
|
@@ -67,18 +66,16 @@ const NO_PROXY = [
|
|
|
67
66
|
['POST', new RegExp('^/session/[^/]+/timeouts$')],
|
|
68
67
|
];
|
|
69
68
|
class Mac2Driver extends driver_1.BaseDriver {
|
|
70
|
-
/** @type {boolean} */
|
|
71
69
|
isProxyActive;
|
|
72
|
-
|
|
73
|
-
wda;
|
|
74
|
-
/** @type {nativeScreenRecordingCommands.NativeVideoChunksBroadcaster} */
|
|
70
|
+
_wda;
|
|
75
71
|
_videoChunksBroadcaster;
|
|
72
|
+
_screenRecorder;
|
|
73
|
+
proxyReqRes;
|
|
76
74
|
static newMethodMap = method_map_1.newMethodMap;
|
|
77
75
|
static executeMethodMap = execute_method_map_1.executeMethodMap;
|
|
78
76
|
constructor(opts = {}) {
|
|
79
|
-
// @ts-ignore TODO: Make opts typed
|
|
80
77
|
super(opts);
|
|
81
|
-
this.desiredCapConstraints =
|
|
78
|
+
this.desiredCapConstraints = lodash_1.default.cloneDeep(constraints_1.default);
|
|
82
79
|
this.locatorStrategies = [
|
|
83
80
|
'id',
|
|
84
81
|
'name',
|
|
@@ -94,17 +91,18 @@ class Mac2Driver extends driver_1.BaseDriver {
|
|
|
94
91
|
this.settings = new driver_1.DeviceSettings({}, this.onSettingsUpdate.bind(this));
|
|
95
92
|
}
|
|
96
93
|
async onSettingsUpdate(key, value) {
|
|
97
|
-
|
|
94
|
+
if (!this._wda) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
return await this._wda.proxy.command('/appium/settings', 'POST', {
|
|
98
98
|
settings: { [key]: value }
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
this.
|
|
106
|
-
this._videoChunksBroadcaster = new nativeScreenRecordingCommands.NativeVideoChunksBroadcaster(this.eventEmitter, this.log);
|
|
107
|
-
this._screenRecorder = null;
|
|
101
|
+
get wda() {
|
|
102
|
+
if (!this._wda) {
|
|
103
|
+
throw new Error('WDA server is not initialized');
|
|
104
|
+
}
|
|
105
|
+
return this._wda;
|
|
108
106
|
}
|
|
109
107
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
108
|
proxyActive(sessionId) {
|
|
@@ -117,42 +115,44 @@ class Mac2Driver extends driver_1.BaseDriver {
|
|
|
117
115
|
canProxy() {
|
|
118
116
|
return true;
|
|
119
117
|
}
|
|
120
|
-
/**
|
|
121
|
-
*
|
|
122
|
-
* @param {string} url
|
|
123
|
-
* @param {import('@appium/types').HTTPMethod} method
|
|
124
|
-
* @param {any} body
|
|
125
|
-
* @returns {Promise<any>}
|
|
126
|
-
*/
|
|
127
118
|
async proxyCommand(url, method, body = null) {
|
|
128
|
-
|
|
119
|
+
if (!this._wda) {
|
|
120
|
+
throw new Error('WDA server is not initialized');
|
|
121
|
+
}
|
|
122
|
+
return await this._wda.proxy.command(url, method, body);
|
|
129
123
|
}
|
|
130
|
-
// @ts-ignore We know WDA response should be ok
|
|
131
124
|
async getStatus() {
|
|
132
|
-
|
|
125
|
+
if (!this._wda) {
|
|
126
|
+
throw new Error('WDA server is not initialized');
|
|
127
|
+
}
|
|
128
|
+
return await this._wda.proxy.command('/status', 'GET');
|
|
133
129
|
}
|
|
134
130
|
// needed to make image plugin work
|
|
135
131
|
async getWindowRect() {
|
|
136
|
-
|
|
132
|
+
if (!this._wda) {
|
|
133
|
+
throw new Error('WDA server is not initialized');
|
|
134
|
+
}
|
|
135
|
+
return await this._wda.proxy.command('/window/rect', 'GET');
|
|
137
136
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.
|
|
137
|
+
async createSession(w3cCaps1, w3cCaps2, w3cCaps3, driverData) {
|
|
138
|
+
const [sessionId, caps] = await super.createSession(w3cCaps1, w3cCaps2, w3cCaps3, driverData);
|
|
139
|
+
this._wda = wda_mac_1.WDA_MAC_SERVER;
|
|
140
|
+
this.caps = caps;
|
|
141
|
+
this.opts = this.opts;
|
|
143
142
|
try {
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
const prerun = caps.prerun;
|
|
144
|
+
if (prerun) {
|
|
145
|
+
if (!lodash_1.default.isString(prerun.command) && !lodash_1.default.isString(prerun.script)) {
|
|
146
146
|
throw new Error(`'prerun' capability value must either contain ` +
|
|
147
147
|
`'script' or 'command' entry of string type`);
|
|
148
148
|
}
|
|
149
149
|
logger_1.default.info('Executing prerun AppleScript');
|
|
150
|
-
const output = await this.macosExecAppleScript(
|
|
150
|
+
const output = await this.macosExecAppleScript(prerun.script, undefined, prerun.command);
|
|
151
151
|
if (lodash_1.default.trim(output)) {
|
|
152
152
|
logger_1.default.info(`Prerun script output: ${output}`);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
await this.
|
|
155
|
+
await this._wda.startSession(caps, {
|
|
156
156
|
reqBasePath: this.basePath,
|
|
157
157
|
});
|
|
158
158
|
}
|
|
@@ -160,29 +160,34 @@ class Mac2Driver extends driver_1.BaseDriver {
|
|
|
160
160
|
await this.deleteSession();
|
|
161
161
|
throw e;
|
|
162
162
|
}
|
|
163
|
-
this.proxyReqRes = this.wda.proxy.proxyReqRes.bind(this.
|
|
163
|
+
this.proxyReqRes = this.wda.proxy.proxyReqRes.bind(this._wda.proxy);
|
|
164
164
|
this.isProxyActive = true;
|
|
165
165
|
return [sessionId, caps];
|
|
166
166
|
}
|
|
167
167
|
async deleteSession() {
|
|
168
168
|
await this._screenRecorder?.stop(true);
|
|
169
169
|
if (this._videoChunksBroadcaster.hasPublishers) {
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
if (this._wda) {
|
|
171
|
+
try {
|
|
172
|
+
await this.wda.proxy.command('/wda/video/stop', 'POST', {});
|
|
173
|
+
}
|
|
174
|
+
catch { }
|
|
172
175
|
}
|
|
173
|
-
catch { }
|
|
174
176
|
await this._videoChunksBroadcaster.shutdown(5000);
|
|
175
177
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
if (this._wda) {
|
|
179
|
+
await this.wda.stopSession();
|
|
180
|
+
}
|
|
181
|
+
const postrun = this.opts.postrun;
|
|
182
|
+
if (postrun) {
|
|
183
|
+
if (!lodash_1.default.isString(postrun.command) && !lodash_1.default.isString(postrun.script)) {
|
|
179
184
|
logger_1.default.error(`'postrun' capability value must either contain ` +
|
|
180
185
|
`'script' or 'command' entry of string type`);
|
|
181
186
|
}
|
|
182
187
|
else {
|
|
183
188
|
logger_1.default.info('Executing postrun AppleScript');
|
|
184
189
|
try {
|
|
185
|
-
const output = await this.macosExecAppleScript(
|
|
190
|
+
const output = await this.macosExecAppleScript(postrun.script, undefined, postrun.command);
|
|
186
191
|
if (lodash_1.default.trim(output)) {
|
|
187
192
|
logger_1.default.info(`Postrun script output: ${output}`);
|
|
188
193
|
}
|
|
@@ -195,6 +200,12 @@ class Mac2Driver extends driver_1.BaseDriver {
|
|
|
195
200
|
this.resetState();
|
|
196
201
|
await super.deleteSession();
|
|
197
202
|
}
|
|
203
|
+
resetState() {
|
|
204
|
+
this._wda = null;
|
|
205
|
+
this.isProxyActive = false;
|
|
206
|
+
this._videoChunksBroadcaster = new nativeScreenRecordingCommands.NativeVideoChunksBroadcaster(this.eventEmitter, this.log);
|
|
207
|
+
this._screenRecorder = null;
|
|
208
|
+
}
|
|
198
209
|
macosLaunchApp = appManagemenetCommands.macosLaunchApp;
|
|
199
210
|
macosActivateApp = appManagemenetCommands.macosActivateApp;
|
|
200
211
|
macosTerminateApp = appManagemenetCommands.macosTerminateApp;
|
package/build/lib/driver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AAcvB,0CAA2D;AAC3D,uCAA8D;AAC9D,gEAAqE;AACrE,kFAAoE;AACpE,4EAA8D;AAC9D,oEAAsD;AACtD,8DAAgD;AAChD,sEAAwD;AACxD,0EAA4D;AAC5D,+EAAiE;AACjE,2EAA6D;AAC7D,kEAAoD;AACpD,wEAA0D;AAC1D,+FAAiF;AACjF,sDAA2B;AAC3B,6CAA4C;AAC5C,6DAAwD;AAExD,MAAM,QAAQ,GAAmB;IAC/B,CAAC,KAAK,EAAE,IAAI,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAC7C,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAC9C,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,0CAA0C,CAAC,CAAC;IAChE,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,4BAA4B,CAAC,CAAC;IAClD,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,8BAA8B,CAAC,CAAC;IACpD,CAAC,KAAK,EAAE,IAAI,MAAM,CAAC,2BAA2B,CAAC,CAAC;IAChD,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,2BAA2B,CAAC,CAAC;CAClD,CAAC;AAEF,MAAa,UACX,SAAQ,mBAAyC;IAGzC,aAAa,CAAU;IACvB,IAAI,CAAsB;IAClC,uBAAuB,CAA6D;IACpF,eAAe,CAA6C;IACrD,WAAW,CAA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IACrC,cAAc,GAAG,gBAAgB,CAAC,cAAc,CAAC;IACjD,iBAAiB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC;IACvD,wBAAwB,GAAG,gBAAgB,CAAC,wBAAwB,CAAC;IAErE,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC;IACxD,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC;IAExD,aAAa,GAAG,kBAAkB,CAAC,aAAa,CAAC;IAEjD,oBAAoB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC;IACjE,mBAAmB,GAAG,oBAAoB,CAAC,mBAAmB,CAAC;IAE/D,+BAA+B,GAAG,6BAA6B,CAAC,+BAA+B,CAAC;IAChG,iCAAiC,GAAG,6BAA6B,CAAC,iCAAiC,CAAC;IACpG,8BAA8B,GAAG,6BAA6B,CAAC,8BAA8B,CAAC;IAC9F,iBAAiB,GAAG,6BAA6B,CAAC,iBAAiB,CAAC;IAEpE,gBAAgB,GAAG,kBAAkB,CAAC,gBAAgB,CAAC;IAEvD,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;;AA1N3C,gCA2NC;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-map.d.ts","sourceRoot":"","sources":["../../lib/method-map.
|
|
1
|
+
{"version":3,"file":"method-map.d.ts","sourceRoot":"","sources":["../../lib/method-map.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAaf,CAAC"}
|
package/build/lib/method-map.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.newMethodMap = void 0;
|
|
4
|
-
exports.newMethodMap =
|
|
4
|
+
exports.newMethodMap = {
|
|
5
5
|
'/session/:sessionId/appium/start_recording_screen': {
|
|
6
6
|
POST: {
|
|
7
7
|
command: 'startRecordingScreen',
|
|
8
|
-
payloadParams: { optional: ['options'] }
|
|
9
|
-
}
|
|
8
|
+
payloadParams: { optional: ['options'] },
|
|
9
|
+
},
|
|
10
10
|
},
|
|
11
11
|
'/session/:sessionId/appium/stop_recording_screen': {
|
|
12
12
|
POST: {
|
|
13
13
|
command: 'stopRecordingScreen',
|
|
14
|
-
payloadParams: { optional: ['options'] }
|
|
15
|
-
}
|
|
14
|
+
payloadParams: { optional: ['options'] },
|
|
15
|
+
},
|
|
16
16
|
},
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
//# sourceMappingURL=method-map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-map.js","sourceRoot":"","sources":["../../lib/method-map.
|
|
1
|
+
{"version":3,"file":"method-map.js","sourceRoot":"","sources":["../../lib/method-map.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,mDAAmD,EAAE;QACnD,IAAI,EAAE;YACJ,OAAO,EAAE,sBAAsB;YAC/B,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAC;SACvC;KACF;IACD,kDAAkD,EAAE;QAClD,IAAI,EAAE;YACJ,OAAO,EAAE,qBAAqB;YAC9B,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAC;SACvC;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {Constraints} from '@appium/types';
|
|
2
|
+
|
|
3
|
+
const MAC2_CONSTRAINTS = {
|
|
4
|
+
systemPort: {
|
|
5
|
+
isNumber: true,
|
|
6
|
+
},
|
|
7
|
+
systemHost: {
|
|
8
|
+
isString: true,
|
|
9
|
+
},
|
|
10
|
+
showServerLogs: {
|
|
11
|
+
isBoolean: true,
|
|
12
|
+
},
|
|
13
|
+
bootstrapRoot: {
|
|
14
|
+
isString: true,
|
|
15
|
+
},
|
|
16
|
+
serverStartupTimeout: {
|
|
17
|
+
isNumber: true,
|
|
18
|
+
},
|
|
19
|
+
bundleId: {
|
|
20
|
+
isString: true,
|
|
21
|
+
},
|
|
22
|
+
arguments: {
|
|
23
|
+
isArray: true,
|
|
24
|
+
},
|
|
25
|
+
environment: {
|
|
26
|
+
isObject: true,
|
|
27
|
+
},
|
|
28
|
+
noReset: {
|
|
29
|
+
isBoolean: true,
|
|
30
|
+
},
|
|
31
|
+
skipAppKill: {
|
|
32
|
+
isBoolean: true,
|
|
33
|
+
},
|
|
34
|
+
prerun: {
|
|
35
|
+
isObject: true,
|
|
36
|
+
},
|
|
37
|
+
postrun: {
|
|
38
|
+
isObject: true,
|
|
39
|
+
},
|
|
40
|
+
webDriverAgentMacUrl: {
|
|
41
|
+
isString: true,
|
|
42
|
+
},
|
|
43
|
+
appPath: {
|
|
44
|
+
isString: true,
|
|
45
|
+
},
|
|
46
|
+
appLocale: {
|
|
47
|
+
isObject: true,
|
|
48
|
+
},
|
|
49
|
+
appTimeZone: {
|
|
50
|
+
isString: true,
|
|
51
|
+
},
|
|
52
|
+
initialDeeplinkUrl: {
|
|
53
|
+
isString: true,
|
|
54
|
+
},
|
|
55
|
+
} as const satisfies Constraints;
|
|
56
|
+
|
|
57
|
+
export default MAC2_CONSTRAINTS;
|
|
58
|
+
|
|
59
|
+
export type Mac2Constraints = typeof MAC2_CONSTRAINTS;
|
|
60
|
+
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
+
import type {
|
|
3
|
+
RouteMatcher,
|
|
4
|
+
HTTPMethod,
|
|
5
|
+
HTTPBody,
|
|
6
|
+
DefaultCreateSessionResult,
|
|
7
|
+
DriverData,
|
|
8
|
+
InitialOpts,
|
|
9
|
+
StringRecord,
|
|
10
|
+
ExternalDriver,
|
|
11
|
+
DriverCaps,
|
|
12
|
+
DriverOpts,
|
|
13
|
+
W3CDriverCaps,
|
|
14
|
+
} from '@appium/types';
|
|
2
15
|
import { BaseDriver, DeviceSettings } from 'appium/driver';
|
|
3
|
-
import { WDA_MAC_SERVER } from './wda-mac';
|
|
4
|
-
import {
|
|
16
|
+
import { WDA_MAC_SERVER, type WDAMacServer } from './wda-mac';
|
|
17
|
+
import MAC2_CONSTRAINTS, {type Mac2Constraints} from './constraints';
|
|
5
18
|
import * as appManagemenetCommands from './commands/app-management';
|
|
6
19
|
import * as appleScriptCommands from './commands/applescript';
|
|
7
20
|
import * as executeCommands from './commands/execute';
|
|
@@ -12,13 +25,12 @@ import * as recordScreenCommands from './commands/record-screen';
|
|
|
12
25
|
import * as screenshotCommands from './commands/screenshots';
|
|
13
26
|
import * as sourceCommands from './commands/source';
|
|
14
27
|
import * as clipboardCommands from './commands/clipboard';
|
|
28
|
+
import * as nativeScreenRecordingCommands from './commands/native-record-screen';
|
|
15
29
|
import log from './logger';
|
|
16
30
|
import { newMethodMap } from './method-map';
|
|
17
31
|
import { executeMethodMap } from './execute-method-map';
|
|
18
|
-
import * as nativeScreenRecordingCommands from './commands/native-record-screen';
|
|
19
32
|
|
|
20
|
-
|
|
21
|
-
const NO_PROXY = [
|
|
33
|
+
const NO_PROXY: RouteMatcher[] = [
|
|
22
34
|
['GET', new RegExp('^/session/[^/]+/appium')],
|
|
23
35
|
['POST', new RegExp('^/session/[^/]+/appium')],
|
|
24
36
|
['POST', new RegExp('^/session/[^/]+/element/[^/]+/elements?$')],
|
|
@@ -29,23 +41,22 @@ const NO_PROXY = [
|
|
|
29
41
|
['POST', new RegExp('^/session/[^/]+/timeouts$')],
|
|
30
42
|
];
|
|
31
43
|
|
|
32
|
-
export class Mac2Driver
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
export class Mac2Driver
|
|
45
|
+
extends BaseDriver<Mac2Constraints, StringRecord>
|
|
46
|
+
implements ExternalDriver<Mac2Constraints, string, StringRecord>
|
|
47
|
+
{
|
|
48
|
+
private isProxyActive: boolean;
|
|
49
|
+
private _wda: WDAMacServer | null;
|
|
50
|
+
_videoChunksBroadcaster: nativeScreenRecordingCommands.NativeVideoChunksBroadcaster;
|
|
51
|
+
_screenRecorder: recordScreenCommands.ScreenRecorder | null;
|
|
52
|
+
public proxyReqRes: (...args: any) => any;
|
|
41
53
|
|
|
42
54
|
static newMethodMap = newMethodMap;
|
|
43
55
|
static executeMethodMap = executeMethodMap;
|
|
44
56
|
|
|
45
|
-
constructor
|
|
46
|
-
// @ts-ignore TODO: Make opts typed
|
|
57
|
+
constructor(opts: InitialOpts = {} as InitialOpts) {
|
|
47
58
|
super(opts);
|
|
48
|
-
this.desiredCapConstraints =
|
|
59
|
+
this.desiredCapConstraints = _.cloneDeep(MAC2_CONSTRAINTS);
|
|
49
60
|
this.locatorStrategies = [
|
|
50
61
|
'id',
|
|
51
62
|
'name',
|
|
@@ -65,109 +76,128 @@ export class Mac2Driver extends BaseDriver {
|
|
|
65
76
|
this.settings = new DeviceSettings({}, this.onSettingsUpdate.bind(this));
|
|
66
77
|
}
|
|
67
78
|
|
|
68
|
-
async onSettingsUpdate
|
|
69
|
-
|
|
79
|
+
async onSettingsUpdate(key: string, value: unknown): Promise<void> {
|
|
80
|
+
if (!this._wda) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
return await this._wda.proxy.command('/appium/settings', 'POST', {
|
|
70
84
|
settings: {[key]: value}
|
|
71
85
|
});
|
|
72
86
|
}
|
|
73
87
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
this.
|
|
79
|
-
this._videoChunksBroadcaster = new nativeScreenRecordingCommands.NativeVideoChunksBroadcaster(
|
|
80
|
-
this.eventEmitter, this.log
|
|
81
|
-
);
|
|
82
|
-
this._screenRecorder = null;
|
|
88
|
+
get wda(): WDAMacServer {
|
|
89
|
+
if (!this._wda) {
|
|
90
|
+
throw new Error('WDA server is not initialized');
|
|
91
|
+
}
|
|
92
|
+
return this._wda;
|
|
83
93
|
}
|
|
84
94
|
|
|
85
95
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
86
|
-
proxyActive
|
|
96
|
+
override proxyActive(sessionId: string): boolean {
|
|
87
97
|
return this.isProxyActive;
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
91
|
-
getProxyAvoidList
|
|
101
|
+
override getProxyAvoidList(sessionId: string): RouteMatcher[] {
|
|
92
102
|
return NO_PROXY;
|
|
93
103
|
}
|
|
94
104
|
|
|
95
|
-
canProxy
|
|
105
|
+
override canProxy(): boolean {
|
|
96
106
|
return true;
|
|
97
107
|
}
|
|
98
108
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
* @returns {Promise<any>}
|
|
105
|
-
*/
|
|
106
|
-
async proxyCommand (url, method, body = null) {
|
|
107
|
-
return await this.wda.proxy.command(url, method, body);
|
|
109
|
+
async proxyCommand(url: string, method: HTTPMethod, body: HTTPBody = null): Promise<any> {
|
|
110
|
+
if (!this._wda) {
|
|
111
|
+
throw new Error('WDA server is not initialized');
|
|
112
|
+
}
|
|
113
|
+
return await this._wda.proxy.command(url, method, body);
|
|
108
114
|
}
|
|
109
115
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
override async getStatus(): Promise<any> {
|
|
117
|
+
if (!this._wda) {
|
|
118
|
+
throw new Error('WDA server is not initialized');
|
|
119
|
+
}
|
|
120
|
+
return await this._wda.proxy.command('/status', 'GET');
|
|
113
121
|
}
|
|
114
122
|
|
|
115
123
|
// needed to make image plugin work
|
|
116
|
-
async getWindowRect
|
|
117
|
-
|
|
124
|
+
async getWindowRect(): Promise<any> {
|
|
125
|
+
if (!this._wda) {
|
|
126
|
+
throw new Error('WDA server is not initialized');
|
|
127
|
+
}
|
|
128
|
+
return await this._wda.proxy.command('/window/rect', 'GET');
|
|
118
129
|
}
|
|
119
130
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
override async createSession(
|
|
132
|
+
w3cCaps1: W3CMac2DriverCaps,
|
|
133
|
+
w3cCaps2?: W3CMac2DriverCaps,
|
|
134
|
+
w3cCaps3?: W3CMac2DriverCaps,
|
|
135
|
+
driverData?: DriverData[]
|
|
136
|
+
): Promise<DefaultCreateSessionResult<Mac2Constraints>> {
|
|
137
|
+
const [sessionId, caps] = await super.createSession(w3cCaps1, w3cCaps2, w3cCaps3, driverData);
|
|
138
|
+
this._wda = WDA_MAC_SERVER;
|
|
139
|
+
this.caps = caps as Mac2DriverCaps;
|
|
140
|
+
this.opts = this.opts as Mac2DriverOpts;
|
|
125
141
|
try {
|
|
126
|
-
|
|
127
|
-
|
|
142
|
+
const prerun = caps.prerun as PrerunCapability | undefined;
|
|
143
|
+
if (prerun) {
|
|
144
|
+
if (!_.isString(prerun.command) && !_.isString(prerun.script)) {
|
|
128
145
|
throw new Error(`'prerun' capability value must either contain ` +
|
|
129
146
|
`'script' or 'command' entry of string type`);
|
|
130
147
|
}
|
|
131
148
|
log.info('Executing prerun AppleScript');
|
|
132
|
-
const output = await this.macosExecAppleScript(
|
|
149
|
+
const output = await this.macosExecAppleScript(
|
|
150
|
+
prerun.script,
|
|
151
|
+
undefined,
|
|
152
|
+
prerun.command
|
|
153
|
+
);
|
|
133
154
|
if (_.trim(output)) {
|
|
134
155
|
log.info(`Prerun script output: ${output}`);
|
|
135
156
|
}
|
|
136
157
|
}
|
|
137
|
-
await this.
|
|
158
|
+
await this._wda.startSession(caps, {
|
|
138
159
|
reqBasePath: this.basePath,
|
|
139
160
|
});
|
|
140
|
-
} catch (e) {
|
|
161
|
+
} catch (e: any) {
|
|
141
162
|
await this.deleteSession();
|
|
142
163
|
throw e;
|
|
143
164
|
}
|
|
144
|
-
this.proxyReqRes = this.wda.proxy.proxyReqRes.bind(this.
|
|
165
|
+
this.proxyReqRes = this.wda.proxy.proxyReqRes.bind(this._wda.proxy);
|
|
145
166
|
this.isProxyActive = true;
|
|
146
167
|
return [sessionId, caps];
|
|
147
168
|
}
|
|
148
169
|
|
|
149
|
-
async deleteSession
|
|
170
|
+
override async deleteSession(): Promise<void> {
|
|
150
171
|
await this._screenRecorder?.stop(true);
|
|
151
172
|
if (this._videoChunksBroadcaster.hasPublishers) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
173
|
+
if (this._wda) {
|
|
174
|
+
try {
|
|
175
|
+
await this.wda.proxy.command('/wda/video/stop', 'POST', {});
|
|
176
|
+
} catch {}
|
|
177
|
+
}
|
|
155
178
|
await this._videoChunksBroadcaster.shutdown(5000);
|
|
156
179
|
}
|
|
157
|
-
|
|
180
|
+
if (this._wda) {
|
|
181
|
+
await this.wda.stopSession();
|
|
182
|
+
}
|
|
158
183
|
|
|
159
|
-
|
|
160
|
-
|
|
184
|
+
const postrun = this.opts.postrun as PostrunCapability | undefined;
|
|
185
|
+
if (postrun) {
|
|
186
|
+
if (!_.isString(postrun.command) && !_.isString(postrun.script)) {
|
|
161
187
|
log.error(`'postrun' capability value must either contain ` +
|
|
162
188
|
`'script' or 'command' entry of string type`);
|
|
163
189
|
} else {
|
|
164
190
|
log.info('Executing postrun AppleScript');
|
|
165
191
|
try {
|
|
166
|
-
const output = await this.macosExecAppleScript(
|
|
192
|
+
const output = await this.macosExecAppleScript(
|
|
193
|
+
postrun.script,
|
|
194
|
+
undefined,
|
|
195
|
+
postrun.command
|
|
196
|
+
);
|
|
167
197
|
if (_.trim(output)) {
|
|
168
198
|
log.info(`Postrun script output: ${output}`);
|
|
169
199
|
}
|
|
170
|
-
} catch (e) {
|
|
200
|
+
} catch (e: any) {
|
|
171
201
|
log.error(e.message);
|
|
172
202
|
}
|
|
173
203
|
}
|
|
@@ -178,6 +208,15 @@ export class Mac2Driver extends BaseDriver {
|
|
|
178
208
|
await super.deleteSession();
|
|
179
209
|
}
|
|
180
210
|
|
|
211
|
+
private resetState(): void {
|
|
212
|
+
this._wda = null;
|
|
213
|
+
this.isProxyActive = false;
|
|
214
|
+
this._videoChunksBroadcaster = new nativeScreenRecordingCommands.NativeVideoChunksBroadcaster(
|
|
215
|
+
this.eventEmitter, this.log
|
|
216
|
+
);
|
|
217
|
+
this._screenRecorder = null;
|
|
218
|
+
}
|
|
219
|
+
|
|
181
220
|
macosLaunchApp = appManagemenetCommands.macosLaunchApp;
|
|
182
221
|
macosActivateApp = appManagemenetCommands.macosActivateApp;
|
|
183
222
|
macosTerminateApp = appManagemenetCommands.macosTerminateApp;
|
|
@@ -224,3 +263,17 @@ export class Mac2Driver extends BaseDriver {
|
|
|
224
263
|
}
|
|
225
264
|
|
|
226
265
|
export default Mac2Driver;
|
|
266
|
+
|
|
267
|
+
interface PrerunCapability {
|
|
268
|
+
command?: string;
|
|
269
|
+
script?: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
interface PostrunCapability {
|
|
273
|
+
command?: string;
|
|
274
|
+
script?: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
type Mac2DriverOpts = DriverOpts<Mac2Constraints>;
|
|
278
|
+
type Mac2DriverCaps = DriverCaps<Mac2Constraints>;
|
|
279
|
+
type W3CMac2DriverCaps = W3CDriverCaps<Mac2Constraints>;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export const newMethodMap =
|
|
1
|
+
export const newMethodMap = {
|
|
2
2
|
'/session/:sessionId/appium/start_recording_screen': {
|
|
3
3
|
POST: {
|
|
4
4
|
command: 'startRecordingScreen',
|
|
5
|
-
payloadParams: {
|
|
6
|
-
}
|
|
5
|
+
payloadParams: {optional: ['options']},
|
|
6
|
+
},
|
|
7
7
|
},
|
|
8
8
|
'/session/:sessionId/appium/stop_recording_screen': {
|
|
9
9
|
POST: {
|
|
10
10
|
command: 'stopRecordingScreen',
|
|
11
|
-
payloadParams: {
|
|
12
|
-
}
|
|
11
|
+
payloadParams: {optional: ['options']},
|
|
12
|
+
},
|
|
13
13
|
},
|
|
14
|
-
}
|
|
14
|
+
} as const;
|
|
15
|
+
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-mac2-driver",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-mac2-driver",
|
|
9
|
-
"version": "3.2.
|
|
9
|
+
"version": "3.2.2",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@appium/strongbox": "^1.0.0-rc.1",
|
|
@@ -296,9 +296,9 @@
|
|
|
296
296
|
}
|
|
297
297
|
},
|
|
298
298
|
"node_modules/@emnapi/runtime": {
|
|
299
|
-
"version": "1.7.
|
|
300
|
-
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.
|
|
301
|
-
"integrity": "sha512-
|
|
299
|
+
"version": "1.7.1",
|
|
300
|
+
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz",
|
|
301
|
+
"integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==",
|
|
302
302
|
"license": "MIT",
|
|
303
303
|
"optional": true,
|
|
304
304
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export namespace desiredCapConstraints {
|
|
2
|
-
namespace systemPort {
|
|
3
|
-
let isNumber: boolean;
|
|
4
|
-
}
|
|
5
|
-
namespace systemHost {
|
|
6
|
-
let isString: boolean;
|
|
7
|
-
}
|
|
8
|
-
namespace showServerLogs {
|
|
9
|
-
let isBoolean: boolean;
|
|
10
|
-
}
|
|
11
|
-
namespace bootstrapRoot {
|
|
12
|
-
let isString_1: boolean;
|
|
13
|
-
export { isString_1 as isString };
|
|
14
|
-
}
|
|
15
|
-
namespace serverStartupTimeout {
|
|
16
|
-
let isNumber_1: boolean;
|
|
17
|
-
export { isNumber_1 as isNumber };
|
|
18
|
-
}
|
|
19
|
-
namespace bundleId {
|
|
20
|
-
let isString_2: boolean;
|
|
21
|
-
export { isString_2 as isString };
|
|
22
|
-
}
|
|
23
|
-
namespace arguments {
|
|
24
|
-
let isArray: boolean;
|
|
25
|
-
}
|
|
26
|
-
namespace environment {
|
|
27
|
-
let isObject: boolean;
|
|
28
|
-
}
|
|
29
|
-
namespace noReset {
|
|
30
|
-
let isBoolean_1: boolean;
|
|
31
|
-
export { isBoolean_1 as isBoolean };
|
|
32
|
-
}
|
|
33
|
-
namespace skipAppKill {
|
|
34
|
-
let isBoolean_2: boolean;
|
|
35
|
-
export { isBoolean_2 as isBoolean };
|
|
36
|
-
}
|
|
37
|
-
namespace prerun {
|
|
38
|
-
let isObject_1: boolean;
|
|
39
|
-
export { isObject_1 as isObject };
|
|
40
|
-
}
|
|
41
|
-
namespace postrun {
|
|
42
|
-
let isObject_2: boolean;
|
|
43
|
-
export { isObject_2 as isObject };
|
|
44
|
-
}
|
|
45
|
-
namespace webDriverAgentMacUrl {
|
|
46
|
-
let isString_3: boolean;
|
|
47
|
-
export { isString_3 as isString };
|
|
48
|
-
}
|
|
49
|
-
namespace appPath {
|
|
50
|
-
let isString_4: boolean;
|
|
51
|
-
export { isString_4 as isString };
|
|
52
|
-
}
|
|
53
|
-
namespace appLocale {
|
|
54
|
-
let isObject_3: boolean;
|
|
55
|
-
export { isObject_3 as isObject };
|
|
56
|
-
}
|
|
57
|
-
namespace appTimeZone {
|
|
58
|
-
let isString_5: boolean;
|
|
59
|
-
export { isString_5 as isString };
|
|
60
|
-
}
|
|
61
|
-
namespace initialDeeplinkUrl {
|
|
62
|
-
let isString_6: boolean;
|
|
63
|
-
export { isString_6 as isString };
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=desired-caps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"desired-caps.d.ts","sourceRoot":"","sources":["../../lib/desired-caps.js"],"names":[],"mappings":""}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.desiredCapConstraints = void 0;
|
|
4
|
-
const desiredCapConstraints = {
|
|
5
|
-
systemPort: {
|
|
6
|
-
isNumber: true
|
|
7
|
-
},
|
|
8
|
-
systemHost: {
|
|
9
|
-
isString: true
|
|
10
|
-
},
|
|
11
|
-
showServerLogs: {
|
|
12
|
-
isBoolean: true
|
|
13
|
-
},
|
|
14
|
-
bootstrapRoot: {
|
|
15
|
-
isString: true
|
|
16
|
-
},
|
|
17
|
-
serverStartupTimeout: {
|
|
18
|
-
isNumber: true
|
|
19
|
-
},
|
|
20
|
-
bundleId: {
|
|
21
|
-
isString: true
|
|
22
|
-
},
|
|
23
|
-
arguments: {
|
|
24
|
-
isArray: true
|
|
25
|
-
},
|
|
26
|
-
environment: {
|
|
27
|
-
isObject: true
|
|
28
|
-
},
|
|
29
|
-
noReset: {
|
|
30
|
-
isBoolean: true
|
|
31
|
-
},
|
|
32
|
-
skipAppKill: {
|
|
33
|
-
isBoolean: true
|
|
34
|
-
},
|
|
35
|
-
prerun: {
|
|
36
|
-
isObject: true
|
|
37
|
-
},
|
|
38
|
-
postrun: {
|
|
39
|
-
isObject: true
|
|
40
|
-
},
|
|
41
|
-
webDriverAgentMacUrl: {
|
|
42
|
-
isString: true
|
|
43
|
-
},
|
|
44
|
-
appPath: {
|
|
45
|
-
isString: true
|
|
46
|
-
},
|
|
47
|
-
appLocale: {
|
|
48
|
-
isObject: true
|
|
49
|
-
},
|
|
50
|
-
appTimeZone: {
|
|
51
|
-
isString: true
|
|
52
|
-
},
|
|
53
|
-
initialDeeplinkUrl: {
|
|
54
|
-
isString: true
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
exports.desiredCapConstraints = desiredCapConstraints;
|
|
58
|
-
//# sourceMappingURL=desired-caps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"desired-caps.js","sourceRoot":"","sources":["../../lib/desired-caps.js"],"names":[],"mappings":";;;AAAA,MAAM,qBAAqB,GAAG;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,SAAS,EAAE,IAAI;KAChB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,IAAI;KACf;IACD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;KACd;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,SAAS,EAAE,IAAI;KAChB;IACD,WAAW,EAAE;QACX,SAAS,EAAE,IAAI;KAChB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,IAAI;KACf;IACD,oBAAoB,EAAE;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,IAAI;KACf;IACD,kBAAkB,EAAE;QAClB,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEO,sDAAqB"}
|
package/lib/desired-caps.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
const desiredCapConstraints = {
|
|
2
|
-
systemPort: {
|
|
3
|
-
isNumber: true
|
|
4
|
-
},
|
|
5
|
-
systemHost: {
|
|
6
|
-
isString: true
|
|
7
|
-
},
|
|
8
|
-
showServerLogs: {
|
|
9
|
-
isBoolean: true
|
|
10
|
-
},
|
|
11
|
-
bootstrapRoot: {
|
|
12
|
-
isString: true
|
|
13
|
-
},
|
|
14
|
-
serverStartupTimeout: {
|
|
15
|
-
isNumber: true
|
|
16
|
-
},
|
|
17
|
-
bundleId: {
|
|
18
|
-
isString: true
|
|
19
|
-
},
|
|
20
|
-
arguments: {
|
|
21
|
-
isArray: true
|
|
22
|
-
},
|
|
23
|
-
environment: {
|
|
24
|
-
isObject: true
|
|
25
|
-
},
|
|
26
|
-
noReset: {
|
|
27
|
-
isBoolean: true
|
|
28
|
-
},
|
|
29
|
-
skipAppKill: {
|
|
30
|
-
isBoolean: true
|
|
31
|
-
},
|
|
32
|
-
prerun: {
|
|
33
|
-
isObject: true
|
|
34
|
-
},
|
|
35
|
-
postrun: {
|
|
36
|
-
isObject: true
|
|
37
|
-
},
|
|
38
|
-
webDriverAgentMacUrl: {
|
|
39
|
-
isString: true
|
|
40
|
-
},
|
|
41
|
-
appPath: {
|
|
42
|
-
isString: true
|
|
43
|
-
},
|
|
44
|
-
appLocale: {
|
|
45
|
-
isObject: true
|
|
46
|
-
},
|
|
47
|
-
appTimeZone: {
|
|
48
|
-
isString: true
|
|
49
|
-
},
|
|
50
|
-
initialDeeplinkUrl: {
|
|
51
|
-
isString: true
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export { desiredCapConstraints };
|