appium-remote-debugger 11.4.2 → 11.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/lib/mixins/connect.d.ts +30 -56
- package/build/lib/mixins/connect.d.ts.map +1 -1
- package/build/lib/mixins/connect.js +57 -90
- package/build/lib/mixins/connect.js.map +1 -1
- package/build/lib/mixins/cookies.d.ts +22 -0
- package/build/lib/mixins/cookies.d.ts.map +1 -0
- package/build/lib/mixins/cookies.js +48 -0
- package/build/lib/mixins/cookies.js.map +1 -0
- package/build/lib/mixins/events.d.ts +17 -2
- package/build/lib/mixins/events.d.ts.map +1 -1
- package/build/lib/mixins/events.js +29 -2
- package/build/lib/mixins/events.js.map +1 -1
- package/build/lib/mixins/execute.d.ts +5 -12
- package/build/lib/mixins/execute.d.ts.map +1 -1
- package/build/lib/mixins/execute.js +18 -30
- package/build/lib/mixins/execute.js.map +1 -1
- package/build/lib/mixins/message-handlers.d.ts +13 -23
- package/build/lib/mixins/message-handlers.d.ts.map +1 -1
- package/build/lib/mixins/message-handlers.js +56 -27
- package/build/lib/mixins/message-handlers.js.map +1 -1
- package/build/lib/mixins/misc.d.ts +51 -0
- package/build/lib/mixins/misc.d.ts.map +1 -0
- package/build/lib/mixins/misc.js +132 -0
- package/build/lib/mixins/misc.js.map +1 -0
- package/build/lib/mixins/navigate.d.ts +20 -29
- package/build/lib/mixins/navigate.d.ts.map +1 -1
- package/build/lib/mixins/navigate.js +25 -23
- package/build/lib/mixins/navigate.js.map +1 -1
- package/build/lib/mixins/screenshot.d.ts +13 -0
- package/build/lib/mixins/screenshot.d.ts.map +1 -0
- package/build/lib/mixins/screenshot.js +31 -0
- package/build/lib/mixins/screenshot.js.map +1 -0
- package/build/lib/remote-debugger-real-device.d.ts +16 -2
- package/build/lib/remote-debugger-real-device.d.ts.map +1 -1
- package/build/lib/remote-debugger-real-device.js +11 -1
- package/build/lib/remote-debugger-real-device.js.map +1 -1
- package/build/lib/remote-debugger.d.ts +153 -174
- package/build/lib/remote-debugger.d.ts.map +1 -1
- package/build/lib/remote-debugger.js +147 -213
- package/build/lib/remote-debugger.js.map +1 -1
- package/build/lib/rpc/rpc-client.d.ts +2 -1
- package/build/lib/rpc/rpc-client.d.ts.map +1 -1
- package/build/lib/rpc/rpc-client.js +2 -0
- package/build/lib/rpc/rpc-client.js.map +1 -1
- package/build/lib/utils.d.ts +20 -16
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +33 -25
- package/build/lib/utils.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/mixins/connect.js +61 -105
- package/lib/mixins/cookies.js +45 -0
- package/lib/mixins/events.js +25 -1
- package/lib/mixins/execute.js +18 -39
- package/lib/mixins/message-handlers.js +67 -36
- package/lib/mixins/misc.js +128 -0
- package/lib/mixins/navigate.js +26 -30
- package/lib/mixins/screenshot.js +34 -0
- package/lib/remote-debugger-real-device.js +14 -1
- package/lib/remote-debugger.js +133 -305
- package/lib/rpc/rpc-client.js +3 -1
- package/lib/utils.js +42 -38
- package/package.json +1 -1
- package/build/lib/mixins/index.d.ts +0 -5
- package/build/lib/mixins/index.d.ts.map +0 -1
- package/build/lib/mixins/index.js +0 -16
- package/build/lib/mixins/index.js.map +0 -1
- package/lib/mixins/index.js +0 -14
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.events = void 0;
|
|
4
|
+
exports.addClientEventListener = addClientEventListener;
|
|
5
|
+
exports.removeClientEventListener = removeClientEventListener;
|
|
3
6
|
// event emitted publically
|
|
4
|
-
|
|
7
|
+
exports.events = {
|
|
5
8
|
EVENT_PAGE_CHANGE: 'remote_debugger_page_change',
|
|
6
9
|
EVENT_FRAMES_DETACHED: 'remote_debugger_frames_detached',
|
|
7
10
|
EVENT_DISCONNECT: 'remote_debugger_disconnect',
|
|
8
11
|
};
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Keep track of the client event listeners so they can be removed
|
|
14
|
+
*
|
|
15
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
16
|
+
* @param {string} eventName
|
|
17
|
+
* @param {(event: import('@appium/types').StringRecord) => any} listener
|
|
18
|
+
* @returns {void}
|
|
19
|
+
*/
|
|
20
|
+
function addClientEventListener(eventName, listener) {
|
|
21
|
+
var _a;
|
|
22
|
+
(_a = this._clientEventListeners)[eventName] ?? (_a[eventName] = []);
|
|
23
|
+
this._clientEventListeners[eventName].push(listener);
|
|
24
|
+
this.requireRpcClient().on(eventName, listener);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
28
|
+
* @param {string} eventName
|
|
29
|
+
* @returns {void}
|
|
30
|
+
*/
|
|
31
|
+
function removeClientEventListener(eventName) {
|
|
32
|
+
for (const listener of (this._clientEventListeners[eventName] || [])) {
|
|
33
|
+
this.requireRpcClient().off(eventName, listener);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = exports.events;
|
|
10
37
|
//# sourceMappingURL=events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../lib/mixins/events.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../lib/mixins/events.js"],"names":[],"mappings":";;;AAeA,wDAIC;AAOD,8DAIC;AA9BD,2BAA2B;AACd,QAAA,MAAM,GAAG;IACpB,iBAAiB,EAAE,6BAA6B;IAChD,qBAAqB,EAAE,iCAAiC;IACxD,gBAAgB,EAAE,4BAA4B;CAC/C,CAAC;AAEF;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAE,SAAS,EAAE,QAAQ;;IACzD,MAAA,IAAI,CAAC,qBAAqB,EAAC,SAAS,SAAT,SAAS,IAAM,EAAE,EAAC;IAC7C,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAClD,CAAC;AAED;;;;GAIG;AACH,SAAgB,yBAAyB,CAAE,SAAS;IAClD,KAAK,MAAM,QAAQ,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QACrE,IAAI,CAAC,gBAAgB,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AAED,kBAAe,cAAM,CAAC"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
export { executeAtom };
|
|
3
|
-
export { executeAtomAsync };
|
|
4
|
-
export { execute };
|
|
5
|
-
export { callFunction };
|
|
6
|
-
}
|
|
7
|
-
export default _default;
|
|
8
1
|
/**
|
|
9
2
|
* Execute a Selenium atom in Safari
|
|
10
3
|
* @param {string} atom Name of Selenium atom (see atoms/ directory)
|
|
11
4
|
* @param {any[]} args Arguments passed to the atom
|
|
12
5
|
* @param {string[]} frames
|
|
13
|
-
* @returns {Promise<
|
|
6
|
+
* @returns {Promise<any>} The result received from the atom
|
|
14
7
|
*/
|
|
15
|
-
|
|
8
|
+
export function executeAtom(atom: string, args?: any[], frames?: string[]): Promise<any>;
|
|
16
9
|
/**
|
|
17
10
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
18
11
|
* @param {string} atom
|
|
@@ -20,19 +13,19 @@ declare function executeAtom(atom: string, args?: any[], frames?: string[]): Pro
|
|
|
20
13
|
* @param {string[]} [frames]
|
|
21
14
|
* @returns {Promise<any>}
|
|
22
15
|
*/
|
|
23
|
-
|
|
16
|
+
export function executeAtomAsync(this: import("../remote-debugger").RemoteDebugger, atom: string, args?: any[] | undefined, frames?: string[] | undefined): Promise<any>;
|
|
24
17
|
/**
|
|
25
18
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
26
19
|
* @param {string} command
|
|
27
20
|
* @param {boolean} [override]
|
|
28
21
|
* @returns {Promise<any>}
|
|
29
22
|
*/
|
|
30
|
-
|
|
23
|
+
export function execute(this: import("../remote-debugger").RemoteDebugger, command: string, override?: boolean | undefined): Promise<any>;
|
|
31
24
|
/**
|
|
32
25
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
33
26
|
* @param {string} objectId
|
|
34
27
|
* @param {any} fn
|
|
35
28
|
* @param {any[]} [args]
|
|
36
29
|
*/
|
|
37
|
-
|
|
30
|
+
export function callFunction(this: import("../remote-debugger").RemoteDebugger, objectId: string, fn: any, args?: any[] | undefined): Promise<any>;
|
|
38
31
|
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../lib/mixins/execute.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../lib/mixins/execute.js"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,kCALW,MAAM,SACN,GAAG,EAAE,WACL,MAAM,EAAE,GACN,OAAO,CAAC,GAAG,CAAC,CAQxB;AAED;;;;;;GAMG;AACH,0FALW,MAAM,4DAGJ,OAAO,CAAC,GAAG,CAAC,CAoFxB;AAED;;;;;GAKG;AACH,oFAJW,MAAM,mCAEJ,OAAO,CAAC,GAAG,CAAC,CA4BxB;AAED;;;;;GAKG;AACH,0FAJW,MAAM,MACN,GAAG,0CAqBb"}
|
|
@@ -3,7 +3,10 @@ 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
|
-
|
|
6
|
+
exports.executeAtom = executeAtom;
|
|
7
|
+
exports.executeAtomAsync = executeAtomAsync;
|
|
8
|
+
exports.execute = execute;
|
|
9
|
+
exports.callFunction = callFunction;
|
|
7
10
|
const base_driver_1 = require("@appium/base-driver");
|
|
8
11
|
const utils_1 = require("../utils");
|
|
9
12
|
const atoms_1 = require("../atoms");
|
|
@@ -17,16 +20,13 @@ const RPC_RESPONSE_TIMEOUT_MS = 5000;
|
|
|
17
20
|
* @param {string} atom Name of Selenium atom (see atoms/ directory)
|
|
18
21
|
* @param {any[]} args Arguments passed to the atom
|
|
19
22
|
* @param {string[]} frames
|
|
20
|
-
* @returns {Promise<
|
|
23
|
+
* @returns {Promise<any>} The result received from the atom
|
|
21
24
|
*/
|
|
22
25
|
async function executeAtom(atom, args = [], frames = []) {
|
|
23
|
-
|
|
24
|
-
throw new Error('Remote debugger is not connected');
|
|
25
|
-
}
|
|
26
|
-
logger_1.default.debug(`Executing atom '${atom}' with 'args=${JSON.stringify(args)}; frames=${frames}'`);
|
|
26
|
+
this.log.debug(`Executing atom '${atom}' with 'args=${JSON.stringify(args)}; frames=${frames}'`);
|
|
27
27
|
const script = await (0, atoms_1.getScriptForAtom)(atom, args, frames);
|
|
28
28
|
const value = await this.execute(script, true);
|
|
29
|
-
|
|
29
|
+
this.log.debug(`Received result for atom '${atom}' execution: ${lodash_1.default.truncate((0, utils_1.simpleStringify)(value), { length: utils_1.RESPONSE_LOG_LENGTH })}`);
|
|
30
30
|
return value;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -38,16 +38,11 @@ async function executeAtom(atom, args = [], frames = []) {
|
|
|
38
38
|
*/
|
|
39
39
|
async function executeAtomAsync(atom, args = [], frames = []) {
|
|
40
40
|
// helper to send directly to the web inspector
|
|
41
|
-
const evaluate = async (method, opts) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
appIdKey: this.appIdKey,
|
|
47
|
-
pageIdKey: this.pageIdKey,
|
|
48
|
-
returnByValue: false,
|
|
49
|
-
}, opts));
|
|
50
|
-
};
|
|
41
|
+
const evaluate = async (method, opts) => await this.requireRpcClient(true).send(method, Object.assign({
|
|
42
|
+
appIdKey: this.appIdKey,
|
|
43
|
+
pageIdKey: this.pageIdKey,
|
|
44
|
+
returnByValue: false,
|
|
45
|
+
}, opts));
|
|
51
46
|
// first create a Promise on the page, saving the resolve/reject functions
|
|
52
47
|
// as properties
|
|
53
48
|
const promiseName = `appiumAsyncExecutePromise${support_1.util.uuidV4().replace(/-/g, '')}`;
|
|
@@ -90,7 +85,7 @@ async function executeAtomAsync(atom, args = [], frames = []) {
|
|
|
90
85
|
// if the timeout math turns up 0 retries, make sure it happens once
|
|
91
86
|
const retries = parseInt(`${timeout / retryWait}`, 10) || 1;
|
|
92
87
|
const timer = new support_1.timing.Timer().start();
|
|
93
|
-
|
|
88
|
+
this.log.debug(`Waiting up to ${timeout}ms for async execute to finish`);
|
|
94
89
|
res = await (0, asyncbox_1.retryInterval)(retries, retryWait, async () => {
|
|
95
90
|
// the atom _will_ return, either because it finished or an error
|
|
96
91
|
// including a timeout error
|
|
@@ -129,7 +124,7 @@ async function executeAtomAsync(atom, args = [], frames = []) {
|
|
|
129
124
|
async function execute(command, override) {
|
|
130
125
|
// if the page is not loaded yet, wait for it
|
|
131
126
|
if (this.pageLoading && !override) {
|
|
132
|
-
|
|
127
|
+
this.log.debug('Trying to execute but page is not loaded.');
|
|
133
128
|
await this.waitForDom();
|
|
134
129
|
}
|
|
135
130
|
if (lodash_1.default.isNil(this.appIdKey)) {
|
|
@@ -141,11 +136,8 @@ async function execute(command, override) {
|
|
|
141
136
|
if (this.garbageCollectOnExecute) {
|
|
142
137
|
await this.garbageCollect();
|
|
143
138
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
throw new Error('Remote debugger is not connected');
|
|
147
|
-
}
|
|
148
|
-
const res = await this.rpcClient.send('Runtime.evaluate', {
|
|
139
|
+
this.log.debug(`Sending javascript command: '${lodash_1.default.truncate(command, { length: 50 })}'`);
|
|
140
|
+
const res = await this.requireRpcClient(true).send('Runtime.evaluate', {
|
|
149
141
|
expression: command,
|
|
150
142
|
returnByValue: true,
|
|
151
143
|
appIdKey: this.appIdKey,
|
|
@@ -160,15 +152,12 @@ async function execute(command, override) {
|
|
|
160
152
|
* @param {any[]} [args]
|
|
161
153
|
*/
|
|
162
154
|
async function callFunction(objectId, fn, args) {
|
|
163
|
-
if (!this.rpcClient?.isConnected) {
|
|
164
|
-
throw new Error('Remote debugger is not connected');
|
|
165
|
-
}
|
|
166
155
|
(0, utils_1.checkParams)({ appIdKey: this.appIdKey, pageIdKey: this.pageIdKey });
|
|
167
156
|
if (this.garbageCollectOnExecute) {
|
|
168
157
|
await this.garbageCollect();
|
|
169
158
|
}
|
|
170
|
-
|
|
171
|
-
const res = await this.
|
|
159
|
+
this.log.debug('Calling javascript function');
|
|
160
|
+
const res = await this.requireRpcClient(true).send('Runtime.callFunctionOn', {
|
|
172
161
|
objectId,
|
|
173
162
|
functionDeclaration: fn,
|
|
174
163
|
arguments: args,
|
|
@@ -178,5 +167,4 @@ async function callFunction(objectId, fn, args) {
|
|
|
178
167
|
});
|
|
179
168
|
return (0, utils_1.convertResult)(res);
|
|
180
169
|
}
|
|
181
|
-
exports.default = { executeAtom, executeAtomAsync, execute, callFunction };
|
|
182
170
|
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/mixins/execute.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/mixins/execute.js"],"names":[],"mappings":";;;;;AAkBA,kCAMC;AASD,4CAkFC;AAQD,0BA0BC;AAQD,oCAkBC;AA/KD,qDAA6C;AAC7C,oCAA4F;AAC5F,oCAA4C;AAC5C,6CAA+C;AAC/C,uCAAyC;AACzC,oDAAuB;AAGvB,qFAAqF;AACrF,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAErC;;;;;;GAMG;AAC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;IAC9C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,wBAAwB,EAAE;QAC3E,QAAQ;QACR,mBAAmB,EAAE,EAAE;QACvB,SAAS,EAAE,IAAI;QACf,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B,CAAC,CAAC;IAEH,OAAO,IAAA,qBAAa,EAAC,GAAG,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
export default messageHandlers;
|
|
2
|
-
declare namespace messageHandlers {
|
|
3
|
-
export { onPageChange };
|
|
4
|
-
export { onAppConnect };
|
|
5
|
-
export { onAppDisconnect };
|
|
6
|
-
export { onAppUpdate };
|
|
7
|
-
export { onConnectedDriverList };
|
|
8
|
-
export { onCurrentState };
|
|
9
|
-
export { onConnectedApplicationList };
|
|
10
|
-
}
|
|
11
1
|
/**
|
|
12
2
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
13
3
|
* @param {Error?} err
|
|
@@ -15,29 +5,29 @@ declare namespace messageHandlers {
|
|
|
15
5
|
* @param {Record<string, any>} pageDict
|
|
16
6
|
* @returns {Promise<void>}
|
|
17
7
|
*/
|
|
18
|
-
|
|
8
|
+
export function onPageChange(this: import("../remote-debugger").RemoteDebugger, err: Error | null, appIdKey: string, pageDict: Record<string, any>): Promise<void>;
|
|
19
9
|
/**
|
|
20
10
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
21
11
|
* @param {Error?} err
|
|
22
12
|
* @param {Record<string, any>} dict
|
|
23
13
|
* @returns {Promise<void>}
|
|
24
14
|
*/
|
|
25
|
-
|
|
15
|
+
export function onAppConnect(this: import("../remote-debugger").RemoteDebugger, err: Error | null, dict: Record<string, any>): Promise<void>;
|
|
26
16
|
/**
|
|
27
17
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
28
18
|
* @param {Error?} err
|
|
29
19
|
* @param {Record<string, any>} dict
|
|
30
20
|
* @returns {void}
|
|
31
21
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
export function onAppDisconnect(this: import("../remote-debugger").RemoteDebugger, err: Error | null, dict: Record<string, any>): void;
|
|
23
|
+
export class onAppDisconnect {
|
|
34
24
|
/**
|
|
35
25
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
36
26
|
* @param {Error?} err
|
|
37
27
|
* @param {Record<string, any>} dict
|
|
38
28
|
* @returns {void}
|
|
39
29
|
*/
|
|
40
|
-
constructor(this: import("../remote-debugger").
|
|
30
|
+
constructor(this: import("../remote-debugger").RemoteDebugger, err: Error | null, dict: Record<string, any>);
|
|
41
31
|
appIdKey: string | undefined;
|
|
42
32
|
connected: boolean | undefined;
|
|
43
33
|
}
|
|
@@ -47,22 +37,22 @@ declare class onAppDisconnect {
|
|
|
47
37
|
* @param {Record<string, any>} dict
|
|
48
38
|
* @returns {Promise<void>}
|
|
49
39
|
*/
|
|
50
|
-
|
|
40
|
+
export function onAppUpdate(this: import("../remote-debugger").RemoteDebugger, err: Error | null, dict: Record<string, any>): Promise<void>;
|
|
51
41
|
/**
|
|
52
42
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
53
43
|
* @param {Error?} err
|
|
54
44
|
* @param {Record<string, any>} drivers
|
|
55
45
|
* @returns {void}
|
|
56
46
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
export function onConnectedDriverList(this: import("../remote-debugger").RemoteDebugger, err: Error | null, drivers: Record<string, any>): void;
|
|
48
|
+
export class onConnectedDriverList {
|
|
59
49
|
/**
|
|
60
50
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
61
51
|
* @param {Error?} err
|
|
62
52
|
* @param {Record<string, any>} drivers
|
|
63
53
|
* @returns {void}
|
|
64
54
|
*/
|
|
65
|
-
constructor(this: import("../remote-debugger").
|
|
55
|
+
constructor(this: import("../remote-debugger").RemoteDebugger, err: Error | null, drivers: Record<string, any>);
|
|
66
56
|
connectedDrivers: any;
|
|
67
57
|
}
|
|
68
58
|
/**
|
|
@@ -71,15 +61,15 @@ declare class onConnectedDriverList {
|
|
|
71
61
|
* @param {Record<string, any>} state
|
|
72
62
|
* @returns {void}
|
|
73
63
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
export function onCurrentState(this: import("../remote-debugger").RemoteDebugger, err: Error | null, state: Record<string, any>): void;
|
|
65
|
+
export class onCurrentState {
|
|
76
66
|
/**
|
|
77
67
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
78
68
|
* @param {Error?} err
|
|
79
69
|
* @param {Record<string, any>} state
|
|
80
70
|
* @returns {void}
|
|
81
71
|
*/
|
|
82
|
-
constructor(this: import("../remote-debugger").
|
|
72
|
+
constructor(this: import("../remote-debugger").RemoteDebugger, err: Error | null, state: Record<string, any>);
|
|
83
73
|
currentState: any;
|
|
84
74
|
}
|
|
85
75
|
/**
|
|
@@ -88,5 +78,5 @@ declare class onCurrentState {
|
|
|
88
78
|
* @param {Record<string, any>} apps
|
|
89
79
|
* @returns {Promise<void>}
|
|
90
80
|
*/
|
|
91
|
-
|
|
81
|
+
export function onConnectedApplicationList(this: import("../remote-debugger").RemoteDebugger, err: Error | null, apps: Record<string, any>): Promise<void>;
|
|
92
82
|
//# sourceMappingURL=message-handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-handlers.d.ts","sourceRoot":"","sources":["../../../lib/mixins/message-handlers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message-handlers.d.ts","sourceRoot":"","sources":["../../../lib/mixins/message-handlers.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,qFALW,KAAK,OAAC,YACN,MAAM,YACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjB,OAAO,CAAC,IAAI,CAAC,CA6CzB;AAED;;;;;GAKG;AACH,qFAJW,KAAK,OAAC,QACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjB,OAAO,CAAC,IAAI,CAAC,CAYzB;AAED;;;;;GAKG;AACH,wFAJW,KAAK,OAAC,QACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjB,IAAI,CAuBhB;;IA3BD;;;;;OAKG;IACH,oEAJW,KAAK,OAAC,QACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAwB7B;IATG,6BAAsF;IAMtF,+BAAsB;;AAK1B;;;;;GAKG;AACH,oFAJW,KAAK,OAAC,QACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjB,OAAO,CAAC,IAAI,CAAC,CAUzB;AAED;;;;;GAKG;AACH,8FAJW,KAAK,OAAC,WACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjB,IAAI,CAKhB;;IATD;;;;;OAKG;IACH,oEAJW,KAAK,OAAC,WACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAM7B;IAFC,sBAAsD;;AAIxD;;;;;GAKG;AACH,uFAJW,KAAK,OAAC,SACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjB,IAAI,CAOhB;;IAXD;;;;;OAKG;IACH,oEAJW,KAAK,OAAC,SACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAQ7B;IAJC,kBAAsD;;AAMxD;;;;;GAKG;AACH,mGAJW,KAAK,OAAC,QACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjB,OAAO,CAAC,IAAI,CAAC,CAuBzB"}
|
|
@@ -3,7 +3,13 @@ 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
|
-
|
|
6
|
+
exports.onPageChange = onPageChange;
|
|
7
|
+
exports.onAppConnect = onAppConnect;
|
|
8
|
+
exports.onAppDisconnect = onAppDisconnect;
|
|
9
|
+
exports.onAppUpdate = onAppUpdate;
|
|
10
|
+
exports.onConnectedDriverList = onConnectedDriverList;
|
|
11
|
+
exports.onCurrentState = onCurrentState;
|
|
12
|
+
exports.onConnectedApplicationList = onConnectedApplicationList;
|
|
7
13
|
const events_1 = __importDefault(require("./events"));
|
|
8
14
|
const utils_1 = require("../utils");
|
|
9
15
|
const lodash_1 = __importDefault(require("lodash"));
|
|
@@ -23,7 +29,7 @@ async function onPageChange(err, appIdKey, pageDict) {
|
|
|
23
29
|
return;
|
|
24
30
|
}
|
|
25
31
|
const pageArray = (0, utils_1.pageArrayFromDict)(pageDict);
|
|
26
|
-
await
|
|
32
|
+
await useAppDictLock.bind(this)((/** @type {() => void} */ done) => {
|
|
27
33
|
try {
|
|
28
34
|
// save the page dict for this app
|
|
29
35
|
if (this.appDict[appIdKey]) {
|
|
@@ -35,7 +41,7 @@ async function onPageChange(err, appIdKey, pageDict) {
|
|
|
35
41
|
else {
|
|
36
42
|
// we have a pre-existing pageDict
|
|
37
43
|
if (lodash_1.default.isEqual(this.appDict[appIdKey].pageArray, pageArray)) {
|
|
38
|
-
|
|
44
|
+
this.log.debug(`Received page change notice for app '${appIdKey}' ` +
|
|
39
45
|
`but the listing has not changed. Ignoring.`);
|
|
40
46
|
return done();
|
|
41
47
|
}
|
|
@@ -53,7 +59,7 @@ async function onPageChange(err, appIdKey, pageDict) {
|
|
|
53
59
|
// in the middle of navigating, so reporting a page change will cause problems
|
|
54
60
|
return;
|
|
55
61
|
}
|
|
56
|
-
|
|
62
|
+
this.log.debug(`Page changed: ${(0, utils_1.simpleStringify)(pageDict, true)}`);
|
|
57
63
|
this.emit(events_1.default.EVENT_PAGE_CHANGE, {
|
|
58
64
|
appIdKey: appIdKey.replace('PID:', ''),
|
|
59
65
|
pageArray,
|
|
@@ -67,10 +73,10 @@ async function onPageChange(err, appIdKey, pageDict) {
|
|
|
67
73
|
*/
|
|
68
74
|
async function onAppConnect(err, dict) {
|
|
69
75
|
const appIdKey = dict.WIRApplicationIdentifierKey;
|
|
70
|
-
|
|
71
|
-
await
|
|
76
|
+
this.log.debug(`Notified that new application '${appIdKey}' has connected`);
|
|
77
|
+
await useAppDictLock.bind(this)((/** @type {() => void} */ done) => {
|
|
72
78
|
try {
|
|
73
|
-
|
|
79
|
+
updateAppsWithDict.bind(this)(dict);
|
|
74
80
|
}
|
|
75
81
|
finally {
|
|
76
82
|
done();
|
|
@@ -85,19 +91,19 @@ async function onAppConnect(err, dict) {
|
|
|
85
91
|
*/
|
|
86
92
|
function onAppDisconnect(err, dict) {
|
|
87
93
|
const appIdKey = dict.WIRApplicationIdentifierKey;
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
this.log.debug(`Application '${appIdKey}' disconnected. Removing from app dictionary.`);
|
|
95
|
+
this.log.debug(`Current app is '${this.appIdKey}'`);
|
|
90
96
|
// get rid of the entry in our app dictionary,
|
|
91
97
|
// since it is no longer available
|
|
92
98
|
delete this.appDict[appIdKey];
|
|
93
99
|
// if the disconnected app is the one we are connected to, try to find another
|
|
94
100
|
if (this.appIdKey === appIdKey) {
|
|
95
|
-
|
|
101
|
+
this.log.debug(`No longer have app id. Attempting to find new one.`);
|
|
96
102
|
this.appIdKey = (0, utils_1.getDebuggerAppKey)(/** @type {string} */ (this.bundleId), this.appDict);
|
|
97
103
|
}
|
|
98
104
|
if (!this.appDict) {
|
|
99
105
|
// this means we no longer have any apps. what the what?
|
|
100
|
-
|
|
106
|
+
this.log.debug('Main app disconnected. Disconnecting altogether.');
|
|
101
107
|
this.connected = false;
|
|
102
108
|
this.emit(events_1.default.EVENT_DISCONNECT, true);
|
|
103
109
|
}
|
|
@@ -109,9 +115,9 @@ function onAppDisconnect(err, dict) {
|
|
|
109
115
|
* @returns {Promise<void>}
|
|
110
116
|
*/
|
|
111
117
|
async function onAppUpdate(err, dict) {
|
|
112
|
-
await
|
|
118
|
+
await useAppDictLock.bind(this)((/** @type {() => void} */ done) => {
|
|
113
119
|
try {
|
|
114
|
-
|
|
120
|
+
updateAppsWithDict.bind(this)(dict);
|
|
115
121
|
}
|
|
116
122
|
finally {
|
|
117
123
|
done();
|
|
@@ -126,7 +132,7 @@ async function onAppUpdate(err, dict) {
|
|
|
126
132
|
*/
|
|
127
133
|
function onConnectedDriverList(err, drivers) {
|
|
128
134
|
this.connectedDrivers = drivers.WIRDriverDictionaryKey;
|
|
129
|
-
|
|
135
|
+
this.log.debug(`Received connected driver list: ${JSON.stringify(this.connectedDrivers)}`);
|
|
130
136
|
}
|
|
131
137
|
/**
|
|
132
138
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
@@ -138,7 +144,7 @@ function onCurrentState(err, state) {
|
|
|
138
144
|
this.currentState = state.WIRAutomationAvailabilityKey;
|
|
139
145
|
// This state changes when 'Remote Automation' in 'Settings app' > 'Safari' > 'Advanced' > 'Remote Automation' changes
|
|
140
146
|
// WIRAutomationAvailabilityAvailable or WIRAutomationAvailabilityNotAvailable
|
|
141
|
-
|
|
147
|
+
this.log.debug(`Received connected automation availability state: ${JSON.stringify(this.currentState)}`);
|
|
142
148
|
}
|
|
143
149
|
/**
|
|
144
150
|
* @this {import('../remote-debugger').RemoteDebugger}
|
|
@@ -147,7 +153,7 @@ function onCurrentState(err, state) {
|
|
|
147
153
|
* @returns {Promise<void>}
|
|
148
154
|
*/
|
|
149
155
|
async function onConnectedApplicationList(err, apps) {
|
|
150
|
-
|
|
156
|
+
this.log.debug(`Received connected applications list: ${lodash_1.default.keys(apps).join(', ')}`);
|
|
151
157
|
// translate the received information into an easier-to-manage
|
|
152
158
|
// hash with app id as key, and app info as value
|
|
153
159
|
let newDict = {};
|
|
@@ -159,7 +165,7 @@ async function onConnectedApplicationList(err, apps) {
|
|
|
159
165
|
newDict[id] = entry;
|
|
160
166
|
}
|
|
161
167
|
// update the object's list of apps
|
|
162
|
-
await
|
|
168
|
+
await useAppDictLock.bind(this)((/** @type {() => void} */ done) => {
|
|
163
169
|
try {
|
|
164
170
|
lodash_1.default.defaults(this.appDict, newDict);
|
|
165
171
|
}
|
|
@@ -168,14 +174,37 @@ async function onConnectedApplicationList(err, apps) {
|
|
|
168
174
|
}
|
|
169
175
|
});
|
|
170
176
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
/**
|
|
178
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
179
|
+
* @param {(done: () => any) => any} fn
|
|
180
|
+
* @returns {Promise<any>}
|
|
181
|
+
*/
|
|
182
|
+
async function useAppDictLock(fn) {
|
|
183
|
+
return await this._lock.acquire('appDict', fn);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
188
|
+
* @param {import('@appium/types').StringRecord} dict
|
|
189
|
+
* @returns {void}
|
|
190
|
+
*/
|
|
191
|
+
function updateAppsWithDict(dict) {
|
|
192
|
+
// get the dictionary entry into a nice form, and add it to the
|
|
193
|
+
// application dictionary
|
|
194
|
+
this.appDict = this.appDict || {};
|
|
195
|
+
let [id, entry] = (0, utils_1.appInfoFromDict)(dict);
|
|
196
|
+
if (this.appDict[id]) {
|
|
197
|
+
// preserve the page dictionary for this entry
|
|
198
|
+
entry.pageArray = this.appDict[id].pageArray;
|
|
199
|
+
}
|
|
200
|
+
this.appDict[id] = entry;
|
|
201
|
+
// add a promise to get the page dictionary
|
|
202
|
+
if (lodash_1.default.isUndefined(entry.pageArray)) {
|
|
203
|
+
entry.pageArray = (0, utils_1.deferredPromise)();
|
|
204
|
+
}
|
|
205
|
+
// try to get the app id from our connected apps
|
|
206
|
+
if (!this.appIdKey) {
|
|
207
|
+
this.appIdKey = (0, utils_1.getDebuggerAppKey)(/** @type {string} */ (this.bundleId), this.appDict);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
181
210
|
//# sourceMappingURL=message-handlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-handlers.js","sourceRoot":"","sources":["../../../lib/mixins/message-handlers.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"message-handlers.js","sourceRoot":"","sources":["../../../lib/mixins/message-handlers.js"],"names":[],"mappings":";;;;;AAuBA,oCA2CC;AAQD,oCAUC;AAQD,0CAqBC;AAQD,kCAQC;AAQD,sDAGC;AAQD,wCAKC;AAQD,gEAqBC;AAtLD,sDAA8B;AAC9B,oCAMkB;AAClB,oDAAuB;AAGvB;;;GAGG;AAEH;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ;IACzD,IAAI,gBAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,IAAA,yBAAiB,EAAC,QAAQ,CAAC,CAAC;IAE9C,MAAM,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE;QACjE,IAAI,CAAC;YACH,kCAAkC;YAClC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC3B,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC;oBACrC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;wBAC7C,4CAA4C;wBAC5C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;oBAC7C,CAAC;yBAAM,CAAC;wBACN,kCAAkC;wBAClC,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC;4BAC3D,IAAI,CAAC,GAAG,CAAC,KAAK,CA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chSafari(this: import("../remote-debugger").RemoteDebugger): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
8
|
+
* @param {(event: import('@appium/types').StringRecord) => any} fn
|
|
9
|
+
* @returns {Promise<any>}
|
|
10
|
+
*/
|
|
11
|
+
export function startTimeline(this: import("../remote-debugger").RemoteDebugger, fn: (event: import("@appium/types").StringRecord) => any): Promise<any>;
|
|
12
|
+
/**
|
|
13
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
14
|
+
* @returns {Promise<any>}
|
|
15
|
+
*/
|
|
16
|
+
export function stopTimeline(this: import("../remote-debugger").RemoteDebugger): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
19
|
+
* @param {(event: import('@appium/types').StringRecord) => any} listener
|
|
20
|
+
* @returns {void}
|
|
21
|
+
*/
|
|
22
|
+
export function startConsole(this: import("../remote-debugger").RemoteDebugger, listener: (event: import("@appium/types").StringRecord) => any): void;
|
|
23
|
+
/**
|
|
24
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
25
|
+
* @returns {void}
|
|
26
|
+
*/
|
|
27
|
+
export function stopConsole(this: import("../remote-debugger").RemoteDebugger): void;
|
|
28
|
+
/**
|
|
29
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
30
|
+
* @param {(event: import('@appium/types').StringRecord) => any} listener
|
|
31
|
+
* @returns {void}
|
|
32
|
+
*/
|
|
33
|
+
export function startNetwork(this: import("../remote-debugger").RemoteDebugger, listener: (event: import("@appium/types").StringRecord) => any): void;
|
|
34
|
+
/**
|
|
35
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
36
|
+
* @returns {void}
|
|
37
|
+
*/
|
|
38
|
+
export function stopNetwork(this: import("../remote-debugger").RemoteDebugger): void;
|
|
39
|
+
/**
|
|
40
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
41
|
+
* @param {string} value
|
|
42
|
+
* @returns {Promise<any>}
|
|
43
|
+
*/
|
|
44
|
+
export function overrideUserAgent(this: import("../remote-debugger").RemoteDebugger, value: string): Promise<any>;
|
|
45
|
+
/**
|
|
46
|
+
* @this {import('../remote-debugger').RemoteDebugger}
|
|
47
|
+
* @param {number} [timeoutMs=GARBAGE_COLLECT_TIMEOUT_MS]
|
|
48
|
+
* @returns {Promise<void>}
|
|
49
|
+
*/
|
|
50
|
+
export function garbageCollect(this: import("../remote-debugger").RemoteDebugger, timeoutMs?: number | undefined): Promise<void>;
|
|
51
|
+
//# sourceMappingURL=misc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../lib/mixins/misc.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH,iFAFa,OAAO,CAAC,IAAI,CAAC,CAMzB;AAED;;;;GAIG;AACH,qFAHW,CAAC,KAAK,EAAE,OAAO,eAAe,EAAE,YAAY,KAAK,GAAG,GAClD,OAAO,CAAC,GAAG,CAAC,CASxB;AAED;;;GAGG;AACH,iFAFa,OAAO,CAAC,GAAG,CAAC,CAQxB;AAED;;;;GAIG;AACH,0FAHW,CAAC,KAAK,EAAE,OAAO,eAAe,EAAE,YAAY,KAAK,GAAG,GAClD,IAAI,CAMhB;AAED;;;GAGG;AACH,gFAFa,IAAI,CAMhB;AAED;;;;GAIG;AACH,0FAHW,CAAC,KAAK,EAAE,OAAO,eAAe,EAAE,YAAY,KAAK,GAAG,GAClD,IAAI,CAKhB;AAED;;;GAGG;AACH,gFAFa,IAAI,CAKhB;AAGD;;;;GAIG;AACH,4FAHW,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CASxB;AAED;;;;GAIG;AACH,mHAFa,OAAO,CAAC,IAAI,CAAC,CA2BzB"}
|