@appium/fake-driver 4.2.2 → 5.1.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 +330 -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 +330 -14
- package/build/lib/commands/contexts.d.ts.map +1 -1
- package/build/lib/commands/contexts.js +101 -86
- package/build/lib/commands/contexts.js.map +1 -1
- package/build/lib/commands/element.d.ts +315 -22
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +112 -123
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/find.d.ts +328 -18
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +118 -107
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +332 -28
- package/build/lib/commands/general.d.ts.map +1 -1
- package/build/lib/commands/general.js +101 -106
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/index.d.ts +1523 -2
- package/build/lib/commands/index.d.ts.map +1 -1
- package/build/lib/commands/index.js +96 -18
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/driver.d.ts +145 -33
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +200 -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 +6 -5
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +19 -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 +89 -52
- package/lib/commands/element.js +115 -98
- package/lib/commands/find.js +106 -77
- package/lib/commands/general.js +112 -75
- package/lib/commands/index.js +12 -17
- package/lib/driver.js +132 -39
- package/lib/fake-app.js +20 -6
- package/lib/index.js +9 -7
- package/lib/types.ts +42 -0
- package/package.json +13 -12
- package/tsconfig.json +20 -0
|
@@ -1,14 +1,331 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* @template {Class<import('../types').IContextsCommands & import('@appium/types').IFindCommands>} T
|
|
4
|
+
* @param {T} Base
|
|
5
|
+
* @returns {Class<AlertCommands>}
|
|
6
|
+
*/
|
|
7
|
+
export function AlertMixin<T extends Class<import("../types").IContextsCommands & import("@appium/types").IFindCommands<any>, {}, any[]>>(Base: T): Class<{
|
|
8
|
+
assertNoAlert(): void;
|
|
9
|
+
assertAlert(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Get the text of an alert
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<string>}
|
|
14
|
+
*/
|
|
15
|
+
getAlertText(): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Set the text of an alert
|
|
18
|
+
*
|
|
19
|
+
* @param {string} text
|
|
20
|
+
* @returns {Promise<void>}
|
|
21
|
+
*/
|
|
22
|
+
setAlertText(text: string): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Accept an alert
|
|
25
|
+
*
|
|
26
|
+
* @returns {Promise<void>}
|
|
27
|
+
*/
|
|
28
|
+
postAcceptAlert(): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Dismiss an alert
|
|
31
|
+
*
|
|
32
|
+
* @returns {Promise<null>}
|
|
33
|
+
*/
|
|
34
|
+
postDismissAlert: () => Promise<void>;
|
|
35
|
+
assertWebviewContext(): void;
|
|
36
|
+
elMap: Record<string, import("../fake-element").FakeElement>;
|
|
37
|
+
maxElId: number;
|
|
38
|
+
appModel: import("../fake-app").FakeApp;
|
|
39
|
+
focusedElId: string;
|
|
40
|
+
curContext: string;
|
|
41
|
+
server?: import("@appium/types").AppiumServer | undefined;
|
|
42
|
+
serverHost?: string | undefined;
|
|
43
|
+
serverPort?: number | undefined;
|
|
44
|
+
serverPath?: string | undefined;
|
|
45
|
+
setUrl?(url: string): Promise<void>;
|
|
46
|
+
getUrl?(): Promise<string>;
|
|
47
|
+
back?(): Promise<void>;
|
|
48
|
+
forward?(): Promise<void>;
|
|
49
|
+
refresh?(): Promise<void>;
|
|
50
|
+
title?(): Promise<string>;
|
|
51
|
+
getWindowHandle?(): Promise<string>;
|
|
52
|
+
closeWindow?(): Promise<string[]>;
|
|
53
|
+
setWindow?(handle: string): Promise<void>;
|
|
54
|
+
getWindowHandles?(): Promise<string[]>;
|
|
55
|
+
createNewWindow?(type?: import("@appium/types").NewWindowType | undefined): Promise<import("@appium/types").NewWindow>;
|
|
56
|
+
setFrame?(id: string | number | null): Promise<void>;
|
|
57
|
+
switchToParentFrame?(): Promise<void>;
|
|
58
|
+
getWindowRect?(): Promise<import("@appium/types").Rect>;
|
|
59
|
+
setWindowRect?(x: number, y: number, width: number, height: number): Promise<import("@appium/types").Rect>;
|
|
60
|
+
maximizeWindow?(): Promise<import("@appium/types").Rect>;
|
|
61
|
+
minimizeWindow?(): Promise<import("@appium/types").Rect>;
|
|
62
|
+
fullScreenWindow?(): Promise<import("@appium/types").Rect>;
|
|
63
|
+
active?(): Promise<import("@appium/types").Element>;
|
|
64
|
+
elementShadowRoot?(elementId: string): Promise<import("@appium/types").Element>;
|
|
65
|
+
elementSelected?(elementId: string): Promise<boolean>;
|
|
66
|
+
getAttribute?(name: string, elementId: string): Promise<string | null>;
|
|
67
|
+
getProperty?(name: string, elementId: string): Promise<string | null>;
|
|
68
|
+
getCssProperty?(name: string, elementId: string): Promise<string>;
|
|
69
|
+
getText?(elementId: string): Promise<string>;
|
|
70
|
+
getName?(elementId: string): Promise<string>;
|
|
71
|
+
getElementRect?(elementId: string): Promise<import("@appium/types").Rect>;
|
|
72
|
+
elementEnabled?(elementId: string): Promise<boolean>;
|
|
73
|
+
getComputedRole?(elementId: string): Promise<string | null>;
|
|
74
|
+
getComputedLabel?(elementId: string): Promise<string | null>;
|
|
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
|
+
getScreenshot?(): Promise<string>;
|
|
89
|
+
getElementScreenshot?(elementId: string): Promise<string>;
|
|
90
|
+
mobileShake?(): Promise<void>;
|
|
91
|
+
getDeviceTime?(format?: string | undefined): Promise<string>;
|
|
92
|
+
lock?(seconds?: number | undefined): Promise<void>;
|
|
93
|
+
unlock?(): Promise<void>;
|
|
94
|
+
isLocked?(): Promise<boolean>;
|
|
95
|
+
startRecordingScreen?(options?: import("@appium/types").StartScreenRecordOptions | undefined): Promise<void>;
|
|
96
|
+
stopRecordingScreen?(options?: import("@appium/types").StopScreenRecordOptions | undefined): Promise<string>;
|
|
97
|
+
getPerformanceDataTypes?(): Promise<string[]>;
|
|
98
|
+
getPerformanceData?(packageName: string, dataType: string, dataReadTimeout?: number | undefined): Promise<string[]>;
|
|
99
|
+
pressKeyCode?(keycode: number, metastate?: number | undefined, flags?: number | undefined): Promise<void>;
|
|
100
|
+
longPressKeyCode?(keycode: number, metastate?: number | undefined, flags?: number | undefined): Promise<void>;
|
|
101
|
+
fingerprint?(fingerprintId: number): Promise<void>;
|
|
102
|
+
sendSMS?(phoneNumber: string, message: string): Promise<void>;
|
|
103
|
+
gsmCall?(phoneNumber: string, action: string): Promise<void>;
|
|
104
|
+
gsmSignal?(signalStrength: string): Promise<void>;
|
|
105
|
+
gsmVoice?(state: string): Promise<void>;
|
|
106
|
+
powerCapacity?(percent: number): Promise<void>;
|
|
107
|
+
powerAC?(state: string): Promise<void>;
|
|
108
|
+
networkSpeed?(netspeed: string): Promise<void>;
|
|
109
|
+
keyevent?(keycode: string, metastate?: string | undefined): Promise<void>;
|
|
110
|
+
mobileRotation?(x: number, y: number, radius: number, rotation: number, touchCount: number, duration: string, elementId?: string | undefined): Promise<void>;
|
|
111
|
+
getCurrentActivity?(): Promise<string>;
|
|
112
|
+
getCurrentPackage?(): Promise<string>;
|
|
113
|
+
installApp?(appPath: string, options?: unknown): Promise<void>;
|
|
114
|
+
activateApp?(appId: string, options?: unknown): Promise<void>;
|
|
115
|
+
removeApp?(appId: string, options?: unknown): Promise<void>;
|
|
116
|
+
terminateApp?(appId: string, options?: unknown): Promise<void>;
|
|
117
|
+
isAppInstalled?(appId: string): Promise<boolean>;
|
|
118
|
+
queryAppState?(appId: string): Promise<0 | 1 | 3 | 4>;
|
|
119
|
+
hideKeyboard?(strategy?: string | undefined, key?: string | undefined, keyCode?: string | undefined, keyName?: string | undefined): Promise<void>;
|
|
120
|
+
isKeyboardShown?(): Promise<boolean>;
|
|
121
|
+
pushFile?(path: string, data: string): Promise<void>;
|
|
122
|
+
pullFile?(path: string): Promise<string>;
|
|
123
|
+
pullFolder?(path: string): Promise<string>;
|
|
124
|
+
toggleFlightMode?(): Promise<void>;
|
|
125
|
+
toggleData?(): Promise<void>;
|
|
126
|
+
toggleWiFi?(): Promise<void>;
|
|
127
|
+
toggleLocationServices?(): Promise<void>;
|
|
128
|
+
openNotifications?(): Promise<void>;
|
|
129
|
+
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>;
|
|
130
|
+
getSystemBars?(): Promise<unknown[]>;
|
|
131
|
+
getDisplayDensity?(): Promise<number>;
|
|
132
|
+
touchId?(match: boolean): Promise<void>;
|
|
133
|
+
toggleEnrollTouchId?(enabled: boolean): Promise<void>;
|
|
134
|
+
launchApp?(): Promise<void>;
|
|
135
|
+
closeApp?(): Promise<void>;
|
|
136
|
+
background?(seconds: number | null): Promise<void>;
|
|
137
|
+
endCoverage?(intent: string, path: string): Promise<void>;
|
|
138
|
+
getStrings?(language?: string | undefined, stringFile?: string | undefined): Promise<Record<string, unknown>>;
|
|
139
|
+
setValueImmediate?(value: string, elementId: string): Promise<void>;
|
|
140
|
+
replaceValue?(value: string, elementId: string): Promise<void>;
|
|
141
|
+
receiveAsyncResponse?(response: unknown): Promise<void>;
|
|
142
|
+
setClipboard?(content: string, contentType?: string | undefined, label?: string | undefined): Promise<void>;
|
|
143
|
+
getClipboard?(contentType?: string | undefined): Promise<string>;
|
|
144
|
+
asyncScriptTimeout?(ms: number): Promise<void>;
|
|
145
|
+
getWindowSize?(): Promise<import("@appium/types").Size>;
|
|
146
|
+
getLocation?(elementId: string): Promise<import("@appium/types").Position>;
|
|
147
|
+
getLocationInView?(elementId: string): Promise<import("@appium/types").Position>;
|
|
148
|
+
getSize?(elementId: string): Promise<import("@appium/types").Size>;
|
|
149
|
+
equalsElement?(elementId: string, otherElementId: string): Promise<boolean>;
|
|
150
|
+
submit?(elementId: string): Promise<void>;
|
|
151
|
+
keys?(value: string[]): Promise<void>;
|
|
152
|
+
availableIMEEngines?(): Promise<string[]>;
|
|
153
|
+
getActiveIMEEngine?(): Promise<string>;
|
|
154
|
+
isIMEActivated?(): Promise<boolean>;
|
|
155
|
+
deactivateIMEEngine?(): Promise<void>;
|
|
156
|
+
activateIMEEngine?(engine: string): Promise<void>;
|
|
157
|
+
getOrientation?(): Promise<string>;
|
|
158
|
+
setOrientation?(orientation: string): Promise<void>;
|
|
159
|
+
moveTo?(element?: string | null | undefined, xOffset?: number | undefined, yOffset?: number | undefined): Promise<void>;
|
|
160
|
+
buttonDown?(button?: number | undefined): Promise<void>;
|
|
161
|
+
buttonUp?(button?: number | undefined): Promise<void>;
|
|
162
|
+
clickCurrent?(button?: number | undefined): Promise<void>;
|
|
163
|
+
doubleClick?(): Promise<void>;
|
|
164
|
+
touchDown?(x: number, y: number): Promise<void>;
|
|
165
|
+
touchUp?(x: number, y: number): Promise<void>;
|
|
166
|
+
touchMove?(x: number, y: number): Promise<void>;
|
|
167
|
+
touchLongClick?(elementId: string): Promise<void>;
|
|
168
|
+
flick?(element?: string | undefined, xSpeed?: number | undefined, ySpeed?: number | undefined, xOffset?: number | undefined, yOffset?: number | undefined, speed?: number | undefined): Promise<void>;
|
|
169
|
+
getGeoLocation?(): Promise<import("@appium/types").Location>;
|
|
170
|
+
setGeoLocation?(location: Partial<import("@appium/types").Location>): Promise<void>;
|
|
171
|
+
getCurrentContext?(): Promise<string | null>;
|
|
172
|
+
setContext?(name: string): Promise<void>;
|
|
173
|
+
getContexts?(): Promise<string[]>;
|
|
174
|
+
getPageIndex?(elementId: string): Promise<string>;
|
|
175
|
+
getNetworkConnection?(): Promise<number>;
|
|
176
|
+
setNetworkConnection?(type: number): Promise<void>;
|
|
177
|
+
performTouch?(actions: unknown): Promise<void>;
|
|
178
|
+
performMultiAction?(actions: unknown, elementId: string): Promise<void>;
|
|
179
|
+
getRotation?(): Promise<import("@appium/types").Rotation>;
|
|
180
|
+
setRotation?(x: number, y: number, z: number): Promise<void>;
|
|
181
|
+
executeCdp?(cmd: string, params: unknown): Promise<unknown>;
|
|
182
|
+
addVirtualAuthenticator?(protocol: "ctap/u2f" | "ctap2" | "ctap2_1", transport: string, hasResidentKey?: boolean | undefined, hasUserVerification?: boolean | undefined, isUserConsenting?: boolean | undefined, isUserVerified?: boolean | undefined): Promise<string>;
|
|
183
|
+
removeVirtualAuthenticator?(authenticatorId: string): Promise<void>;
|
|
184
|
+
addAuthCredential?(credentialId: string, isResidentCredential: boolean, rpId: string, privateKey: string, userHandle: string, signCount: number, authenticatorId: string): Promise<void>;
|
|
185
|
+
getAuthCredential?(): Promise<import("@appium/types").Credential[]>;
|
|
186
|
+
removeAllAuthCredentials?(): Promise<void>;
|
|
187
|
+
removeAuthCredential?(credentialId: string, authenticatorId: string): Promise<void>;
|
|
188
|
+
setUserAuthVerified?(isUserVerified: boolean, authenticatorId: string): Promise<void>;
|
|
189
|
+
proxyCommand?<T_1 = any>(url: string, method: import("@appium/types").HTTPMethod, body?: string | undefined): Promise<T_1>;
|
|
190
|
+
cliArgs: import("@appium/types").StringRecord;
|
|
191
|
+
executeCommand(cmd: string, ...args: any[]): Promise<any>;
|
|
192
|
+
startUnexpectedShutdown(err?: Error | undefined): Promise<void>;
|
|
193
|
+
startNewCommandTimeout(): Promise<void>;
|
|
194
|
+
reset(): Promise<void>;
|
|
195
|
+
caps?: Partial<import("@appium/types").ConstraintsToCaps<{
|
|
196
|
+
readonly app: {
|
|
197
|
+
readonly presence: true;
|
|
198
|
+
readonly isString: true;
|
|
199
|
+
};
|
|
200
|
+
readonly uniqueApp: {
|
|
201
|
+
readonly isBoolean: true;
|
|
202
|
+
};
|
|
203
|
+
}> & void> | undefined;
|
|
204
|
+
originalCaps?: import("@appium/types").W3CCapabilities<{
|
|
205
|
+
readonly app: {
|
|
206
|
+
readonly presence: true;
|
|
207
|
+
readonly isString: true;
|
|
208
|
+
};
|
|
209
|
+
readonly uniqueApp: {
|
|
210
|
+
readonly isBoolean: true;
|
|
211
|
+
};
|
|
212
|
+
}, void> | undefined;
|
|
213
|
+
desiredCapConstraints: {
|
|
214
|
+
readonly app: {
|
|
215
|
+
readonly presence: true;
|
|
216
|
+
readonly isString: true;
|
|
217
|
+
};
|
|
218
|
+
readonly uniqueApp: {
|
|
219
|
+
readonly isBoolean: true;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
assignServer?(server: import("@appium/types").AppiumServer, host: string, port: number, path: string): void;
|
|
223
|
+
getSessions(): Promise<import("@appium/types").MultiSessionData<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, void>[]>;
|
|
224
|
+
getSession(): Promise<import("@appium/types").SingularSessionData<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, void>>;
|
|
225
|
+
supportedLogTypes: Readonly<import("@appium/types").LogDefRecord<{
|
|
226
|
+
readonly app: {
|
|
227
|
+
readonly presence: true;
|
|
228
|
+
readonly isString: true;
|
|
229
|
+
};
|
|
230
|
+
readonly uniqueApp: {
|
|
231
|
+
readonly isBoolean: true;
|
|
232
|
+
};
|
|
233
|
+
}>>;
|
|
234
|
+
getLogTypes(): Promise<string[]>;
|
|
235
|
+
getLog(logType: string): Promise<unknown[]>;
|
|
236
|
+
findElement(strategy: string, selector: string): Promise<import("@appium/types").Element>;
|
|
237
|
+
findElements(strategy: string, selector: string): Promise<import("@appium/types").Element[]>;
|
|
238
|
+
findElementFromElement(strategy: string, selector: string, elementId: string): Promise<import("@appium/types").Element>;
|
|
239
|
+
findElementsFromElement(strategy: string, selector: string, elementId: string): Promise<import("@appium/types").Element[]>;
|
|
240
|
+
findElementFromShadowRoot?(strategy: string, selector: string, shadowId: string): Promise<import("@appium/types").Element>;
|
|
241
|
+
findElementsFromShadowRoot?(strategy: string, selector: string, shadowId: string): Promise<import("@appium/types").Element[]>;
|
|
242
|
+
findElOrEls<Mult extends boolean>(strategy: string, selector: string, mult: Mult, context?: any): Promise<Mult extends true ? import("@appium/types").Element[] : import("@appium/types").Element>;
|
|
243
|
+
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>;
|
|
244
|
+
getPageSource(): Promise<string>;
|
|
245
|
+
updateSettings: (settings: import("@appium/types").StringRecord) => Promise<void>;
|
|
246
|
+
getSettings(): Promise<import("@appium/types").StringRecord>;
|
|
247
|
+
timeouts(type: string, ms: string | number, script?: number | undefined, pageLoad?: number | undefined, implicit?: string | number | undefined): Promise<void>;
|
|
248
|
+
setNewCommandTimeout(ms: number): void;
|
|
249
|
+
implicitWait(ms: string | number): Promise<void>;
|
|
250
|
+
setImplicitWait(ms: number): void;
|
|
251
|
+
implicitWaitForCondition(condition: () => Promise<any>): Promise<unknown>;
|
|
252
|
+
getTimeouts(): Promise<Record<string, number>>;
|
|
253
|
+
implicitWaitW3C(ms: number): Promise<void>;
|
|
254
|
+
implicitWaitMJSONWP(ms: number): Promise<void>;
|
|
255
|
+
pageLoadTimeoutW3C(ms: number): Promise<void>;
|
|
256
|
+
pageLoadTimeoutMJSONWP(ms: number): Promise<void>;
|
|
257
|
+
scriptTimeoutW3C(ms: number): Promise<void>;
|
|
258
|
+
scriptTimeoutMJSONWP(ms: number): Promise<void>;
|
|
259
|
+
newCommandTimeout(ms: number): Promise<void>;
|
|
260
|
+
parseTimeoutArgument(ms: string | number): number;
|
|
261
|
+
logCustomEvent(vendor: string, event: string): Promise<void>;
|
|
262
|
+
getLogEvents(type?: string | string[] | undefined): Promise<import("@appium/types").EventHistory | Record<string, number>>;
|
|
263
|
+
executeMethod(script: string, args: [] | [import("@appium/types").StringRecord]): Promise<any>;
|
|
264
|
+
createSession(w3cCaps1: import("@appium/types").W3CCapabilities<{
|
|
265
|
+
readonly app: {
|
|
266
|
+
readonly presence: true;
|
|
267
|
+
readonly isString: true;
|
|
268
|
+
};
|
|
269
|
+
readonly uniqueApp: {
|
|
270
|
+
readonly isBoolean: true;
|
|
271
|
+
};
|
|
272
|
+
}, void>, w3cCaps2?: import("@appium/types").W3CCapabilities<{
|
|
273
|
+
readonly app: {
|
|
274
|
+
readonly presence: true;
|
|
275
|
+
readonly isString: true;
|
|
276
|
+
};
|
|
277
|
+
readonly uniqueApp: {
|
|
278
|
+
readonly isBoolean: true;
|
|
279
|
+
};
|
|
280
|
+
}, void> | undefined, w3cCaps3?: import("@appium/types").W3CCapabilities<{
|
|
281
|
+
readonly app: {
|
|
282
|
+
readonly presence: true;
|
|
283
|
+
readonly isString: true;
|
|
284
|
+
};
|
|
285
|
+
readonly uniqueApp: {
|
|
286
|
+
readonly isBoolean: true;
|
|
287
|
+
};
|
|
288
|
+
}, void> | undefined, driverData?: import("@appium/types").DriverData[] | undefined): Promise<[string, any]>;
|
|
289
|
+
deleteSession(sessionId?: string | undefined, driverData?: import("@appium/types").DriverData[] | undefined): Promise<void>;
|
|
290
|
+
shouldValidateCaps: boolean;
|
|
291
|
+
sessionId: string | null;
|
|
292
|
+
opts: import("@appium/types").DriverOpts<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>;
|
|
293
|
+
initialOpts: import("@appium/types").ServerArgs;
|
|
294
|
+
protocol?: string | undefined;
|
|
295
|
+
helpers: import("@appium/types").DriverHelpers<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS>;
|
|
296
|
+
basePath: string;
|
|
297
|
+
relaxedSecurityEnabled: boolean;
|
|
298
|
+
allowInsecure: string[];
|
|
299
|
+
denyInsecure: string[];
|
|
300
|
+
newCommandTimeoutMs: number;
|
|
301
|
+
implicitWaitMs: number;
|
|
302
|
+
locatorStrategies: string[];
|
|
303
|
+
webLocatorStrategies: string[];
|
|
304
|
+
eventEmitter: import("events");
|
|
305
|
+
settings: import("@appium/types").DeviceSettings<any>;
|
|
306
|
+
log: import("@appium/types").AppiumLogger;
|
|
307
|
+
driverData?: import("@appium/types").DriverData | undefined;
|
|
308
|
+
isCommandsQueueEnabled: boolean;
|
|
309
|
+
eventHistory: import("@appium/types").EventHistory;
|
|
310
|
+
onUnexpectedShutdown(handler: () => any): void;
|
|
311
|
+
getStatus(): Promise<any>;
|
|
312
|
+
sessionExists(sessionId: string): boolean;
|
|
313
|
+
isW3CProtocol(): boolean;
|
|
314
|
+
isMjsonwpProtocol(): boolean;
|
|
315
|
+
isFeatureEnabled(name: string): boolean;
|
|
316
|
+
assertFeatureEnabled(name: string): void;
|
|
317
|
+
validateLocatorStrategy(strategy: string, webContext?: boolean | undefined): void;
|
|
318
|
+
proxyActive(sessionId?: string | undefined): boolean;
|
|
319
|
+
getProxyAvoidList(sessionId?: string | undefined): import("@appium/types").RouteMatcher[];
|
|
320
|
+
canProxy(sessionId?: string | undefined): boolean;
|
|
321
|
+
proxyRouteIsAvoided(sessionId: string, method: string, url: string): boolean;
|
|
322
|
+
addManagedDriver(driver: import("@appium/types").Driver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, import("@appium/types").StringRecord, any>): void;
|
|
323
|
+
getManagedDrivers(): import("@appium/types").Driver<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS, import("@appium/types").StringRecord, any>[];
|
|
324
|
+
clearNewCommandTimeout(): Promise<void>;
|
|
325
|
+
logEvent(eventName: string): void;
|
|
326
|
+
driverForSession(sessionId: string): import("@appium/types").Core<typeof import("@appium/types").BASE_DESIRED_CAP_CONSTRAINTS> | null;
|
|
327
|
+
}>;
|
|
328
|
+
export type FakeDriverCore = import('../driver').FakeDriverCore;
|
|
329
|
+
export type Class<T, U = {}, V = any[]> = import('@appium/types').Class<T, U, V>;
|
|
330
|
+
export type IAlertCommands = import('../types').IAlertCommands;
|
|
14
331
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,oJAFa;;;IAmBT;;;;OAIG;oBADU,QAAQ,MAAM,CAAC;IAO5B;;;;;OAKG;uBAFQ,MAAM,GACJ,QAAQ,IAAI,CAAC;IAW1B;;;;OAIG;uBADU,QAAQ,IAAI,CAAC;IAO1B;;;;OAIG;4BAXU,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA/CG,CA+DhC;6BAGY,OAAO,WAAW,EAAE,cAAc;0CAKlC,OAAO,eAAe,EAAE,KAAK,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC;6BAIpC,OAAO,UAAU,EAAE,cAAc"}
|
|
@@ -1,54 +1,81 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlertMixin = void 0;
|
|
4
|
+
const driver_1 = require("appium/driver");
|
|
5
|
+
/**
|
|
6
|
+
* @template {Class<import('../types').IContextsCommands & import('@appium/types').IFindCommands>} T
|
|
7
|
+
* @param {T} Base
|
|
8
|
+
* @returns {Class<AlertCommands>}
|
|
9
|
+
*/
|
|
10
|
+
function AlertMixin(Base) {
|
|
11
|
+
/**
|
|
12
|
+
* @implements {IAlertCommands}
|
|
13
|
+
*/
|
|
14
|
+
class AlertCommands extends Base {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* Dismiss an alert
|
|
19
|
+
*
|
|
20
|
+
* @returns {Promise<null>}
|
|
21
|
+
*/
|
|
22
|
+
this.postDismissAlert = this.postAcceptAlert;
|
|
23
|
+
}
|
|
24
|
+
assertNoAlert() {
|
|
25
|
+
if (this.appModel.hasAlert()) {
|
|
26
|
+
throw new driver_1.errors.UnexpectedAlertOpenError();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
assertAlert() {
|
|
30
|
+
if (!this.appModel.hasAlert()) {
|
|
31
|
+
throw new driver_1.errors.NoAlertOpenError();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get the text of an alert
|
|
36
|
+
*
|
|
37
|
+
* @returns {Promise<string>}
|
|
38
|
+
*/
|
|
39
|
+
async getAlertText() {
|
|
40
|
+
this.assertAlert();
|
|
41
|
+
return this.appModel.alertText();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Set the text of an alert
|
|
45
|
+
*
|
|
46
|
+
* @param {string} text
|
|
47
|
+
* @returns {Promise<void>}
|
|
48
|
+
*/
|
|
49
|
+
async setAlertText(text) {
|
|
50
|
+
this.assertAlert();
|
|
51
|
+
try {
|
|
52
|
+
this.appModel.setAlertText(text);
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
throw new driver_1.errors.InvalidElementStateError();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Accept an alert
|
|
60
|
+
*
|
|
61
|
+
* @returns {Promise<void>}
|
|
62
|
+
*/
|
|
63
|
+
async postAcceptAlert() {
|
|
64
|
+
this.assertAlert();
|
|
65
|
+
this.appModel.handleAlert();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return AlertCommands;
|
|
69
|
+
}
|
|
70
|
+
exports.AlertMixin = AlertMixin;
|
|
71
|
+
/**
|
|
72
|
+
* @typedef {import('../driver').FakeDriverCore} FakeDriverCore
|
|
73
|
+
*/
|
|
74
|
+
/**
|
|
75
|
+
* @template T,[U={}],[V=Array<any>]
|
|
76
|
+
* @typedef {import('@appium/types').Class<T,U,V>} Class
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* @typedef {import('../types').IAlertCommands} IAlertCommands
|
|
80
|
+
*/
|
|
81
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;;AAAA,0CAAqC;AAErC;;;;GAIG;AACH,SAAgB,UAAU,CAAC,IAAI;IAC7B;;OAEG;IACH,MAAM,aAAc,SAAQ,IAAI;QAAhC;;YAgDE;;;;eAIG;YACH,qBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;QAC1C,CAAC;QArDC,aAAa;YACX,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE;gBAC5B,MAAM,IAAI,eAAM,CAAC,wBAAwB,EAAE,CAAC;aAC7C;QACH,CAAC;QAED,WAAW;YACT,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE;gBAC7B,MAAM,IAAI,eAAM,CAAC,gBAAgB,EAAE,CAAC;aACrC;QACH,CAAC;QAED;;;;WAIG;QACH,KAAK,CAAC,YAAY;YAChB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;QACnC,CAAC;QAED;;;;;WAKG;QACH,KAAK,CAAC,YAAY,CAAC,IAAI;YACrB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI;gBACF,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;aAClC;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,IAAI,eAAM,CAAC,wBAAwB,EAAE,CAAC;aAC7C;QACH,CAAC;QAED;;;;WAIG;QACH,KAAK,CAAC,eAAe;YACnB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QAC9B,CAAC;KAQF;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AA7DD,gCA6DC;AAED;;GAEG;AAEH;;;GAGG;AAEH;;GAEG"}
|