appium-xcuitest-driver 10.12.2 → 10.13.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/lib/commands/context.d.ts +130 -161
  3. package/build/lib/commands/context.d.ts.map +1 -1
  4. package/build/lib/commands/context.js +122 -107
  5. package/build/lib/commands/context.js.map +1 -1
  6. package/build/lib/commands/execute.js +1 -1
  7. package/build/lib/commands/execute.js.map +1 -1
  8. package/build/lib/commands/general.js +1 -1
  9. package/build/lib/commands/general.js.map +1 -1
  10. package/build/lib/commands/gesture.d.ts +103 -119
  11. package/build/lib/commands/gesture.d.ts.map +1 -1
  12. package/build/lib/commands/gesture.js +98 -138
  13. package/build/lib/commands/gesture.js.map +1 -1
  14. package/build/lib/commands/screenshots.d.ts.map +1 -1
  15. package/build/lib/commands/screenshots.js +3 -5
  16. package/build/lib/commands/screenshots.js.map +1 -1
  17. package/build/lib/commands/timeouts.js +1 -1
  18. package/build/lib/commands/timeouts.js.map +1 -1
  19. package/build/lib/commands/web.d.ts +199 -202
  20. package/build/lib/commands/web.d.ts.map +1 -1
  21. package/build/lib/commands/web.js +206 -174
  22. package/build/lib/commands/web.js.map +1 -1
  23. package/build/lib/driver.d.ts +2 -1
  24. package/build/lib/driver.d.ts.map +1 -1
  25. package/build/lib/driver.js +10 -4
  26. package/build/lib/driver.js.map +1 -1
  27. package/build/lib/execute-method-map.d.ts.map +1 -1
  28. package/build/lib/execute-method-map.js +0 -1
  29. package/build/lib/execute-method-map.js.map +1 -1
  30. package/lib/commands/{context.js → context.ts} +172 -145
  31. package/lib/commands/execute.js +1 -1
  32. package/lib/commands/general.js +1 -1
  33. package/lib/commands/{gesture.js → gesture.ts} +225 -183
  34. package/lib/commands/screenshots.js +3 -5
  35. package/lib/commands/timeouts.js +1 -1
  36. package/lib/commands/{web.js → web.ts} +305 -263
  37. package/lib/driver.ts +11 -4
  38. package/lib/execute-method-map.ts +0 -1
  39. package/npm-shrinkwrap.json +13 -43
  40. package/package.json +1 -1
@@ -1,220 +1,265 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { Element, Cookie, Size, Position } from '@appium/types';
3
+ import type { AtomsElement } from './types';
4
+ import type { CalibrationData } from '../types';
1
5
  /**
2
- * @this {XCUITestDriver}
3
- * @group Mobile Web Only
4
- * @param {number|string|null} frame
5
- * @returns {Promise<void>}
6
- */
7
- export function setFrame(this: import("../driver").XCUITestDriver, frame: number | string | null): Promise<void>;
8
- export class setFrame {
9
- /**
10
- * @this {XCUITestDriver}
11
- * @group Mobile Web Only
12
- * @param {number|string|null} frame
13
- * @returns {Promise<void>}
14
- */
15
- constructor(this: import("../driver").XCUITestDriver, frame: number | string | null);
16
- curWebFrames: any[] | undefined;
17
- }
18
- /**
19
- * @this {XCUITestDriver}
6
+ * Sets the current web frame context.
7
+ *
8
+ * @param frame - Frame identifier (number, string, or null to return to default content)
20
9
  * @group Mobile Web Only
21
- * @param {string} propertyName
22
- * @param {Element | string} el
23
- * @returns {Promise<string>}
10
+ * @throws {errors.NotImplementedError} If not in a web context
11
+ * @throws {errors.NoSuchFrameError} If the specified frame is not found
24
12
  */
25
- export function getCssProperty(this: import("../driver").XCUITestDriver, propertyName: string, el: Element | string): Promise<string>;
13
+ export declare function setFrame(this: XCUITestDriver, frame: number | string | null): Promise<void>;
26
14
  /**
27
- * Submit the form an element is in
15
+ * Gets the value of a CSS property for an element.
28
16
  *
29
- * @param {string|Element} el - the element ID
17
+ * @param propertyName - Name of the CSS property
18
+ * @param el - Element to get the property from
30
19
  * @group Mobile Web Only
31
- * @this {XCUITestDriver}
20
+ * @throws {errors.NotImplementedError} If not in a web context
32
21
  */
33
- export function submit(this: import("../driver").XCUITestDriver, el: string | Element): Promise<void>;
22
+ export declare function getCssProperty(this: XCUITestDriver, propertyName: string, el: Element | string): Promise<string>;
34
23
  /**
35
- * @this {XCUITestDriver}
24
+ * Submits the form that contains the specified element.
25
+ *
26
+ * @param el - The element ID or element object
36
27
  * @group Mobile Web Only
28
+ * @throws {errors.NotImplementedError} If not in a web context
37
29
  */
38
- export function refresh(this: import("../driver").XCUITestDriver): Promise<void>;
30
+ export declare function submit(this: XCUITestDriver, el: string | Element): Promise<void>;
39
31
  /**
40
- * @this {XCUITestDriver}
32
+ * Refreshes the current page.
33
+ *
41
34
  * @group Mobile Web Only
42
- * @returns {Promise<string>}
35
+ * @throws {errors.NotImplementedError} If not in a web context
43
36
  */
44
- export function getUrl(this: import("../driver").XCUITestDriver): Promise<string>;
37
+ export declare function refresh(this: XCUITestDriver): Promise<void>;
45
38
  /**
46
- * @this {XCUITestDriver}
39
+ * Gets the current page URL.
40
+ *
47
41
  * @group Mobile Web Only
48
- * @returns {Promise<string>}
42
+ * @throws {errors.NotImplementedError} If not in a web context
49
43
  */
50
- export function title(this: import("../driver").XCUITestDriver): Promise<string>;
44
+ export declare function getUrl(this: XCUITestDriver): Promise<string>;
51
45
  /**
52
- * @this {XCUITestDriver}
46
+ * Gets the current page title.
47
+ *
53
48
  * @group Mobile Web Only
54
- * @returns {Promise<import('@appium/types').Cookie[]>}
49
+ * @throws {errors.NotImplementedError} If not in a web context
55
50
  */
56
- export function getCookies(this: import("../driver").XCUITestDriver): Promise<import("@appium/types").Cookie[]>;
51
+ export declare function title(this: XCUITestDriver): Promise<string>;
57
52
  /**
58
- * @this {XCUITestDriver}
53
+ * Gets all cookies for the current page.
54
+ *
55
+ * Cookie values are automatically URI-decoded.
56
+ *
59
57
  * @group Mobile Web Only
60
- * @param {import('@appium/types').Cookie} cookie
61
- * @returns {Promise<void>}
58
+ * @throws {errors.NotImplementedError} If not in a web context
62
59
  */
63
- export function setCookie(this: import("../driver").XCUITestDriver, cookie: import("@appium/types").Cookie): Promise<void>;
60
+ export declare function getCookies(this: XCUITestDriver): Promise<Cookie[]>;
64
61
  /**
65
- * @this {XCUITestDriver}
66
- * @param {string} cookieName
67
- * @returns {Promise<void>}
62
+ * Sets a cookie for the current page.
63
+ *
64
+ * If the cookie's path is not specified, it defaults to '/'.
65
+ *
66
+ * @param cookie - Cookie object to set
68
67
  * @group Mobile Web Only
68
+ * @throws {errors.NotImplementedError} If not in a web context
69
69
  */
70
- export function deleteCookie(this: import("../driver").XCUITestDriver, cookieName: string): Promise<void>;
70
+ export declare function setCookie(this: XCUITestDriver, cookie: Cookie): Promise<void>;
71
71
  /**
72
- * @this {XCUITestDriver}
72
+ * Deletes a cookie by name.
73
+ *
74
+ * If the cookie is not found, the operation is silently ignored.
75
+ *
76
+ * @param cookieName - Name of the cookie to delete
73
77
  * @group Mobile Web Only
74
- * @returns {Promise<void>}
78
+ * @throws {errors.NotImplementedError} If not in a web context
75
79
  */
76
- export function deleteCookies(this: import("../driver").XCUITestDriver): Promise<void>;
80
+ export declare function deleteCookie(this: XCUITestDriver, cookieName: string): Promise<void>;
77
81
  /**
78
- * @this {XCUITestDriver}
79
- * @param {Element | string} el
80
- * @returns {Element | string}
82
+ * Deletes all cookies for the current page.
83
+ *
84
+ * @group Mobile Web Only
85
+ * @throws {errors.NotImplementedError} If not in a web context
81
86
  */
82
- export function cacheWebElement(this: import("../driver").XCUITestDriver, el: Element | string): Element | string;
87
+ export declare function deleteCookies(this: XCUITestDriver): Promise<void>;
83
88
  /**
84
- * @this {XCUITestDriver}
85
- * @param {any} response
86
- * @returns {any}
89
+ * Caches a web element for later use.
90
+ *
91
+ * @param el - Element to cache
92
+ * @returns The cached element wrapper
87
93
  */
88
- export function cacheWebElements(this: import("../driver").XCUITestDriver, response: any): any;
94
+ export declare function cacheWebElement(this: XCUITestDriver, el: Element | string): Element | string;
89
95
  /**
90
- * @param {string} atom
91
- * @param {unknown[]} args
92
- * @returns {Promise<any>}
93
- * @privateRemarks This should return `Promise<T>` where `T` extends `unknown`, but that's going to cause a lot of things to break.
94
- * @this {XCUITestDriver}
96
+ * Recursively caches all web elements in a response object.
97
+ *
98
+ * @param response - Response object that may contain web elements
99
+ * @returns Response with cached element wrappers
95
100
  */
96
- export function executeAtom(this: import("../driver").XCUITestDriver, atom: string, args: unknown[], alwaysDefaultFrame?: boolean): Promise<any>;
101
+ export declare function cacheWebElements(this: XCUITestDriver, response: any): any;
97
102
  /**
98
- * @this {XCUITestDriver}
99
- * @param {string} atom
100
- * @param {any[]} args
103
+ * Executes a Selenium atom script in the current web context.
104
+ *
105
+ * @param atom - Name of the atom to execute
106
+ * @param args - Arguments to pass to the atom
107
+ * @param alwaysDefaultFrame - If true, always use the default frame instead of current frames
108
+ * @privateRemarks This should return `Promise<T>` where `T` extends `unknown`, but that's going to cause a lot of things to break.
101
109
  */
102
- export function executeAtomAsync(this: import("../driver").XCUITestDriver, atom: string, args: any[]): Promise<any>;
103
- export class executeAtomAsync {
104
- /**
105
- * @this {XCUITestDriver}
106
- * @param {string} atom
107
- * @param {any[]} args
108
- */
109
- constructor(this: import("../driver").XCUITestDriver, atom: string, args: any[]);
110
- asyncPromise: {
111
- resolve: (thenableOrResult?: any) => void;
112
- reject: (error?: any) => void;
113
- };
114
- }
110
+ export declare function executeAtom(this: XCUITestDriver, atom: string, args: unknown[], alwaysDefaultFrame?: boolean): Promise<any>;
115
111
  /**
116
- * @template {string} S
117
- * @param {S|Element<S>} elOrId
118
- * @returns {import('./types').AtomsElement<S>}
119
- * @this {XCUITestDriver}
112
+ * Executes a Selenium atom script asynchronously.
113
+ *
114
+ * @param atom - Name of the atom to execute
115
+ * @param args - Arguments to pass to the atom
120
116
  */
121
- export function getAtomsElement<S extends string>(this: import("../driver").XCUITestDriver, elOrId: S | Element<S>): import("./types").AtomsElement<S>;
117
+ export declare function executeAtomAsync(this: XCUITestDriver, atom: string, args: any[]): Promise<any>;
122
118
  /**
123
- * @param {readonly any[]} [args]
124
- * @this {XCUITestDriver}
119
+ * Gets the atoms-compatible element representation.
120
+ *
121
+ * @template S - Element identifier type
122
+ * @param elOrId - Element or element ID
123
+ * @returns Atoms-compatible element object
124
+ * @throws {errors.StaleElementReferenceError} If the element is not in the cache
125
125
  */
126
- export function convertElementsForAtoms(this: import("../driver").XCUITestDriver, args?: readonly any[]): any;
126
+ export declare function getAtomsElement<S extends string = string>(this: XCUITestDriver, elOrId: S | Element<S>): AtomsElement<S>;
127
127
  /**
128
+ * Converts elements in an argument array to atoms-compatible format.
128
129
  *
129
- * @param {any} element
130
- * @returns {string | undefined}
130
+ * @param args - Array of arguments that may contain elements
131
+ * @returns Array with elements converted to atoms format
131
132
  */
132
- export function getElementId(element: any): string | undefined;
133
+ export declare function convertElementsForAtoms(this: XCUITestDriver, args?: readonly any[]): any[];
133
134
  /**
134
- * @param {any} element
135
- * @returns {element is Element}
135
+ * Extracts the element ID from an element object.
136
+ *
137
+ * @param element - Element object
138
+ * @returns Element ID if found, undefined otherwise
136
139
  */
137
- export function hasElementId(element: any): element is Element;
140
+ export declare function getElementId(element: any): string | undefined;
138
141
  /**
139
- * @this {XCUITestDriver}
140
- * @param {string} strategy
141
- * @param {string} selector
142
- * @param {boolean} [many]
143
- * @param {Element | string | null} [ctx]
144
- * @returns {Promise<Element | Element[]>}
142
+ * Checks if an object has an element ID (type guard).
143
+ *
144
+ * @param element - Object to check
145
+ * @returns True if the object has an element ID
145
146
  */
146
- export function findWebElementOrElements(this: import("../driver").XCUITestDriver, strategy: string, selector: string, many?: boolean, ctx?: Element | string | null): Promise<Element | Element[]>;
147
+ export declare function hasElementId(element: any): element is Element;
147
148
  /**
148
- * @this {XCUITestDriver}
149
- * @param {number} x
150
- * @param {number} y
149
+ * Finds one or more web elements using the specified strategy.
150
+ *
151
+ * @param strategy - Locator strategy (e.g., 'id', 'css selector')
152
+ * @param selector - Selector value
153
+ * @param many - If true, returns array of elements; if false, returns single element
154
+ * @param ctx - Optional context element to search within
155
+ * @returns Element or array of elements
156
+ * @throws {errors.NoSuchElementError} If element not found and many is false
151
157
  */
152
- export function clickWebCoords(this: import("../driver").XCUITestDriver, x: number, y: number): Promise<void>;
158
+ export declare function findWebElementOrElements(this: XCUITestDriver, strategy: string, selector: string, many?: boolean, ctx?: Element | string | null): Promise<Element | Element[]>;
153
159
  /**
154
- * @this {XCUITestDriver}
155
- * @returns {Promise<boolean>}
160
+ * Clicks at the specified web coordinates.
161
+ *
162
+ * Coordinates are automatically translated from web to native coordinates.
163
+ *
164
+ * @param x - X coordinate in web space
165
+ * @param y - Y coordinate in web space
156
166
  */
157
- export function getSafariIsIphone(this: import("../driver").XCUITestDriver): Promise<boolean>;
158
- export class getSafariIsIphone {
159
- _isSafariIphone: boolean | undefined;
160
- }
167
+ export declare function clickWebCoords(this: XCUITestDriver, x: number, y: number): Promise<void>;
161
168
  /**
162
- * @this {XCUITestDriver}
163
- * @returns {Promise<import('@appium/types').Size>}
169
+ * Determines if the current Safari session is running on an iPhone.
170
+ *
171
+ * The result is cached after the first call.
172
+ *
173
+ * @returns True if running on iPhone, false otherwise
164
174
  */
165
- export function getSafariDeviceSize(this: import("../driver").XCUITestDriver): Promise<import("@appium/types").Size>;
175
+ export declare function getSafariIsIphone(this: XCUITestDriver): Promise<boolean>;
166
176
  /**
167
- * @this {XCUITestDriver}
168
- * @returns {Promise<boolean>}
177
+ * Gets the device size from Safari's perspective.
178
+ *
179
+ * Returns normalized dimensions (width <= height).
180
+ *
181
+ * @returns Device size with width and height
169
182
  */
170
- export function getSafariIsNotched(this: import("../driver").XCUITestDriver): Promise<boolean>;
171
- export class getSafariIsNotched {
172
- _isSafariNotched: boolean | undefined;
173
- }
183
+ export declare function getSafariDeviceSize(this: XCUITestDriver): Promise<Size>;
174
184
  /**
175
- * @this {XCUITestDriver}
185
+ * Determines if the current device has a notch (iPhone X and later).
186
+ *
187
+ * The result is cached after the first call.
188
+ *
189
+ * @returns True if device has a notch, false otherwise
176
190
  */
177
- export function getExtraTranslateWebCoordsOffset(this: import("../driver").XCUITestDriver, wvPos: any, realDims: any): Promise<void>;
191
+ export declare function getSafariIsNotched(this: XCUITestDriver): Promise<boolean>;
178
192
  /**
179
- * @this {XCUITestDriver}
180
- * @param {boolean} isIphone
181
- * @param {string} bannerVisibility
182
- * @returns {Promise<number>}
193
+ * Calculates and applies extra offset for web coordinate translation.
194
+ *
195
+ * Takes into account Safari UI elements like tab bars, smart app banners, and device notches.
196
+ * Modifies wvPos and realDims in place.
197
+ *
198
+ * @param wvPos - WebView position object (modified in place)
199
+ * @param realDims - Real dimensions object (modified in place)
200
+ * @throws {errors.InvalidArgumentError} If Safari tab bar position is invalid
201
+ */
202
+ export declare function getExtraTranslateWebCoordsOffset(this: XCUITestDriver, wvPos: {
203
+ x: number;
204
+ y: number;
205
+ }, realDims: {
206
+ w: number;
207
+ h: number;
208
+ }): Promise<void>;
209
+ /**
210
+ * Calculates additional offset for native web tap based on smart app banner visibility.
211
+ *
212
+ * @param isIphone - Whether the device is an iPhone
213
+ * @param bannerVisibility - Banner visibility setting ('visible', 'invisible', or 'detect')
214
+ * @returns Additional offset in pixels
183
215
  */
184
- export function getExtraNativeWebTapOffset(this: import("../driver").XCUITestDriver, isIphone: boolean, bannerVisibility: string): Promise<number>;
216
+ export declare function getExtraNativeWebTapOffset(this: XCUITestDriver, isIphone: boolean, bannerVisibility: string): Promise<number>;
185
217
  /**
186
- * @this {XCUITestDriver}
187
- * @param {any} el
188
- * @returns {Promise<void>}
218
+ * Performs a native tap on a web element.
219
+ *
220
+ * Attempts to use a simple native tap first, falling back to coordinate-based tapping if needed.
221
+ *
222
+ * @param el - Element to tap
189
223
  */
190
- export function nativeWebTap(this: import("../driver").XCUITestDriver, el: any): Promise<void>;
224
+ export declare function nativeWebTap(this: XCUITestDriver, el: any): Promise<void>;
191
225
  /**
192
- * @this {XCUITestDriver}
193
- * @param {number} x
194
- * @param {number} y
195
- * @returns {Promise<import('@appium/types').Position>}
226
+ * Translates web coordinates to native screen coordinates.
227
+ *
228
+ * Uses calibration data if available, otherwise falls back to legacy algorithm.
229
+ *
230
+ * @param x - X coordinate in web space
231
+ * @param y - Y coordinate in web space
232
+ * @returns Translated position in native coordinates
233
+ * @throws {Error} If no WebView is found or if translation fails
196
234
  */
197
- export function translateWebCoords(this: import("../driver").XCUITestDriver, x: number, y: number): Promise<import("@appium/types").Position>;
235
+ export declare function translateWebCoords(this: XCUITestDriver, x: number, y: number): Promise<Position>;
198
236
  /**
199
- * @this {XCUITestDriver}
200
- * @returns {Promise<boolean>}
237
+ * Checks if an alert is currently present.
238
+ *
239
+ * @returns True if an alert is present, false otherwise
201
240
  */
202
- export function checkForAlert(this: import("../driver").XCUITestDriver): Promise<boolean>;
241
+ export declare function checkForAlert(this: XCUITestDriver): Promise<boolean>;
203
242
  /**
204
- * @param {Promise<any>} promise
205
- * @this {XCUITestDriver}
243
+ * Waits for an atom promise to resolve, monitoring for alerts during execution.
244
+ *
245
+ * @param promise - Promise returned by atom execution
246
+ * @returns The result of the atom execution
247
+ * @throws {errors.UnexpectedAlertOpenError} If an alert appears during execution
248
+ * @throws {errors.TimeoutError} If the atom execution times out
206
249
  */
207
- export function waitForAtom(this: import("../driver").XCUITestDriver, promise: Promise<any>): Promise<any>;
250
+ export declare function waitForAtom(this: XCUITestDriver, promise: Promise<any>): Promise<any>;
208
251
  /**
209
- * @param {string} navType
210
- * @this {XCUITestDriver}
252
+ * Performs browser navigation (back, forward, etc.) using history API.
253
+ *
254
+ * @param navType - Navigation type (e.g., 'back', 'forward')
211
255
  */
212
- export function mobileWebNav(this: import("../driver").XCUITestDriver, navType: string): Promise<void>;
256
+ export declare function mobileWebNav(this: XCUITestDriver, navType: string): Promise<void>;
213
257
  /**
214
- * @this {XCUITestDriver}
215
- * @returns {string} The base url which could be used to access WDA HTTP endpoints.
258
+ * Gets the base URL for accessing WDA HTTP endpoints.
259
+ *
260
+ * @returns The base URL (e.g., 'http://127.0.0.1:8100')
216
261
  */
217
- export function getWdaLocalhostRoot(this: import("../driver").XCUITestDriver): string;
262
+ export declare function getWdaLocalhostRoot(this: XCUITestDriver): string;
218
263
  /**
219
264
  * Calibrates web to real coordinates translation.
220
265
  * This API can only be called from Safari web context.
@@ -225,35 +270,14 @@ export function getWdaLocalhostRoot(this: import("../driver").XCUITestDriver): s
225
270
  * The returned value could also be used to manually transform web coordinates
226
271
  * to real devices ones in client scripts.
227
272
  *
228
- * @this {XCUITestDriver}
229
- * @returns {Promise<import('../types').CalibrationData>}
230
- */
231
- export function mobileCalibrateWebToRealCoordinatesTranslation(this: import("../driver").XCUITestDriver): Promise<import("../types").CalibrationData>;
232
- export class mobileCalibrateWebToRealCoordinatesTranslation {
233
- webviewCalibrationResult: {
234
- offsetX: number;
235
- offsetY: number;
236
- pixelRatioX: number;
237
- pixelRatioY: number;
238
- };
239
- }
240
- /**
241
- * @typedef {Object} SafariOpts
242
- * @property {object} preferences An object containing Safari settings to be updated.
243
- * The list of available setting names and their values could be retrieved by
244
- * changing the corresponding Safari settings in the UI and then inspecting
245
- * 'Library/Preferences/com.apple.mobilesafari.plist' file inside of
246
- * com.apple.mobilesafari app container.
247
- * The full path to the Mobile Safari's container could be retrieved from
248
- * `xcrun simctl get_app_container <sim_udid> com.apple.mobilesafari data`
249
- * command output.
250
- * Use the `xcrun simctl spawn <sim_udid> defaults read <path_to_plist>` command
251
- * to print the plist content to the Terminal.
273
+ * @returns Calibration data with offset and pixel ratio information
274
+ * @throws {errors.NotImplementedError} If not in a web context
252
275
  */
276
+ export declare function mobileCalibrateWebToRealCoordinatesTranslation(this: XCUITestDriver): Promise<CalibrationData>;
253
277
  /**
254
278
  * Updates Mobile Safari preferences on an iOS Simulator
255
279
  *
256
- * @param {import('@appium/types').StringRecord} preferences - An object containing Safari settings to be updated.
280
+ * @param preferences - An object containing Safari settings to be updated.
257
281
  * The list of available setting names and their values can be retrieved by changing the
258
282
  * corresponding Safari settings in the UI and then inspecting
259
283
  * `Library/Preferences/com.apple.mobilesafari.plist` file inside of the `com.apple.mobilesafari`
@@ -263,35 +287,8 @@ export class mobileCalibrateWebToRealCoordinatesTranslation {
263
287
  * the plist content to the Terminal.
264
288
  *
265
289
  * @group Simulator Only
266
- * @returns {Promise<void>}
267
- * @throws {Error} if run on a real device or if the preferences argument is invalid
268
- * @this {XCUITestDriver}
269
- */
270
- export function mobileUpdateSafariPreferences(this: import("../driver").XCUITestDriver, preferences: import("@appium/types").StringRecord): Promise<void>;
271
- export type SafariOpts = {
272
- /**
273
- * An object containing Safari settings to be updated.
274
- * The list of available setting names and their values could be retrieved by
275
- * changing the corresponding Safari settings in the UI and then inspecting
276
- * 'Library/Preferences/com.apple.mobilesafari.plist' file inside of
277
- * com.apple.mobilesafari app container.
278
- * The full path to the Mobile Safari's container could be retrieved from
279
- * `xcrun simctl get_app_container <sim_udid> com.apple.mobilesafari data`
280
- * command output.
281
- * Use the `xcrun simctl spawn <sim_udid> defaults read <path_to_plist>` command
282
- * to print the plist content to the Terminal.
283
- */
284
- preferences: object;
285
- };
286
- export type CookieOptions = {
287
- expires?: string | undefined;
288
- path?: string | undefined;
289
- domain?: string | undefined;
290
- secure?: boolean | undefined;
291
- httpOnly?: boolean | undefined;
292
- };
293
- export type XCUITestDriver = import("../driver").XCUITestDriver;
294
- export type Rect = import("@appium/types").Rect;
295
- export type Element<S extends string = string> = import("@appium/types").Element<S>;
296
- export type RemoteDebugger = import("appium-remote-debugger").RemoteDebugger;
290
+ * @throws {Error} If run on a real device
291
+ * @throws {errors.InvalidArgumentError} If the preferences argument is invalid
292
+ */
293
+ export declare function mobileUpdateSafariPreferences(this: XCUITestDriver, preferences: Record<string, any>): Promise<void>;
297
294
  //# sourceMappingURL=web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../lib/commands/web.js"],"names":[],"mappings":"AAqDA;;;;;GAKG;AACH,0EAHW,MAAM,GAAC,MAAM,GAAC,IAAI,GAChB,OAAO,CAAC,IAAI,CAAC,CA2BzB;;IA/BD;;;;;OAKG;IACH,6DAHW,MAAM,GAAC,MAAM,GAAC,IAAI,EA4B5B;IAnBG,gCAAsB;;AAqB1B;;;;;;GAMG;AACH,uFAJW,MAAM,MACN,OAAO,GAAG,MAAM,GACd,OAAO,C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