appium-xcuitest-driver 10.12.2 → 10.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/lib/commands/context.d.ts +130 -161
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +122 -107
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/execute.js +1 -1
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/general.js +1 -1
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/gesture.d.ts +103 -119
- package/build/lib/commands/gesture.d.ts.map +1 -1
- package/build/lib/commands/gesture.js +98 -138
- package/build/lib/commands/gesture.js.map +1 -1
- package/build/lib/commands/screenshots.d.ts.map +1 -1
- package/build/lib/commands/screenshots.js +3 -5
- package/build/lib/commands/screenshots.js.map +1 -1
- package/build/lib/commands/timeouts.js +1 -1
- package/build/lib/commands/timeouts.js.map +1 -1
- package/build/lib/commands/web.d.ts +199 -202
- package/build/lib/commands/web.d.ts.map +1 -1
- package/build/lib/commands/web.js +216 -175
- package/build/lib/commands/web.js.map +1 -1
- package/build/lib/driver.d.ts +2 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +10 -4
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/build/lib/execute-method-map.js +0 -1
- package/build/lib/execute-method-map.js.map +1 -1
- package/lib/commands/{context.js → context.ts} +172 -145
- package/lib/commands/execute.js +1 -1
- package/lib/commands/general.js +1 -1
- package/lib/commands/{gesture.js → gesture.ts} +225 -183
- package/lib/commands/screenshots.js +3 -5
- package/lib/commands/timeouts.js +1 -1
- package/lib/commands/{web.js → web.ts} +314 -264
- package/lib/driver.ts +11 -4
- package/lib/execute-method-map.ts +0 -1
- package/npm-shrinkwrap.json +13 -43
- 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
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @param
|
|
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
|
-
* @
|
|
22
|
-
* @
|
|
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
|
|
13
|
+
export declare function setFrame(this: XCUITestDriver, frame: number | string | null): Promise<void>;
|
|
26
14
|
/**
|
|
27
|
-
*
|
|
15
|
+
* Gets the value of a CSS property for an element.
|
|
28
16
|
*
|
|
29
|
-
* @param
|
|
17
|
+
* @param propertyName - Name of the CSS property
|
|
18
|
+
* @param el - Element to get the property from
|
|
30
19
|
* @group Mobile Web Only
|
|
31
|
-
* @
|
|
20
|
+
* @throws {errors.NotImplementedError} If not in a web context
|
|
32
21
|
*/
|
|
33
|
-
export function
|
|
22
|
+
export declare function getCssProperty(this: XCUITestDriver, propertyName: string, el: Element | string): Promise<string>;
|
|
34
23
|
/**
|
|
35
|
-
*
|
|
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
|
|
30
|
+
export declare function submit(this: XCUITestDriver, el: string | Element): Promise<void>;
|
|
39
31
|
/**
|
|
40
|
-
*
|
|
32
|
+
* Refreshes the current page.
|
|
33
|
+
*
|
|
41
34
|
* @group Mobile Web Only
|
|
42
|
-
* @
|
|
35
|
+
* @throws {errors.NotImplementedError} If not in a web context
|
|
43
36
|
*/
|
|
44
|
-
export function
|
|
37
|
+
export declare function refresh(this: XCUITestDriver): Promise<void>;
|
|
45
38
|
/**
|
|
46
|
-
*
|
|
39
|
+
* Gets the current page URL.
|
|
40
|
+
*
|
|
47
41
|
* @group Mobile Web Only
|
|
48
|
-
* @
|
|
42
|
+
* @throws {errors.NotImplementedError} If not in a web context
|
|
49
43
|
*/
|
|
50
|
-
export function
|
|
44
|
+
export declare function getUrl(this: XCUITestDriver): Promise<string>;
|
|
51
45
|
/**
|
|
52
|
-
*
|
|
46
|
+
* Gets the current page title.
|
|
47
|
+
*
|
|
53
48
|
* @group Mobile Web Only
|
|
54
|
-
* @
|
|
49
|
+
* @throws {errors.NotImplementedError} If not in a web context
|
|
55
50
|
*/
|
|
56
|
-
export function
|
|
51
|
+
export declare function title(this: XCUITestDriver): Promise<string>;
|
|
57
52
|
/**
|
|
58
|
-
*
|
|
53
|
+
* Gets all cookies for the current page.
|
|
54
|
+
*
|
|
55
|
+
* Cookie values are automatically URI-decoded.
|
|
56
|
+
*
|
|
59
57
|
* @group Mobile Web Only
|
|
60
|
-
* @
|
|
61
|
-
* @returns {Promise<void>}
|
|
58
|
+
* @throws {errors.NotImplementedError} If not in a web context
|
|
62
59
|
*/
|
|
63
|
-
export function
|
|
60
|
+
export declare function getCookies(this: XCUITestDriver): Promise<Cookie[]>;
|
|
64
61
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
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
|
|
70
|
+
export declare function setCookie(this: XCUITestDriver, cookie: Cookie): Promise<void>;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
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
|
-
* @
|
|
78
|
+
* @throws {errors.NotImplementedError} If not in a web context
|
|
75
79
|
*/
|
|
76
|
-
export function
|
|
80
|
+
export declare function deleteCookie(this: XCUITestDriver, cookieName: string): Promise<void>;
|
|
77
81
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* @
|
|
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
|
|
87
|
+
export declare function deleteCookies(this: XCUITestDriver): Promise<void>;
|
|
83
88
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* @
|
|
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
|
|
94
|
+
export declare function cacheWebElement(this: XCUITestDriver, el: Element | string): Element | string;
|
|
89
95
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* @
|
|
93
|
-
* @
|
|
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
|
|
101
|
+
export declare function cacheWebElements(this: XCUITestDriver, response: any): any;
|
|
97
102
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* @param
|
|
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
|
|
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
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* @
|
|
119
|
-
* @
|
|
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
|
|
117
|
+
export declare function executeAtomAsync(this: XCUITestDriver, atom: string, args: any[]): Promise<any>;
|
|
122
118
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
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
|
|
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
|
|
130
|
-
* @returns
|
|
130
|
+
* @param args - Array of arguments that may contain elements
|
|
131
|
+
* @returns Array with elements converted to atoms format
|
|
131
132
|
*/
|
|
132
|
-
export function
|
|
133
|
+
export declare function convertElementsForAtoms(this: XCUITestDriver, args?: readonly any[]): any[];
|
|
133
134
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
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
|
|
140
|
+
export declare function getElementId(element: any): string | undefined;
|
|
138
141
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* @param
|
|
142
|
-
* @
|
|
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
|
|
147
|
+
export declare function hasElementId(element: any): element is Element;
|
|
147
148
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* @param
|
|
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
|
|
158
|
+
export declare function findWebElementOrElements(this: XCUITestDriver, strategy: string, selector: string, many?: boolean, ctx?: Element | string | null): Promise<Element | Element[]>;
|
|
153
159
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
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
|
|
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
|
-
*
|
|
163
|
-
*
|
|
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
|
|
175
|
+
export declare function getSafariIsIphone(this: XCUITestDriver): Promise<boolean>;
|
|
166
176
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
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
|
|
171
|
-
export class getSafariIsNotched {
|
|
172
|
-
_isSafariNotched: boolean | undefined;
|
|
173
|
-
}
|
|
183
|
+
export declare function getSafariDeviceSize(this: XCUITestDriver): Promise<Size>;
|
|
174
184
|
/**
|
|
175
|
-
*
|
|
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
|
|
191
|
+
export declare function getSafariIsNotched(this: XCUITestDriver): Promise<boolean>;
|
|
178
192
|
/**
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
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:
|
|
216
|
+
export declare function getExtraNativeWebTapOffset(this: XCUITestDriver, isIphone: boolean, bannerVisibility: string): Promise<number>;
|
|
185
217
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
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:
|
|
224
|
+
export declare function nativeWebTap(this: XCUITestDriver, el: any): Promise<void>;
|
|
191
225
|
/**
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
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:
|
|
235
|
+
export declare function translateWebCoords(this: XCUITestDriver, x: number, y: number): Promise<Position>;
|
|
198
236
|
/**
|
|
199
|
-
*
|
|
200
|
-
*
|
|
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:
|
|
241
|
+
export declare function checkForAlert(this: XCUITestDriver): Promise<boolean>;
|
|
203
242
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
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:
|
|
250
|
+
export declare function waitForAtom(this: XCUITestDriver, promise: Promise<any>): Promise<any>;
|
|
208
251
|
/**
|
|
209
|
-
*
|
|
210
|
-
*
|
|
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:
|
|
256
|
+
export declare function mobileWebNav(this: XCUITestDriver, navType: string): Promise<void>;
|
|
213
257
|
/**
|
|
214
|
-
*
|
|
215
|
-
*
|
|
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:
|
|
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
|
-
* @
|
|
229
|
-
* @
|
|
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
|
|
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
|
-
* @
|
|
267
|
-
* @throws {
|
|
268
|
-
|
|
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.
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../lib/commands/web.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAO,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAiD9C;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,IAAI,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