appium-remote-debugger 11.5.9 → 12.0.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 +51 -0
- package/build/lib/mixins/connect.d.ts +2 -45
- package/build/lib/mixins/connect.d.ts.map +1 -1
- package/build/lib/mixins/connect.js +46 -46
- package/build/lib/mixins/connect.js.map +1 -1
- package/build/lib/mixins/cookies.d.ts.map +1 -1
- package/build/lib/mixins/cookies.js +8 -7
- package/build/lib/mixins/cookies.js.map +1 -1
- package/build/lib/mixins/events.d.ts +27 -5
- package/build/lib/mixins/events.d.ts.map +1 -1
- package/build/lib/mixins/events.js +47 -6
- package/build/lib/mixins/events.js.map +1 -1
- package/build/lib/mixins/execute.d.ts.map +1 -1
- package/build/lib/mixins/execute.js +16 -12
- package/build/lib/mixins/execute.js.map +1 -1
- package/build/lib/mixins/message-handlers.d.ts +0 -31
- package/build/lib/mixins/message-handlers.d.ts.map +1 -1
- package/build/lib/mixins/message-handlers.js +21 -22
- package/build/lib/mixins/message-handlers.js.map +1 -1
- package/build/lib/mixins/misc.d.ts +2 -24
- package/build/lib/mixins/misc.d.ts.map +1 -1
- package/build/lib/mixins/misc.js +15 -51
- package/build/lib/mixins/misc.js.map +1 -1
- package/build/lib/mixins/navigate.d.ts +1 -25
- package/build/lib/mixins/navigate.d.ts.map +1 -1
- package/build/lib/mixins/navigate.js +36 -30
- package/build/lib/mixins/navigate.js.map +1 -1
- package/build/lib/mixins/property-accessors.d.ts +27 -0
- package/build/lib/mixins/property-accessors.d.ts.map +1 -0
- package/build/lib/mixins/property-accessors.js +95 -0
- package/build/lib/mixins/property-accessors.js.map +1 -0
- package/build/lib/mixins/screenshot.d.ts.map +1 -1
- package/build/lib/mixins/screenshot.js +3 -2
- package/build/lib/mixins/screenshot.js.map +1 -1
- package/build/lib/remote-debugger-real-device.d.ts +7 -19
- package/build/lib/remote-debugger-real-device.d.ts.map +1 -1
- package/build/lib/remote-debugger-real-device.js +12 -20
- package/build/lib/remote-debugger-real-device.js.map +1 -1
- package/build/lib/remote-debugger.d.ts +63 -167
- package/build/lib/remote-debugger.d.ts.map +1 -1
- package/build/lib/remote-debugger.js +75 -119
- package/build/lib/remote-debugger.js.map +1 -1
- package/build/lib/types.d.ts +41 -1
- package/build/lib/types.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/mixins/connect.js +66 -52
- package/lib/mixins/cookies.js +11 -7
- package/lib/mixins/events.js +50 -6
- package/lib/mixins/execute.js +27 -14
- package/lib/mixins/message-handlers.js +30 -23
- package/lib/mixins/misc.js +18 -51
- package/lib/mixins/navigate.js +44 -30
- package/lib/mixins/property-accessors.ts +96 -0
- package/lib/mixins/screenshot.js +7 -2
- package/lib/remote-debugger-real-device.ts +28 -0
- package/lib/remote-debugger.ts +268 -0
- package/lib/types.ts +44 -1
- package/package.json +1 -1
- package/lib/remote-debugger-real-device.js +0 -39
- package/lib/remote-debugger.js +0 -299
|
@@ -1,46 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
_clientEventListeners:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import * as connectMixins from './mixins/connect';
|
|
3
|
+
import * as executeMixins from './mixins/execute';
|
|
4
|
+
import * as messageHandlerMixins from './mixins/message-handlers';
|
|
5
|
+
import * as navigationMixins from './mixins/navigate';
|
|
6
|
+
import * as cookieMixins from './mixins/cookies';
|
|
7
|
+
import * as screenshotMixins from './mixins/screenshot';
|
|
8
|
+
import * as eventMixins from './mixins/events';
|
|
9
|
+
import * as miscellaneousMixins from './mixins/misc';
|
|
10
|
+
import type { RemoteDebuggerOptions, AppDict, EventListener } from './types';
|
|
11
|
+
import type { AppiumLogger, StringRecord } from '@appium/types';
|
|
12
|
+
import type { RpcClient } from './rpc/rpc-client';
|
|
13
|
+
import type B from 'bluebird';
|
|
14
|
+
export declare const REMOTE_DEBUGGER_PORT = 27753;
|
|
15
|
+
export declare class RemoteDebugger extends EventEmitter {
|
|
16
|
+
protected _skippedApps: string[];
|
|
17
|
+
protected _clientEventListeners: StringRecord<EventListener[]>;
|
|
18
|
+
protected _appDict: AppDict;
|
|
19
|
+
protected _appIdKey: string | null | undefined;
|
|
20
|
+
protected _pageIdKey: string | number | null | undefined;
|
|
21
|
+
protected _connectedDrivers: StringRecord[] | undefined;
|
|
22
|
+
protected _currentState: string | undefined;
|
|
23
|
+
protected _pageLoadDelay: B<void> | undefined;
|
|
24
|
+
protected _rpcClient: RpcClient | null;
|
|
25
|
+
protected _pageLoading: boolean;
|
|
26
|
+
protected _navigatingToPage: boolean;
|
|
27
|
+
protected _allowNavigationWithoutReload: boolean;
|
|
28
|
+
protected _pageLoadMs: number | undefined;
|
|
29
|
+
protected readonly _pageLoadStrategy: string | undefined;
|
|
30
|
+
protected readonly _log: AppiumLogger;
|
|
31
|
+
protected readonly _bundleId: string | undefined;
|
|
32
|
+
protected readonly _additionalBundleIds: string[] | undefined;
|
|
33
|
+
protected readonly _platformVersion: string | undefined;
|
|
34
|
+
protected readonly _isSafari: boolean;
|
|
35
|
+
protected readonly _includeSafari: boolean;
|
|
36
|
+
protected readonly _useNewSafari: boolean;
|
|
37
|
+
protected readonly _garbageCollectOnExecute: boolean;
|
|
38
|
+
protected readonly _host: string | undefined;
|
|
39
|
+
protected readonly _port: number | undefined;
|
|
40
|
+
protected readonly _socketPath: string | undefined;
|
|
41
|
+
protected readonly _remoteDebugProxy: any | undefined;
|
|
42
|
+
protected readonly _pageReadyTimeout: number;
|
|
43
|
+
protected readonly _logAllCommunication: boolean;
|
|
44
|
+
protected readonly _logAllCommunicationHexDump: boolean;
|
|
45
|
+
protected readonly _socketChunkSize: number | undefined;
|
|
46
|
+
protected readonly _webInspectorMaxFrameLength: number | undefined;
|
|
47
|
+
protected readonly _fullPageInitialization: boolean | undefined;
|
|
48
|
+
static readonly EVENT_PAGE_CHANGE: string;
|
|
49
|
+
static readonly EVENT_DISCONNECT: string;
|
|
50
|
+
static readonly EVENT_FRAMES_DETACHED: string;
|
|
40
51
|
setConnectionKey: typeof connectMixins.setConnectionKey;
|
|
41
52
|
disconnect: typeof connectMixins.disconnect;
|
|
42
|
-
searchForApp: typeof connectMixins.searchForApp;
|
|
43
|
-
searchForPage: typeof connectMixins.searchForPage;
|
|
44
53
|
checkPageIsReady: typeof navigationMixins.checkPageIsReady;
|
|
45
54
|
cancelPageLoad: typeof navigationMixins.cancelPageLoad;
|
|
46
55
|
waitForDom: typeof navigationMixins.waitForDom;
|
|
@@ -58,13 +67,13 @@ export class RemoteDebugger extends EventEmitter<[never]> {
|
|
|
58
67
|
captureScreenshot: typeof screenshotMixins.captureScreenshot;
|
|
59
68
|
addClientEventListener: typeof eventMixins.addClientEventListener;
|
|
60
69
|
removeClientEventListener: typeof eventMixins.removeClientEventListener;
|
|
70
|
+
startConsole: typeof eventMixins.startConsole;
|
|
71
|
+
stopConsole: typeof eventMixins.stopConsole;
|
|
72
|
+
startNetwork: typeof eventMixins.startNetwork;
|
|
73
|
+
stopNetwork: typeof eventMixins.stopNetwork;
|
|
61
74
|
launchSafari: typeof miscellaneousMixins.launchSafari;
|
|
62
75
|
startTimeline: typeof miscellaneousMixins.startTimeline;
|
|
63
76
|
stopTimeline: typeof miscellaneousMixins.stopTimeline;
|
|
64
|
-
startConsole: typeof miscellaneousMixins.startConsole;
|
|
65
|
-
stopConsole: typeof miscellaneousMixins.stopConsole;
|
|
66
|
-
startNetwork: typeof miscellaneousMixins.startNetwork;
|
|
67
|
-
stopNetwork: typeof miscellaneousMixins.stopNetwork;
|
|
68
77
|
overrideUserAgent: typeof miscellaneousMixins.overrideUserAgent;
|
|
69
78
|
garbageCollect: typeof miscellaneousMixins.garbageCollect;
|
|
70
79
|
onPageChange: typeof messageHandlerMixins.onPageChange;
|
|
@@ -75,132 +84,19 @@ export class RemoteDebugger extends EventEmitter<[never]> {
|
|
|
75
84
|
onConnectedDriverList: typeof messageHandlerMixins.onConnectedDriverList;
|
|
76
85
|
onCurrentState: typeof messageHandlerMixins.onCurrentState;
|
|
77
86
|
frameDetached: typeof navigationMixins.frameDetached;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
isSafari: boolean;
|
|
82
|
-
includeSafari: boolean;
|
|
83
|
-
useNewSafari: boolean;
|
|
84
|
-
pageLoadMs: number | undefined;
|
|
85
|
-
garbageCollectOnExecute: boolean;
|
|
86
|
-
host: string | undefined;
|
|
87
|
-
port: number;
|
|
88
|
-
socketPath: string | undefined;
|
|
89
|
-
remoteDebugProxy: string | undefined;
|
|
90
|
-
pageReadyTimeout: number;
|
|
91
|
-
logAllCommunication: boolean;
|
|
92
|
-
logAllCommunicationHexDump: boolean;
|
|
93
|
-
socketChunkSize: number | undefined;
|
|
94
|
-
webInspectorMaxFrameLength: number | undefined;
|
|
95
|
-
fullPageInitialization: boolean | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* @returns {import('@appium/types').AppiumLogger}
|
|
98
|
-
*/
|
|
99
|
-
get log(): import("@appium/types").AppiumLogger;
|
|
100
|
-
/**
|
|
101
|
-
* @param {boolean} [checkConnected=false]
|
|
102
|
-
* @returns {import('./rpc/rpc-client').RpcClient}
|
|
103
|
-
*/
|
|
104
|
-
requireRpcClient(checkConnected?: boolean | undefined): import("./rpc/rpc-client").RpcClient;
|
|
105
|
-
/**
|
|
106
|
-
* @returns {void}
|
|
107
|
-
*/
|
|
87
|
+
constructor(opts?: RemoteDebuggerOptions);
|
|
88
|
+
get log(): AppiumLogger;
|
|
89
|
+
requireRpcClient(checkConnected?: boolean): RpcClient;
|
|
108
90
|
setup(): void;
|
|
109
|
-
pageLoading: boolean | undefined;
|
|
110
|
-
_navigatingToPage: boolean | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* @param {boolean} allow
|
|
113
|
-
*/
|
|
114
|
-
set allowNavigationWithoutReload(allow: boolean);
|
|
115
|
-
/**
|
|
116
|
-
* @returns {boolean}
|
|
117
|
-
*/
|
|
118
|
-
get allowNavigationWithoutReload(): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* @returns {void}
|
|
121
|
-
*/
|
|
122
91
|
teardown(): void;
|
|
123
|
-
/**
|
|
124
|
-
* @returns {void}
|
|
125
|
-
*/
|
|
126
92
|
initRpcClient(): void;
|
|
127
|
-
/**
|
|
128
|
-
* @returns {boolean}
|
|
129
|
-
*/
|
|
130
93
|
get isConnected(): boolean;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
get
|
|
94
|
+
set allowNavigationWithoutReload(allow: boolean);
|
|
95
|
+
get allowNavigationWithoutReload(): boolean;
|
|
96
|
+
get currentState(): string | undefined;
|
|
97
|
+
get connectedDrivers(): StringRecord[] | undefined;
|
|
98
|
+
get pageLoadMs(): number;
|
|
99
|
+
set pageLoadMs(value: number);
|
|
136
100
|
}
|
|
137
101
|
export default RemoteDebugger;
|
|
138
|
-
export type RemoteDebuggerOptions = {
|
|
139
|
-
/**
|
|
140
|
-
* id of the app being connected to
|
|
141
|
-
*/
|
|
142
|
-
bundleId?: string | undefined;
|
|
143
|
-
/**
|
|
144
|
-
* array of possible bundle
|
|
145
|
-
* ids that the inspector could return
|
|
146
|
-
*/
|
|
147
|
-
additionalBundleIds?: string[] | undefined;
|
|
148
|
-
/**
|
|
149
|
-
* version of iOS
|
|
150
|
-
*/
|
|
151
|
-
platformVersion?: string | undefined;
|
|
152
|
-
isSafari?: boolean | undefined;
|
|
153
|
-
includeSafari?: boolean | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* for web inspector, whether this is a new Safari instance
|
|
156
|
-
*/
|
|
157
|
-
useNewSafari?: boolean | undefined;
|
|
158
|
-
/**
|
|
159
|
-
* the time, in ms, that should be waited for page loading
|
|
160
|
-
*/
|
|
161
|
-
pageLoadMs?: number | undefined;
|
|
162
|
-
/**
|
|
163
|
-
* the remote debugger's host address
|
|
164
|
-
*/
|
|
165
|
-
host?: string | undefined;
|
|
166
|
-
/**
|
|
167
|
-
* the remote debugger port through which to communicate
|
|
168
|
-
*/
|
|
169
|
-
port?: number | undefined;
|
|
170
|
-
socketPath?: string | undefined;
|
|
171
|
-
pageReadyTimeout?: number | undefined;
|
|
172
|
-
remoteDebugProxy?: string | undefined;
|
|
173
|
-
garbageCollectOnExecute?: boolean | undefined;
|
|
174
|
-
logFullResponse?: boolean | undefined;
|
|
175
|
-
/**
|
|
176
|
-
* log plists sent and received from Web Inspector
|
|
177
|
-
*/
|
|
178
|
-
logAllCommunication?: boolean | undefined;
|
|
179
|
-
/**
|
|
180
|
-
* log communication from Web Inspector as hex dump
|
|
181
|
-
*/
|
|
182
|
-
logAllCommunicationHexDump?: boolean | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* The maximum size in bytes of a single data
|
|
185
|
-
* frame in the device communication protocol
|
|
186
|
-
*/
|
|
187
|
-
webInspectorMaxFrameLength?: number | undefined;
|
|
188
|
-
/**
|
|
189
|
-
* size, in bytes, of chunks of data sent to
|
|
190
|
-
* Web Inspector (real device only)
|
|
191
|
-
*/
|
|
192
|
-
socketChunkSize?: number | undefined;
|
|
193
|
-
fullPageInitialization?: boolean | undefined;
|
|
194
|
-
pageLoadStrategy?: string | undefined;
|
|
195
|
-
log?: import("@appium/types").AppiumLogger | undefined;
|
|
196
|
-
};
|
|
197
|
-
import { EventEmitter } from 'events';
|
|
198
|
-
import * as connectMixins from './mixins/connect';
|
|
199
|
-
import * as navigationMixins from './mixins/navigate';
|
|
200
|
-
import * as executeMixins from './mixins/execute';
|
|
201
|
-
import * as cookieMixins from './mixins/cookies';
|
|
202
|
-
import * as screenshotMixins from './mixins/screenshot';
|
|
203
|
-
import * as eventMixins from './mixins/events';
|
|
204
|
-
import * as miscellaneousMixins from './mixins/misc';
|
|
205
|
-
import * as messageHandlerMixins from './mixins/message-handlers';
|
|
206
102
|
//# sourceMappingURL=remote-debugger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-debugger.d.ts","sourceRoot":"","sources":["../../lib/remote-debugger.
|
|
1
|
+
{"version":3,"file":"remote-debugger.d.ts","sourceRoot":"","sources":["../../lib/remote-debugger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,gBAAgB,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,YAAY,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,mBAAmB,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EACV,qBAAqB,EACrB,OAAO,EACP,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,eAAO,MAAM,oBAAoB,QAAQ,C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AAU,iCAA2B;IACrC,SAAS,gCAA0B;IACnC,YAAY,mCAA6B;IACzC,iBAAiB,4CAAsC;IACvD,sBAAsB,4CAAsC;IAC5D,yBAAyB,+CAAyC;IAClE,YAAY,kCAA4B;IACxC,WAAW,iCAA2B;IACtC,YAAY,kCAA4B;IACxC,WAAW,iCAA2B;IACtC,YAAY,0CAAoC;IAChD,aAAa,2CAAqC;IAClD,YAAY,0CAAoC;IAChD,iBAAiB,+CAAyC;IAC1D,cAAc,4CAAsC;IAGpD,YAAY,2CAAqC;IACjD,0BAA0B,yDAAmD;IAC7E,YAAY,2CAAqC;IACjD,eAAe,8CAAwC;IACvD,WAAW,0CAAoC;IAC/C,qBAAqB,oDAA8C;IACnE,cAAc,6CAAuC;IACrD,aAAa,wCAAkC;gBAElC,IAAI,GAAE,qBAA0B;IA+D7C,IAAI,GAAG,IAAI,YAAY,CAEtB;IAED,gBAAgB,CAAC,cAAc,GAAE,OAAe,GAAG,SAAS;IAU5D,KAAK,IAAK,IAAI;IAed,QAAQ,IAAK,IAAI;IAmBjB,aAAa,IAAK,IAAI;IAgBtB,IAAI,WAAW,IAAK,OAAO,CAE1B;IAED,IAAI,4BAA4B,CAAE,KAAK,EAAE,OAAO,EAE/C;IAED,IAAI,4BAA4B,IAAK,OAAO,CAE3C;IAED,IAAI,YAAY,IAAK,MAAM,GAAG,SAAS,CAEtC;IAED,IAAI,gBAAgB,IAAK,YAAY,EAAE,GAAG,SAAS,CAElD;IAED,IAAI,UAAU,IAAK,MAAM,CAExB;IAED,IAAI,UAAU,CAAE,KAAK,EAAE,MAAM,EAE5B;CACF;AAMD,eAAe,cAAc,CAAC"}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.RemoteDebugger = exports.
|
|
29
|
+
exports.RemoteDebugger = exports.REMOTE_DEBUGGER_PORT = void 0;
|
|
30
30
|
const events_1 = require("events");
|
|
31
31
|
const logger_1 = __importDefault(require("./logger"));
|
|
32
32
|
const rpc_1 = require("./rpc");
|
|
@@ -41,21 +41,14 @@ const eventMixins = __importStar(require("./mixins/events"));
|
|
|
41
41
|
const miscellaneousMixins = __importStar(require("./mixins/misc"));
|
|
42
42
|
const lodash_1 = __importDefault(require("lodash"));
|
|
43
43
|
exports.REMOTE_DEBUGGER_PORT = 27753;
|
|
44
|
-
/* How many milliseconds to wait for webkit to return a response before timing out */
|
|
45
|
-
exports.RPC_RESPONSE_TIMEOUT_MS = 5000;
|
|
46
44
|
const PAGE_READY_TIMEOUT_MS = 5000;
|
|
47
45
|
const { version: MODULE_VERSION } = (0, utils_1.getModuleProperties)();
|
|
48
46
|
class RemoteDebugger extends events_1.EventEmitter {
|
|
49
|
-
/**
|
|
50
|
-
* @param {RemoteDebuggerOptions} opts
|
|
51
|
-
*/
|
|
52
47
|
constructor(opts = {}) {
|
|
53
48
|
super();
|
|
54
49
|
// methods
|
|
55
50
|
this.setConnectionKey = connectMixins.setConnectionKey;
|
|
56
51
|
this.disconnect = connectMixins.disconnect;
|
|
57
|
-
this.searchForApp = connectMixins.searchForApp;
|
|
58
|
-
this.searchForPage = connectMixins.searchForPage;
|
|
59
52
|
this.checkPageIsReady = navigationMixins.checkPageIsReady;
|
|
60
53
|
this.cancelPageLoad = navigationMixins.cancelPageLoad;
|
|
61
54
|
this.waitForDom = navigationMixins.waitForDom;
|
|
@@ -73,13 +66,13 @@ class RemoteDebugger extends events_1.EventEmitter {
|
|
|
73
66
|
this.captureScreenshot = screenshotMixins.captureScreenshot;
|
|
74
67
|
this.addClientEventListener = eventMixins.addClientEventListener;
|
|
75
68
|
this.removeClientEventListener = eventMixins.removeClientEventListener;
|
|
69
|
+
this.startConsole = eventMixins.startConsole;
|
|
70
|
+
this.stopConsole = eventMixins.stopConsole;
|
|
71
|
+
this.startNetwork = eventMixins.startNetwork;
|
|
72
|
+
this.stopNetwork = eventMixins.stopNetwork;
|
|
76
73
|
this.launchSafari = miscellaneousMixins.launchSafari;
|
|
77
74
|
this.startTimeline = miscellaneousMixins.startTimeline;
|
|
78
75
|
this.stopTimeline = miscellaneousMixins.stopTimeline;
|
|
79
|
-
this.startConsole = miscellaneousMixins.startConsole;
|
|
80
|
-
this.stopConsole = miscellaneousMixins.stopConsole;
|
|
81
|
-
this.startNetwork = miscellaneousMixins.startNetwork;
|
|
82
|
-
this.stopNetwork = miscellaneousMixins.stopNetwork;
|
|
83
76
|
this.overrideUserAgent = miscellaneousMixins.overrideUserAgent;
|
|
84
77
|
this.garbageCollect = miscellaneousMixins.garbageCollect;
|
|
85
78
|
// Callbacks
|
|
@@ -91,120 +84,110 @@ class RemoteDebugger extends events_1.EventEmitter {
|
|
|
91
84
|
this.onConnectedDriverList = messageHandlerMixins.onConnectedDriverList;
|
|
92
85
|
this.onCurrentState = messageHandlerMixins.onCurrentState;
|
|
93
86
|
this.frameDetached = navigationMixins.frameDetached;
|
|
94
|
-
// @ts-ignore This is OK
|
|
95
87
|
this._log = opts.log ?? logger_1.default;
|
|
96
88
|
this.log.info(`Remote Debugger version ${MODULE_VERSION}`);
|
|
97
89
|
const { bundleId, additionalBundleIds = [], platformVersion, isSafari = true, includeSafari = false, useNewSafari = false, pageLoadMs, host, port = exports.REMOTE_DEBUGGER_PORT, socketPath, pageReadyTimeout = PAGE_READY_TIMEOUT_MS, remoteDebugProxy, garbageCollectOnExecute = false, logFullResponse = false, logAllCommunication = false, logAllCommunicationHexDump = false, webInspectorMaxFrameLength, socketChunkSize, fullPageInitialization, pageLoadStrategy, } = opts;
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
110
|
-
this.
|
|
111
|
-
this.
|
|
112
|
-
this.
|
|
113
|
-
this.
|
|
114
|
-
this.
|
|
90
|
+
this._bundleId = bundleId;
|
|
91
|
+
this._additionalBundleIds = additionalBundleIds;
|
|
92
|
+
this._platformVersion = platformVersion;
|
|
93
|
+
this._isSafari = isSafari;
|
|
94
|
+
this._includeSafari = includeSafari;
|
|
95
|
+
this._useNewSafari = useNewSafari;
|
|
96
|
+
this._pageLoadMs = pageLoadMs;
|
|
97
|
+
this._allowNavigationWithoutReload = false;
|
|
98
|
+
this.log.debug(`useNewSafari --> ${this._useNewSafari}`);
|
|
99
|
+
this._garbageCollectOnExecute = garbageCollectOnExecute;
|
|
100
|
+
this._host = host;
|
|
101
|
+
this._port = port;
|
|
102
|
+
this._socketPath = socketPath;
|
|
103
|
+
this._remoteDebugProxy = remoteDebugProxy;
|
|
104
|
+
this._pageReadyTimeout = pageReadyTimeout;
|
|
105
|
+
this._logAllCommunication = lodash_1.default.isNil(logAllCommunication) ? !!logFullResponse : !!logAllCommunication;
|
|
106
|
+
this._logAllCommunicationHexDump = logAllCommunicationHexDump;
|
|
107
|
+
this._socketChunkSize = socketChunkSize;
|
|
115
108
|
if (lodash_1.default.isInteger(webInspectorMaxFrameLength)) {
|
|
116
|
-
this.
|
|
109
|
+
this._webInspectorMaxFrameLength = webInspectorMaxFrameLength;
|
|
117
110
|
}
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
111
|
+
this._fullPageInitialization = fullPageInitialization;
|
|
112
|
+
this._pageLoadStrategy = pageLoadStrategy;
|
|
113
|
+
this._skippedApps = [];
|
|
114
|
+
this.setup();
|
|
120
115
|
}
|
|
121
|
-
/**
|
|
122
|
-
* @returns {import('@appium/types').AppiumLogger}
|
|
123
|
-
*/
|
|
124
116
|
get log() {
|
|
125
117
|
return this._log;
|
|
126
118
|
}
|
|
127
|
-
/**
|
|
128
|
-
* @param {boolean} [checkConnected=false]
|
|
129
|
-
* @returns {import('./rpc/rpc-client').RpcClient}
|
|
130
|
-
*/
|
|
131
119
|
requireRpcClient(checkConnected = false) {
|
|
132
|
-
if (!this.
|
|
120
|
+
if (!this._rpcClient) {
|
|
133
121
|
throw new Error(`rpcClient is undefined. Has 'initRpcClient' been called before?`);
|
|
134
122
|
}
|
|
135
|
-
if (checkConnected && !this.
|
|
123
|
+
if (checkConnected && !this._rpcClient.isConnected) {
|
|
136
124
|
throw new Error('Remote debugger is not connected');
|
|
137
125
|
}
|
|
138
|
-
return this.
|
|
126
|
+
return this._rpcClient;
|
|
139
127
|
}
|
|
140
|
-
/**
|
|
141
|
-
* @returns {void}
|
|
142
|
-
*/
|
|
143
128
|
setup() {
|
|
144
129
|
// app handling configuration
|
|
145
|
-
this.
|
|
146
|
-
this.
|
|
147
|
-
this.
|
|
148
|
-
this.
|
|
130
|
+
this._appDict = {};
|
|
131
|
+
this._appIdKey = null;
|
|
132
|
+
this._pageIdKey = null;
|
|
133
|
+
this._pageLoading = false;
|
|
149
134
|
this._navigatingToPage = false;
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
135
|
+
this._currentState = undefined;
|
|
136
|
+
this._connectedDrivers = undefined;
|
|
137
|
+
this._pageLoadDelay = undefined;
|
|
138
|
+
this._rpcClient = null;
|
|
152
139
|
this._clientEventListeners = {};
|
|
153
140
|
}
|
|
154
|
-
/**
|
|
155
|
-
* @returns {void}
|
|
156
|
-
*/
|
|
157
141
|
teardown() {
|
|
158
142
|
this.log.debug('Cleaning up listeners');
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
163
|
-
this.
|
|
164
|
-
|
|
165
|
-
|
|
143
|
+
this._appDict = {};
|
|
144
|
+
this._appIdKey = null;
|
|
145
|
+
this._pageIdKey = null;
|
|
146
|
+
this._pageLoading = false;
|
|
147
|
+
this._rpcClient = null;
|
|
148
|
+
for (const evt of [
|
|
149
|
+
RemoteDebugger.EVENT_DISCONNECT,
|
|
150
|
+
RemoteDebugger.EVENT_PAGE_CHANGE,
|
|
151
|
+
RemoteDebugger.EVENT_FRAMES_DETACHED,
|
|
152
|
+
]) {
|
|
153
|
+
this.removeAllListeners(evt);
|
|
154
|
+
}
|
|
166
155
|
}
|
|
167
|
-
/**
|
|
168
|
-
* @returns {void}
|
|
169
|
-
*/
|
|
170
156
|
initRpcClient() {
|
|
171
|
-
this.
|
|
172
|
-
bundleId: this.
|
|
173
|
-
platformVersion: this.
|
|
174
|
-
isSafari: this.
|
|
175
|
-
host: this.
|
|
176
|
-
port: this.
|
|
177
|
-
socketPath: this.
|
|
178
|
-
messageProxy: this.
|
|
179
|
-
logAllCommunication: this.
|
|
180
|
-
logAllCommunicationHexDump: this.
|
|
181
|
-
fullPageInitialization: this.
|
|
182
|
-
webInspectorMaxFrameLength: this.
|
|
157
|
+
this._rpcClient = new rpc_1.RpcClientSimulator({
|
|
158
|
+
bundleId: this._bundleId,
|
|
159
|
+
platformVersion: this._platformVersion,
|
|
160
|
+
isSafari: this._isSafari,
|
|
161
|
+
host: this._host,
|
|
162
|
+
port: this._port,
|
|
163
|
+
socketPath: this._socketPath,
|
|
164
|
+
messageProxy: this._remoteDebugProxy,
|
|
165
|
+
logAllCommunication: this._logAllCommunication,
|
|
166
|
+
logAllCommunicationHexDump: this._logAllCommunicationHexDump,
|
|
167
|
+
fullPageInitialization: this._fullPageInitialization,
|
|
168
|
+
webInspectorMaxFrameLength: this._webInspectorMaxFrameLength,
|
|
183
169
|
});
|
|
184
170
|
}
|
|
185
|
-
/**
|
|
186
|
-
* @returns {boolean}
|
|
187
|
-
*/
|
|
188
171
|
get isConnected() {
|
|
189
|
-
return !!this.
|
|
172
|
+
return !!this._rpcClient?.isConnected;
|
|
190
173
|
}
|
|
191
|
-
/**
|
|
192
|
-
* @param {boolean} allow
|
|
193
|
-
*/
|
|
194
174
|
set allowNavigationWithoutReload(allow) {
|
|
195
175
|
this._allowNavigationWithoutReload = allow;
|
|
196
176
|
}
|
|
197
|
-
/**
|
|
198
|
-
* @returns {boolean}
|
|
199
|
-
*/
|
|
200
177
|
get allowNavigationWithoutReload() {
|
|
201
178
|
return !!this._allowNavigationWithoutReload;
|
|
202
179
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
get
|
|
207
|
-
return this.
|
|
180
|
+
get currentState() {
|
|
181
|
+
return this._currentState;
|
|
182
|
+
}
|
|
183
|
+
get connectedDrivers() {
|
|
184
|
+
return this._connectedDrivers;
|
|
185
|
+
}
|
|
186
|
+
get pageLoadMs() {
|
|
187
|
+
return this._pageLoadMs ?? navigationMixins.DEFAULT_PAGE_READINESS_TIMEOUT_MS;
|
|
188
|
+
}
|
|
189
|
+
set pageLoadMs(value) {
|
|
190
|
+
this._pageLoadMs = value;
|
|
208
191
|
}
|
|
209
192
|
}
|
|
210
193
|
exports.RemoteDebugger = RemoteDebugger;
|
|
@@ -212,31 +195,4 @@ for (const [name, event] of lodash_1.default.toPairs(eventMixins.events)) {
|
|
|
212
195
|
RemoteDebugger[name] = event;
|
|
213
196
|
}
|
|
214
197
|
exports.default = RemoteDebugger;
|
|
215
|
-
/**
|
|
216
|
-
* @typedef {Object} RemoteDebuggerOptions
|
|
217
|
-
* @property {string} [bundleId] id of the app being connected to
|
|
218
|
-
* @property {string[]} [additionalBundleIds=[]] array of possible bundle
|
|
219
|
-
* ids that the inspector could return
|
|
220
|
-
* @property {string} [platformVersion] version of iOS
|
|
221
|
-
* @property {boolean} [isSafari=true]
|
|
222
|
-
* @property {boolean} [includeSafari=false]
|
|
223
|
-
* @property {boolean} [useNewSafari=false] for web inspector, whether this is a new Safari instance
|
|
224
|
-
* @property {number} [pageLoadMs] the time, in ms, that should be waited for page loading
|
|
225
|
-
* @property {string} [host] the remote debugger's host address
|
|
226
|
-
* @property {number} [port=REMOTE_DEBUGGER_PORT] the remote debugger port through which to communicate
|
|
227
|
-
* @property {string} [socketPath]
|
|
228
|
-
* @property {number} [pageReadyTimeout=PAGE_READY_TIMEOUT]
|
|
229
|
-
* @property {string} [remoteDebugProxy]
|
|
230
|
-
* @property {boolean} [garbageCollectOnExecute=false]
|
|
231
|
-
* @property {boolean} [logFullResponse=false]
|
|
232
|
-
* @property {boolean} [logAllCommunication=false] log plists sent and received from Web Inspector
|
|
233
|
-
* @property {boolean} [logAllCommunicationHexDump=false] log communication from Web Inspector as hex dump
|
|
234
|
-
* @property {number} [webInspectorMaxFrameLength] The maximum size in bytes of a single data
|
|
235
|
-
* frame in the device communication protocol
|
|
236
|
-
* @property {number} [socketChunkSize] size, in bytes, of chunks of data sent to
|
|
237
|
-
* Web Inspector (real device only)
|
|
238
|
-
* @property {boolean} [fullPageInitialization]
|
|
239
|
-
* @property {string} [pageLoadStrategy]
|
|
240
|
-
* @property {import('@appium/types').AppiumLogger} [log]
|
|
241
|
-
*/
|
|
242
198
|
//# sourceMappingURL=remote-debugger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-debugger.js","sourceRoot":"","sources":["../../lib/remote-debugger.
|
|
1
|
+
{"version":3,"file":"remote-debugger.js","sourceRoot":"","sources":["../../lib/remote-debugger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAsC;AACtC,sDAAkC;AAClC,+BAA2C;AAC3C,mCAA8C;AAC9C,gEAAkD;AAClD,gEAAkD;AAClD,gFAAkE;AAClE,oEAAsD;AACtD,+DAAiD;AACjD,sEAAwD;AACxD,6DAA+C;AAC/C,mEAAqD;AACrD,oDAAuB;AAWV,QAAA,oBAAoB,GAAG,KAAK,CAAC;AAC1C,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAA,2BAAmB,GAAE,CAAC;AAG1D,MAAa,cAAe,SAAQ,qBAAY;IA+E9C,YAAa,OAA8B,EAAE;QAC3C,KAAK,EAAE,CAAC;QAzCV,UAAU;QACV,qBAAgB,GAAG,aAAa,CAAC,gBAAgB,CAAC;QAClD,eAAU,GA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Record } from '@appium/types';
|
|
1
|
+
import type { StringRecord, AppiumLogger } from '@appium/types';
|
|
2
2
|
import type B from 'bluebird';
|
|
3
3
|
export interface DeferredPromise {
|
|
4
4
|
promise: B<any>;
|
|
@@ -31,4 +31,44 @@ export interface Page {
|
|
|
31
31
|
bundleId?: string;
|
|
32
32
|
}
|
|
33
33
|
export type AppDict = StringRecord<AppInfo>;
|
|
34
|
+
export type EventListener = (event: StringRecord) => any;
|
|
35
|
+
export interface RemoteDebuggerOptions {
|
|
36
|
+
/** id of the app being connected to */
|
|
37
|
+
bundleId?: string;
|
|
38
|
+
/** array of possible bundle ids that the inspector could return */
|
|
39
|
+
additionalBundleIds?: string[];
|
|
40
|
+
/** version of iOS */
|
|
41
|
+
platformVersion?: string;
|
|
42
|
+
isSafari?: boolean;
|
|
43
|
+
includeSafari?: boolean;
|
|
44
|
+
/** for web inspector, whether this is a new Safari instance */
|
|
45
|
+
useNewSafari?: boolean;
|
|
46
|
+
/** the time, in ms, that should be waited for page loading */
|
|
47
|
+
pageLoadMs?: number;
|
|
48
|
+
/** the remote debugger's host address */
|
|
49
|
+
host?: string;
|
|
50
|
+
/** the remote debugger port through which to communicate */
|
|
51
|
+
port?: number;
|
|
52
|
+
socketPath?: string;
|
|
53
|
+
pageReadyTimeout?: number;
|
|
54
|
+
remoteDebugProxy?: string;
|
|
55
|
+
garbageCollectOnExecute?: boolean;
|
|
56
|
+
logFullResponse?: boolean;
|
|
57
|
+
/** log plists sent and received from Web Inspector */
|
|
58
|
+
logAllCommunication?: boolean;
|
|
59
|
+
/** log communication from Web Inspector as hex dump */
|
|
60
|
+
logAllCommunicationHexDump?: boolean;
|
|
61
|
+
/** The maximum size in bytes of a single data frame in the device communication protocol */
|
|
62
|
+
webInspectorMaxFrameLength?: number;
|
|
63
|
+
/** size, in bytes, of chunks of data sent to Web Inspector (real device only) */
|
|
64
|
+
socketChunkSize?: number;
|
|
65
|
+
fullPageInitialization?: boolean;
|
|
66
|
+
pageLoadStrategy?: string;
|
|
67
|
+
log?: AppiumLogger;
|
|
68
|
+
}
|
|
69
|
+
interface RemoteDebuggerRealDeviceSpecificOptions {
|
|
70
|
+
udid: string;
|
|
71
|
+
}
|
|
72
|
+
export type RemoteDebuggerRealDeviceOptions = RemoteDebuggerRealDeviceSpecificOptions & RemoteDebuggerOptions;
|
|
73
|
+
export {};
|
|
34
74
|
//# sourceMappingURL=types.d.ts.map
|