@appium/fake-driver 4.2.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/commands/alert.d.ts +345 -13
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +80 -53
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/contexts.d.ts +359 -14
- package/build/lib/commands/contexts.d.ts.map +1 -1
- package/build/lib/commands/contexts.js +102 -86
- package/build/lib/commands/contexts.js.map +1 -1
- package/build/lib/commands/element.d.ts +326 -22
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +108 -123
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/find.d.ts +338 -18
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +113 -107
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +364 -28
- package/build/lib/commands/general.d.ts.map +1 -1
- package/build/lib/commands/general.js +97 -106
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/index.d.ts +1598 -2
- package/build/lib/commands/index.d.ts.map +1 -1
- package/build/lib/commands/index.js +97 -18
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/driver.d.ts +117 -33
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +170 -145
- package/build/lib/driver.js.map +1 -1
- package/build/lib/fake-app.d.ts +15 -6
- package/build/lib/fake-app.d.ts.map +1 -1
- package/build/lib/fake-app.js +155 -194
- package/build/lib/fake-app.js.map +1 -1
- package/build/lib/fake-driver-schema.js +34 -26
- package/build/lib/fake-driver-schema.js.map +1 -1
- package/build/lib/fake-element.js +87 -121
- package/build/lib/fake-element.js.map +1 -1
- package/build/lib/index.d.ts +4 -5
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +15 -36
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.d.ts +1 -1
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +5 -15
- package/build/lib/logger.js.map +1 -1
- package/build/lib/scripts/fake-error.js +1 -5
- package/build/lib/scripts/fake-error.js.map +1 -1
- package/build/lib/scripts/fake-success.js +8 -11
- package/build/lib/scripts/fake-success.js.map +1 -1
- package/build/lib/server.d.ts +1 -1
- package/build/lib/server.d.ts.map +1 -1
- package/build/lib/server.js +18 -27
- package/build/lib/server.js.map +1 -1
- package/build/lib/types.d.ts +36 -0
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/commands/alert.js +74 -34
- package/lib/commands/contexts.js +90 -52
- package/lib/commands/element.js +111 -98
- package/lib/commands/find.js +101 -77
- package/lib/commands/general.js +106 -75
- package/lib/commands/index.js +13 -17
- package/lib/driver.js +103 -32
- package/lib/fake-app.js +20 -6
- package/lib/index.js +4 -7
- package/lib/types.ts +42 -0
- package/package.json +11 -11
|
@@ -1,16 +1,361 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @template {Class<import('../types').IFakeDriver>} T
|
|
5
|
+
* @param {T} Base
|
|
6
|
+
*/
|
|
7
|
+
export function ContextsMixin<T extends Class<import("../types").IFakeDriver, {}, any[]>>(Base: T): {
|
|
8
|
+
new (...arguments_: any[]): {
|
|
9
|
+
getRawContexts(): {
|
|
10
|
+
NATIVE_APP: null;
|
|
11
|
+
PROXY: null;
|
|
12
|
+
};
|
|
13
|
+
assertWebviewContext(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get the current appium context
|
|
16
|
+
*
|
|
17
|
+
* @returns {Promise<string>}
|
|
18
|
+
*/
|
|
19
|
+
getCurrentContext(): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Get the list of available contexts
|
|
22
|
+
*
|
|
23
|
+
* @returns {Promise<string[]>}
|
|
24
|
+
*/
|
|
25
|
+
getContexts(): Promise<string[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Set the current context
|
|
28
|
+
*
|
|
29
|
+
* @param {string} context - name of the context
|
|
30
|
+
* @returns {Promise<void>}
|
|
31
|
+
*/
|
|
32
|
+
setContext(context: string): Promise<void>;
|
|
33
|
+
curContext: string;
|
|
34
|
+
_proxyActive: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Set the active frame
|
|
37
|
+
*
|
|
38
|
+
* @param {number} frameId
|
|
39
|
+
* @returns {Promise<void>}
|
|
40
|
+
*/
|
|
41
|
+
setFrame(frameId: number): Promise<void>;
|
|
42
|
+
elMap: Record<string, import("../fake-element").FakeElement>;
|
|
43
|
+
maxElId: number;
|
|
44
|
+
appModel: import("../fake-app").FakeApp;
|
|
45
|
+
focusedElId: string;
|
|
46
|
+
server?: import("@appium/types").AppiumServer | undefined;
|
|
47
|
+
serverHost?: string | undefined;
|
|
48
|
+
serverPort?: number | undefined;
|
|
49
|
+
serverPath?: string | undefined;
|
|
50
|
+
setUrl?(url: string): Promise<void>;
|
|
51
|
+
getUrl?(): Promise<string>;
|
|
52
|
+
back?(): Promise<void>;
|
|
53
|
+
forward?(): Promise<void>;
|
|
54
|
+
refresh?(): Promise<void>;
|
|
55
|
+
title?(): Promise<string>;
|
|
56
|
+
getWindowHandle?(): Promise<string>;
|
|
57
|
+
closeWindow?(): Promise<string[]>;
|
|
58
|
+
setWindow?(handle: string): Promise<void>;
|
|
59
|
+
getWindowHandles?(): Promise<string[]>;
|
|
60
|
+
getWindowRect?(): Promise<import("@appium/types").Rect>;
|
|
61
|
+
setWindowRect?(x: number, y: number, width: number, height: number): Promise<import("@appium/types").Rect>;
|
|
62
|
+
maximizeWindow?(): Promise<import("@appium/types").Rect>;
|
|
63
|
+
minimizeWindow?(): Promise<import("@appium/types").Rect>;
|
|
64
|
+
fullScreenWindow?(): Promise<import("@appium/types").Rect>;
|
|
65
|
+
createNewWindow?(type?: import("@appium/types").NewWindowType | undefined): Promise<import("@appium/types").NewWindow>;
|
|
66
|
+
active?(): Promise<import("@appium/types").Element>;
|
|
67
|
+
elementSelected?(elementId: string): Promise<boolean>;
|
|
68
|
+
getAttribute?(name: string, elementId: string): Promise<string | null>;
|
|
69
|
+
getProperty?(name: string, elementId: string): Promise<string | null>;
|
|
70
|
+
getCssProperty?(name: string, elementId: string): Promise<string>;
|
|
71
|
+
getText?(elementId: string): Promise<string>;
|
|
72
|
+
getName?(elementId: string): Promise<string>;
|
|
73
|
+
getElementRect?(elementId: string): Promise<import("@appium/types").Rect>;
|
|
74
|
+
elementEnabled?(elementId: string): Promise<boolean>;
|
|
75
|
+
elementDisplayed?(elementId: string): Promise<boolean>;
|
|
76
|
+
click?(elementId: string): Promise<void>;
|
|
77
|
+
clear?(elementId: string): Promise<void>;
|
|
78
|
+
setValue?(text: string, elementId: string): Promise<void>;
|
|
79
|
+
execute?(script: string, args: unknown[]): Promise<unknown>;
|
|
80
|
+
executeAsync?(script: string, args: unknown[]): Promise<unknown>;
|
|
81
|
+
getCookies?(): Promise<import("@appium/types").Cookie[]>;
|
|
82
|
+
getCookie?(name: string): Promise<import("@appium/types").Cookie>;
|
|
83
|
+
setCookie?(cookie: import("@appium/types").Cookie): Promise<void>;
|
|
84
|
+
deleteCookie?(name: string): Promise<void>;
|
|
85
|
+
deleteCookies?(): Promise<void>;
|
|
86
|
+
performActions?(actions: import("@appium/types").ActionSequence[]): Promise<void>;
|
|
87
|
+
releaseActions?(): Promise<void>;
|
|
88
|
+
postDismissAlert?(): Promise<void>;
|
|
89
|
+
postAcceptAlert?(): Promise<void>;
|
|
90
|
+
getAlertText?(): Promise<string | null>;
|
|
91
|
+
setAlertText?(text: string): Promise<void>;
|
|
92
|
+
getScreenshot?(): Promise<string>;
|
|
93
|
+
getElementScreenshot?(elementId: string): Promise<string>;
|
|
94
|
+
mobileShake?(): Promise<void>;
|
|
95
|
+
getDeviceTime?(format?: string | undefined): Promise<string>;
|
|
96
|
+
lock?(seconds?: number | undefined): Promise<void>;
|
|
97
|
+
unlock?(): Promise<void>;
|
|
98
|
+
isLocked?(): Promise<boolean>;
|
|
99
|
+
startRecordingScreen?(options?: import("@appium/types").ScreenRecordOptions | undefined): Promise<void>;
|
|
100
|
+
stopRecordingScreen?(options?: import("@appium/types").ScreenRecordOptions | undefined): Promise<string>;
|
|
101
|
+
getPerformanceDataTypes?(): Promise<string[]>;
|
|
102
|
+
getPerformanceData?(packageName: string, dataType: string, dataReadTimeout?: number | undefined): Promise<string[]>;
|
|
103
|
+
pressKeyCode?(keycode: number, metastate?: number | undefined, flags?: number | undefined): Promise<void>;
|
|
104
|
+
longPressKeyCode?(keycode: number, metastate?: number | undefined, flags?: number | undefined): Promise<void>;
|
|
105
|
+
fingerprint?(fingerprintId: number): Promise<void>;
|
|
106
|
+
sendSMS?(phoneNumber: string, message: string): Promise<void>;
|
|
107
|
+
gsmCall?(phoneNumber: string, action: string): Promise<void>;
|
|
108
|
+
gsmSignal?(signalStrength: string): Promise<void>;
|
|
109
|
+
gsmVoice?(state: string): Promise<void>;
|
|
110
|
+
powerCapacity?(percent: number): Promise<void>;
|
|
111
|
+
powerAC?(state: string): Promise<void>;
|
|
112
|
+
networkSpeed?(netspeed: string): Promise<void>;
|
|
113
|
+
keyevent?(keycode: string, metastate?: string | undefined): Promise<void>;
|
|
114
|
+
mobileRotation?(x: number, y: number, radius: number, rotation: number, touchCount: number, duration: string, elementId?: string | undefined): Promise<void>;
|
|
115
|
+
getCurrentActivity?(): Promise<string>;
|
|
116
|
+
getCurrentPackage?(): Promise<string>;
|
|
117
|
+
installApp?(appPath: string, options?: unknown): Promise<void>;
|
|
118
|
+
activateApp?(appId: string, options?: unknown): Promise<void>;
|
|
119
|
+
removeApp?(appId: string, options?: unknown): Promise<void>;
|
|
120
|
+
terminateApp?(appId: string, options?: unknown): Promise<void>;
|
|
121
|
+
isAppInstalled?(appId: string): Promise<boolean>;
|
|
122
|
+
queryAppState?(appId: string): Promise<number>;
|
|
123
|
+
hideKeyboard?(strategy?: string | undefined, key?: string | undefined, keyCode?: string | undefined, keyName?: string | undefined): Promise<void>;
|
|
124
|
+
isKeyboardShown?(): Promise<boolean>;
|
|
125
|
+
pushFile?(path: string, data: string): Promise<void>;
|
|
126
|
+
pullFile?(path: string): Promise<string>;
|
|
127
|
+
pullFolder?(path: string): Promise<string>;
|
|
128
|
+
toggleFlightMode?(): Promise<void>;
|
|
129
|
+
toggleData?(): Promise<void>;
|
|
130
|
+
toggleWiFi?(): Promise<void>;
|
|
131
|
+
toggleLocationServices?(): Promise<void>;
|
|
132
|
+
openNotifications?(): Promise<void>;
|
|
133
|
+
startActivity?(appPackage: string, appActivity: string, appWaitPackage?: string | undefined, appWaitActivity?: string | undefined, intentAction?: string | undefined, intentCategory?: string | undefined, intentFlags?: string | undefined, optionalIntentArguments?: string | undefined, dontStopAppOnReset?: boolean | undefined): Promise<void>;
|
|
134
|
+
getSystemBars?(): Promise<unknown[]>;
|
|
135
|
+
getDisplayDensity?(): Promise<number>;
|
|
136
|
+
touchId?(match: boolean): Promise<void>;
|
|
137
|
+
toggleEnrollTouchId?(enabled: boolean): Promise<void>;
|
|
138
|
+
launchApp?(): Promise<void>;
|
|
139
|
+
closeApp?(): Promise<void>;
|
|
140
|
+
background?(seconds: number | null): Promise<void>;
|
|
141
|
+
endCoverage?(intent: string, path: string): Promise<void>;
|
|
142
|
+
getStrings?(language?: string | undefined, stringFile?: string | undefined): Promise<Record<string, unknown>>;
|
|
143
|
+
setValueImmediate?(value: string, elementId: string): Promise<void>;
|
|
144
|
+
replaceValue?(value: string, elementId: string): Promise<void>;
|
|
145
|
+
receiveAsyncResponse?(response: unknown): Promise<void>;
|
|
146
|
+
setClipboard?(content: string, contentType?: string | undefined, label?: string | undefined): Promise<void>;
|
|
147
|
+
getClipboard?(contentType?: string | undefined): Promise<string>;
|
|
148
|
+
asyncScriptTimeout?(ms: number): Promise<void>;
|
|
149
|
+
getWindowSize?(): Promise<import("@appium/types").Size>;
|
|
150
|
+
getLocation?(elementId: string): Promise<import("@appium/types").Position>;
|
|
151
|
+
getLocationInView?(elementId: string): Promise<import("@appium/types").Position>;
|
|
152
|
+
getSize?(elementId: string): Promise<import("@appium/types").Size>;
|
|
153
|
+
elementShadowRoot?(elementId: string): Promise<import("@appium/types").Element>;
|
|
154
|
+
findElementFromShadowRoot?(strategy: string, selector: string, shadowId: string): Promise<import("@appium/types").Element>;
|
|
155
|
+
findElementsFromShadowRoot?(strategy: string, selector: string, shadowId: string): Promise<import("@appium/types").Element[]>;
|
|
156
|
+
equalsElement?(elementId: string, otherElementId: string): Promise<boolean>;
|
|
157
|
+
submit?(elementId: string): Promise<void>;
|
|
158
|
+
keys?(value: string[]): Promise<void>;
|
|
159
|
+
availableIMEEngines?(): Promise<string[]>;
|
|
160
|
+
getActiveIMEEngine?(): Promise<string>;
|
|
161
|
+
isIMEActivated?(): Promise<boolean>;
|
|
162
|
+
deactivateIMEEngine?(): Promise<void>;
|
|
163
|
+
activateIMEEngine?(engine: string): Promise<void>;
|
|
164
|
+
getOrientation?(): Promise<string>;
|
|
165
|
+
setOrientation?(orientation: string): Promise<void>;
|
|
166
|
+
moveTo?(element?: string | null | undefined, xOffset?: number | undefined, yOffset?: number | undefined): Promise<void>;
|
|
167
|
+
buttonDown?(button?: number | undefined): Promise<void>;
|
|
168
|
+
buttonUp?(button?: number | undefined): Promise<void>;
|
|
169
|
+
clickCurrent?(button?: number | undefined): Promise<void>;
|
|
170
|
+
doubleClick?(): Promise<void>;
|
|
171
|
+
touchDown?(x: number, y: number): Promise<void>;
|
|
172
|
+
touchUp?(x: number, y: number): Promise<void>;
|
|
173
|
+
touchMove?(x: number, y: number): Promise<void>;
|
|
174
|
+
touchLongClick?(elementId: string): Promise<void>;
|
|
175
|
+
flick?(element?: string | undefined, xSpeed?: number | undefined, ySpeed?: number | undefined, xOffset?: number | undefined, yOffset?: number | undefined, speed?: number | undefined): Promise<void>;
|
|
176
|
+
getGeoLocation?(): Promise<import("@appium/types").Location>;
|
|
177
|
+
setGeoLocation?(location: Partial<import("@appium/types").Location>): Promise<void>;
|
|
178
|
+
getPageIndex?(elementId: string): Promise<string>;
|
|
179
|
+
getNetworkConnection?(): Promise<number>;
|
|
180
|
+
setNetworkConnection?(type: number): Promise<void>;
|
|
181
|
+
performTouch?(actions: unknown): Promise<void>;
|
|
182
|
+
performMultiAction?(actions: unknown, elementId: string): Promise<void>;
|
|
183
|
+
getRotation?(): Promise<import("@appium/types").Rotation>;
|
|
184
|
+
setRotation?(x: number, y: number, z: number): Promise<void>;
|
|
185
|
+
executeCdp?(cmd: string, params: unknown): Promise<unknown>;
|
|
186
|
+
addVirtualAuthenticator?(protocol: string, transport: string, hasResidentKey?: boolean | undefined, hasUserVerification?: boolean | undefined, isUserConsenting?: boolean | undefined, isUserVerified?: boolean | undefined): Promise<void>;
|
|
187
|
+
removeVirtualAuthenticator?(): Promise<void>;
|
|
188
|
+
addAuthCredential?(credentialId: string, isResidentCredential: boolean, rpId: string, privateKey: string, userHandle?: string | undefined, signCount?: number | undefined): Promise<void>;
|
|
189
|
+
getAuthCredential?(): Promise<import("@appium/types").Credential[]>;
|
|
190
|
+
removeAllAuthCredentials?(): Promise<void>;
|
|
191
|
+
removeAuthCredential?(): Promise<void>;
|
|
192
|
+
setUserAuthVerified?(isUserVerified: boolean): Promise<void>;
|
|
193
|
+
proxyCommand?<T_1 = any>(url: string, method: import("@appium/types").HTTPMethod, body?: string | undefined): Promise<T_1>;
|
|
194
|
+
cliArgs: import("@appium/types").StringRecord;
|
|
195
|
+
executeCommand(cmd: string, ...args: any[]): Promise<any>;
|
|
196
|
+
startUnexpectedShutdown(err?: Error | undefined): Promise<void>;
|
|
197
|
+
startNewCommandTimeout(): Promise<void>;
|
|
198
|
+
reset(): Promise<void>;
|
|
199
|
+
caps?: Partial<import("@appium/types").ConstraintsToCaps<{
|
|
200
|
+
readonly app: {
|
|
201
|
+
readonly presence: true;
|
|
202
|
+
readonly isString: true;
|
|
203
|
+
};
|
|
204
|
+
readonly uniqueApp: {
|
|
205
|
+
readonly isBoolean: true;
|
|
206
|
+
};
|
|
207
|
+
}> & void> | undefined;
|
|
208
|
+
originalCaps?: import("@appium/types").W3CCapabilities<{
|
|
209
|
+
readonly app: {
|
|
210
|
+
readonly presence: true;
|
|
211
|
+
readonly isString: true;
|
|
212
|
+
};
|
|
213
|
+
readonly uniqueApp: {
|
|
214
|
+
readonly isBoolean: true;
|
|
215
|
+
};
|
|
216
|
+
}, void> | undefined;
|
|
217
|
+
desiredCapConstraints: {
|
|
218
|
+
readonly app: {
|
|
219
|
+
readonly presence: true;
|
|
220
|
+
readonly isString: true;
|
|
221
|
+
};
|
|
222
|
+
readonly uniqueApp: {
|
|
223
|
+
readonly isBoolean: true;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
validateDesiredCaps(caps: Partial<import("@appium/types").ConstraintsToCaps<{
|
|
227
|
+
readonly app: {
|
|
228
|
+
readonly presence: true;
|
|
229
|
+
readonly isString: true;
|
|
230
|
+
};
|
|
231
|
+
readonly uniqueApp: {
|
|
232
|
+
readonly isBoolean: true;
|
|
233
|
+
};
|
|
234
|
+
}> & void>): boolean;
|
|
235
|
+
logExtraCaps(caps: Partial<import("@appium/types").ConstraintsToCaps<{
|
|
236
|
+
readonly app: {
|
|
237
|
+
readonly presence: true;
|
|
238
|
+
readonly isString: true;
|
|
239
|
+
};
|
|
240
|
+
readonly uniqueApp: {
|
|
241
|
+
readonly isBoolean: true;
|
|
242
|
+
};
|
|
243
|
+
}> & void>): void;
|
|
244
|
+
assignServer?(server: import("@appium/types").AppiumServer, host: string, port: number, path: string): void;
|
|
245
|
+
getSessions(): Promise<import("@appium/types").MultiSessionData<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, void>[]>;
|
|
246
|
+
getSession(): Promise<import("@appium/types").SingularSessionData<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, void>>;
|
|
247
|
+
supportedLogTypes: Readonly<import("@appium/types").LogDefRecord<{
|
|
248
|
+
readonly app: {
|
|
249
|
+
readonly presence: true;
|
|
250
|
+
readonly isString: true;
|
|
251
|
+
};
|
|
252
|
+
readonly uniqueApp: {
|
|
253
|
+
readonly isBoolean: true;
|
|
254
|
+
};
|
|
255
|
+
}>>;
|
|
256
|
+
getLogTypes(): Promise<string[]>;
|
|
257
|
+
getLog(logType: string): Promise<unknown[]>;
|
|
258
|
+
findElement(strategy: string, selector: string): Promise<import("@appium/types").Element>;
|
|
259
|
+
findElements(strategy: string, selector: string): Promise<import("@appium/types").Element[]>;
|
|
260
|
+
findElementFromElement(strategy: string, selector: string, elementId: string): Promise<import("@appium/types").Element>;
|
|
261
|
+
findElementsFromElement(strategy: string, selector: string, elementId: string): Promise<import("@appium/types").Element[]>;
|
|
262
|
+
findElOrEls<Mult extends boolean>(strategy: string, selector: string, mult: Mult, context?: any): Promise<Mult extends true ? import("@appium/types").Element[] : import("@appium/types").Element>;
|
|
263
|
+
findElOrElsWithProcessing<Mult_1 extends boolean>(strategy: string, selector: string, mult: Mult_1, context?: any): Promise<Mult_1 extends true ? import("@appium/types").Element[] : import("@appium/types").Element>;
|
|
264
|
+
getPageSource(): Promise<string>;
|
|
265
|
+
updateSettings: (settings: import("@appium/types").StringRecord) => Promise<void>;
|
|
266
|
+
getSettings(): Promise<import("@appium/types").StringRecord>;
|
|
267
|
+
timeouts(type: string, ms: string | number, script?: number | undefined, pageLoad?: number | undefined, implicit?: string | number | undefined): Promise<void>;
|
|
268
|
+
setNewCommandTimeout(ms: number): void;
|
|
269
|
+
implicitWait(ms: string | number): Promise<void>; /**
|
|
270
|
+
* Get the current appium context
|
|
271
|
+
*
|
|
272
|
+
* @returns {Promise<string>}
|
|
273
|
+
*/
|
|
274
|
+
setImplicitWait(ms: number): void;
|
|
275
|
+
implicitWaitForCondition(condition: () => Promise<any>): Promise<unknown>;
|
|
276
|
+
getTimeouts(): Promise<Record<string, number>>;
|
|
277
|
+
implicitWaitW3C(ms: number): Promise<void>;
|
|
278
|
+
implicitWaitMJSONWP(ms: number): Promise<void>;
|
|
279
|
+
pageLoadTimeoutW3C(ms: number): Promise<void>;
|
|
280
|
+
pageLoadTimeoutMJSONWP(ms: number): Promise<void>;
|
|
281
|
+
scriptTimeoutW3C(ms: number): Promise<void>;
|
|
282
|
+
scriptTimeoutMJSONWP(ms: number): Promise<void>;
|
|
283
|
+
newCommandTimeout(ms: number): Promise<void>;
|
|
284
|
+
parseTimeoutArgument(ms: string | number): number;
|
|
285
|
+
logCustomEvent(vendor: string, event: string): Promise<void>;
|
|
286
|
+
getLogEvents(type?: string | string[] | undefined): Promise<import("@appium/types").EventHistory | Record<string, number>>;
|
|
287
|
+
executeMethod(script: string, args: [] | [import("@appium/types").StringRecord]): Promise<any>; /**
|
|
288
|
+
* Set the active frame
|
|
289
|
+
*
|
|
290
|
+
* @param {number} frameId
|
|
291
|
+
* @returns {Promise<void>}
|
|
292
|
+
*/
|
|
293
|
+
createSession(w3cCaps1: import("@appium/types").W3CCapabilities<{
|
|
294
|
+
readonly app: {
|
|
295
|
+
readonly presence: true;
|
|
296
|
+
readonly isString: true;
|
|
297
|
+
};
|
|
298
|
+
readonly uniqueApp: {
|
|
299
|
+
readonly isBoolean: true;
|
|
300
|
+
};
|
|
301
|
+
}, void>, w3cCaps2?: import("@appium/types").W3CCapabilities<{
|
|
302
|
+
readonly app: {
|
|
303
|
+
readonly presence: true;
|
|
304
|
+
readonly isString: true;
|
|
305
|
+
};
|
|
306
|
+
readonly uniqueApp: {
|
|
307
|
+
readonly isBoolean: true;
|
|
308
|
+
};
|
|
309
|
+
}, void> | undefined, w3cCaps?: import("@appium/types").W3CCapabilities<{
|
|
310
|
+
readonly app: {
|
|
311
|
+
readonly presence: true;
|
|
312
|
+
readonly isString: true;
|
|
313
|
+
};
|
|
314
|
+
readonly uniqueApp: {
|
|
315
|
+
readonly isBoolean: true;
|
|
316
|
+
};
|
|
317
|
+
}, void> | undefined, driverData?: import("@appium/types").DriverData[] | undefined): Promise<[string, any]>;
|
|
318
|
+
deleteSession(sessionId?: string | undefined, driverData?: import("@appium/types").DriverData[] | undefined): Promise<void>;
|
|
319
|
+
shouldValidateCaps: boolean;
|
|
320
|
+
sessionId: string | null;
|
|
321
|
+
opts: import("@appium/types").DriverOpts<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>;
|
|
322
|
+
initialOpts: import("@appium/types").ServerArgs;
|
|
323
|
+
protocol?: string | undefined;
|
|
324
|
+
helpers: import("@appium/types").DriverHelpers<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>;
|
|
325
|
+
basePath: string;
|
|
326
|
+
relaxedSecurityEnabled: boolean;
|
|
327
|
+
allowInsecure: string[];
|
|
328
|
+
denyInsecure: string[];
|
|
329
|
+
newCommandTimeoutMs: number;
|
|
330
|
+
implicitWaitMs: number;
|
|
331
|
+
locatorStrategies: string[];
|
|
332
|
+
webLocatorStrategies: string[];
|
|
333
|
+
eventEmitter: import("events");
|
|
334
|
+
settings: import("@appium/types").DeviceSettings<any>;
|
|
335
|
+
log: import("@appium/types").AppiumLogger;
|
|
336
|
+
driverData?: import("@appium/types").DriverData | undefined;
|
|
337
|
+
isCommandsQueueEnabled: boolean;
|
|
338
|
+
eventHistory: import("@appium/types").EventHistory;
|
|
339
|
+
onUnexpectedShutdown(handler: () => any): void;
|
|
340
|
+
getStatus(): Promise<any>;
|
|
341
|
+
sessionExists(sessionId: string): boolean;
|
|
342
|
+
isW3CProtocol(): boolean;
|
|
343
|
+
isMjsonwpProtocol(): boolean;
|
|
344
|
+
isFeatureEnabled(name: string): boolean;
|
|
345
|
+
assertFeatureEnabled(name: string): void;
|
|
346
|
+
validateLocatorStrategy(strategy: string, webContext?: boolean | undefined): void;
|
|
347
|
+
proxyActive(sessionId?: string | undefined): boolean;
|
|
348
|
+
getProxyAvoidList(sessionId?: string | undefined): import("@appium/types").RouteMatcher[];
|
|
349
|
+
canProxy(sessionId?: string | undefined): boolean;
|
|
350
|
+
proxyRouteIsAvoided(sessionId: string, method: string, url: string): boolean;
|
|
351
|
+
addManagedDriver(driver: import("@appium/types").Driver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, import("@appium/types").StringRecord, any>): void;
|
|
352
|
+
getManagedDrivers(): import("@appium/types").Driver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, import("@appium/types").StringRecord, any>[];
|
|
353
|
+
clearNewCommandTimeout(): Promise<void>;
|
|
354
|
+
logEvent(eventName: string): void;
|
|
355
|
+
driverForSession(sessionId: string): import("@appium/types").Core<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS> | null;
|
|
12
356
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
357
|
+
} & T;
|
|
358
|
+
export type FakeDriverCore = import('../driver').FakeDriverCore;
|
|
359
|
+
export type IContextsCommands = import('../types').IContextsCommands;
|
|
360
|
+
export type Class<T, U = {}, V = any[]> = import('@appium/types').Class<T, U, V>;
|
|
16
361
|
//# sourceMappingURL=contexts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../lib/commands/contexts.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../lib/commands/contexts.js"],"names":[],"mappings":";AAGA;;;;GAIG;AACH;;;;;;;QAoBI;;;;WAIG;6BADU,QAAQ,MAAM,CAAC;QAM5B;;;;WAIG;uBADU,QAAQ,MAAM,EAAE,CAAC;QAM9B;;;;;WAKG;4BAFQ,MAAM,GACJ,QAAQ,IAAI,CAAC;;;QAoB1B;;;;;WAKG;0BAFQ,MAAM,GACJ,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DA9C1B;;;;WAIG;;;;;;;;;;;;;;wGAsCH;;;;;WAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBN;6BAGY,OAAO,WAAW,EAAE,cAAc;gCAClC,OAAO,UAAU,EAAE,iBAAiB;0CAKpC,OAAO,eAAe,EAAE,KAAK,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC"}
|
|
@@ -1,89 +1,105 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.helpers = exports.default = exports.commands = void 0;
|
|
7
|
-
|
|
8
|
-
require("source-map-support/register");
|
|
9
|
-
|
|
10
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
|
-
|
|
12
|
-
var _driver = require("appium/driver");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
let commands = {},
|
|
17
|
-
helpers = {},
|
|
18
|
-
extensions = {};
|
|
19
|
-
exports.helpers = helpers;
|
|
20
|
-
exports.commands = commands;
|
|
21
|
-
|
|
22
|
-
helpers.getRawContexts = function getRawContexts() {
|
|
23
|
-
let contexts = {
|
|
24
|
-
NATIVE_APP: null,
|
|
25
|
-
PROXY: null
|
|
26
|
-
};
|
|
27
|
-
let wvs = this.appModel.getWebviews();
|
|
28
|
-
|
|
29
|
-
for (let i = 1; i < wvs.length + 1; i++) {
|
|
30
|
-
contexts[`WEBVIEW_${i}`] = wvs[i - 1];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return contexts;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
4
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ContextsMixin = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const driver_1 = require("appium/driver");
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @template {Class<import('../types').IFakeDriver>} T
|
|
12
|
+
* @param {T} Base
|
|
13
|
+
*/
|
|
14
|
+
function ContextsMixin(Base) {
|
|
15
|
+
/**
|
|
16
|
+
* @implements {IContextsCommands}
|
|
17
|
+
*/
|
|
18
|
+
class ContextsCommands extends Base {
|
|
19
|
+
getRawContexts() {
|
|
20
|
+
let contexts = { NATIVE_APP: null, PROXY: null };
|
|
21
|
+
let wvs = this.appModel?.getWebviews() ?? [];
|
|
22
|
+
for (let i = 1; i < wvs.length + 1; i++) {
|
|
23
|
+
contexts[`WEBVIEW_${i}`] = wvs[i - 1];
|
|
24
|
+
}
|
|
25
|
+
return contexts;
|
|
26
|
+
}
|
|
27
|
+
assertWebviewContext() {
|
|
28
|
+
if (this.curContext === 'NATIVE_APP') {
|
|
29
|
+
throw new driver_1.errors.InvalidContextError();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the current appium context
|
|
34
|
+
*
|
|
35
|
+
* @returns {Promise<string>}
|
|
36
|
+
*/
|
|
37
|
+
async getCurrentContext() {
|
|
38
|
+
return this.curContext;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the list of available contexts
|
|
42
|
+
*
|
|
43
|
+
* @returns {Promise<string[]>}
|
|
44
|
+
*/
|
|
45
|
+
async getContexts() {
|
|
46
|
+
return lodash_1.default.keys(this.getRawContexts());
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Set the current context
|
|
50
|
+
*
|
|
51
|
+
* @param {string} context - name of the context
|
|
52
|
+
* @returns {Promise<void>}
|
|
53
|
+
*/
|
|
54
|
+
async setContext(context) {
|
|
55
|
+
let contexts = this.getRawContexts();
|
|
56
|
+
if (context in contexts) {
|
|
57
|
+
this.curContext = context;
|
|
58
|
+
if (context === 'NATIVE_APP') {
|
|
59
|
+
this.appModel.deactivateWebview();
|
|
60
|
+
this._proxyActive = false;
|
|
61
|
+
}
|
|
62
|
+
else if (context === 'PROXY') {
|
|
63
|
+
this._proxyActive = true;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.appModel.activateWebview(contexts[context]);
|
|
67
|
+
this._proxyActive = false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
throw new driver_1.errors.NoSuchContextError();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Set the active frame
|
|
76
|
+
*
|
|
77
|
+
* @param {number} frameId
|
|
78
|
+
* @returns {Promise<void>}
|
|
79
|
+
*/
|
|
80
|
+
async setFrame(frameId) {
|
|
81
|
+
this.assertWebviewContext();
|
|
82
|
+
if (frameId === null) {
|
|
83
|
+
this.appModel.deactivateFrame();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
let nodes = this.appModel.xpathQuery(`//iframe[@id="${frameId}"]`);
|
|
87
|
+
if (!nodes.length) {
|
|
88
|
+
throw new driver_1.errors.NoSuchFrameError();
|
|
89
|
+
}
|
|
90
|
+
this.appModel.activateFrame(nodes[0]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
64
93
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (!nodes.length) {
|
|
79
|
-
throw new _driver.errors.NoSuchFrameError();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
this.appModel.activateFrame(nodes[0]);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
Object.assign(extensions, commands, helpers);
|
|
87
|
-
var _default = extensions;
|
|
88
|
-
exports.default = _default;
|
|
89
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb21tYW5kcyIsImhlbHBlcnMiLCJleHRlbnNpb25zIiwiZ2V0UmF3Q29udGV4dHMiLCJjb250ZXh0cyIsIk5BVElWRV9BUFAiLCJQUk9YWSIsInd2cyIsImFwcE1vZGVsIiwiZ2V0V2Vidmlld3MiLCJpIiwibGVuZ3RoIiwiYXNzZXJ0V2Vidmlld0NvbnRleHQiLCJjdXJDb250ZXh0IiwiZXJyb3JzIiwiSW52YWxpZENvbnRleHRFcnJvciIsImdldEN1cnJlbnRDb250ZXh0IiwiZ2V0Q29udGV4dHMiLCJfIiwia2V5cyIsInNldENvbnRleHQiLCJjb250ZXh0IiwiaW5jbHVkZXMiLCJkZWFjdGl2YXRlV2VidmlldyIsIl9wcm94eUFjdGl2ZSIsImFjdGl2YXRlV2VidmlldyIsIk5vU3VjaENvbnRleHRFcnJvciIsInNldEZyYW1lIiwiZnJhbWVJZCIsImRlYWN0aXZhdGVGcm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FBRCxDQUF0QztNQUNBLEtBQUtHLFlBQUwsR0FBb0IsS0FBcEI7SUFDRDtFQUNGLENBWEQsTUFXTztJQUNMLE1BQU0sSUFBSVYsY0FBQSxDQUFPWSxrQkFBWCxFQUFOO0VBQ0Q7QUFDRixDQWhCRDs7QUFrQkExQixRQUFRLENBQUMyQixRQUFULEdBQW9CLGVBQWVBLFFBQWYsQ0FBd0JDLE9BQXhCLEVBQWlDO0VBQ25ELEtBQUtoQixvQkFBTDs7RUFDQSxJQUFJZ0IsT0FBTyxLQUFLLElBQWhCLEVBQXNCO0lBQ3BCLEtBQUtwQixRQUFMLENBQWNxQixlQUFkO0VBQ0QsQ0FGRCxNQUVPO0lBQ0wsSUFBSUMsS0FBSyxHQUFHLEtBQUt0QixRQUFMLENBQWN1QixVQUFkLENBQTBCLGlCQUFnQkgsT0FBUSxJQUFsRCxDQUFaOztJQUNBLElBQUksQ0FBQ0UsS0FBSyxDQUFDbkIsTUFBWCxFQUFtQjtNQUNqQixNQUFNLElBQUlHLGNBQUEsQ0FBT2tCLGdCQUFYLEVBQU47SUFDRDs7SUFDRCxLQUFLeEIsUUFBTCxDQUFjeUIsYUFBZCxDQUE0QkgsS0FBSyxDQUFDLENBQUQsQ0FBakM7RUFDRDtBQUNGLENBWEQ7O0FBYUFJLE1BQU0sQ0FBQ0MsTUFBUCxDQUFjakMsVUFBZCxFQUEwQkYsUUFBMUIsRUFBb0NDLE9BQXBDO2VBRWVDLFUifQ==
|
|
94
|
+
return ContextsCommands;
|
|
95
|
+
}
|
|
96
|
+
exports.ContextsMixin = ContextsMixin;
|
|
97
|
+
/**
|
|
98
|
+
* @typedef {import('../driver').FakeDriverCore} FakeDriverCore
|
|
99
|
+
* @typedef {import('../types').IContextsCommands} IContextsCommands
|
|
100
|
+
*/
|
|
101
|
+
/**
|
|
102
|
+
* @template T,[U={}],[V=Array<any>]
|
|
103
|
+
* @typedef {import('@appium/types').Class<T,U,V>} Class
|
|
104
|
+
*/
|
|
105
|
+
//# sourceMappingURL=contexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.js","
|
|
1
|
+
{"version":3,"file":"contexts.js","sourceRoot":"","sources":["../../../lib/commands/contexts.js"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,0CAAqC;AAErC;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAI;IAChC;;OAEG;IACH,MAAM,gBAAiB,SAAQ,IAAI;QACjC,cAAc;YACZ,IAAI,QAAQ,GAAG,EAAC,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;YAC/C,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;YAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;gBACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;aACvC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,oBAAoB;YAClB,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,EAAE;gBACpC,MAAM,IAAI,eAAM,CAAC,mBAAmB,EAAE,CAAC;aACxC;QACH,CAAC;QAED;;;;WAIG;QACH,KAAK,CAAC,iBAAiB;YACrB,OAAO,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;QAED;;;;WAIG;QACH,KAAK,CAAC,WAAW;YACf,OAAO,gBAAC,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QACvC,CAAC;QAED;;;;;WAKG;QACH,KAAK,CAAC,UAAU,CAAC,OAAO;YACtB,IAAI,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YACrC,IAAI,OAAO,IAAI,QAAQ,EAAE;gBACvB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;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