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.
- package/CHANGELOG.md +6 -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 +206 -174
- 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} +305 -263
- 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
|
@@ -13,7 +13,7 @@ export async function getScreenshot() {
|
|
|
13
13
|
switch (_.toLower(webScreenshotMode)) {
|
|
14
14
|
case 'page':
|
|
15
15
|
case 'viewport':
|
|
16
|
-
return await
|
|
16
|
+
return await this.remote.captureScreenshot({
|
|
17
17
|
coordinateSystem: /** @type {'Viewport'|'Page'} */ (_.capitalize(webScreenshotMode)),
|
|
18
18
|
});
|
|
19
19
|
case 'native':
|
|
@@ -83,8 +83,7 @@ export async function getElementScreenshot(el) {
|
|
|
83
83
|
throw new errors.UnableToCaptureScreen('Cannot take a screenshot of a zero-size element');
|
|
84
84
|
}
|
|
85
85
|
const {x, y} = await this.executeAtom('get_top_left_coordinates', [atomsElement]);
|
|
86
|
-
return await (
|
|
87
|
-
.captureScreenshot({rect: {x, y, width, height}});
|
|
86
|
+
return await this.remote.captureScreenshot({rect: {x, y, width, height}});
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
const data = await this.proxyCommand(`/element/${el}/screenshot`, 'GET');
|
|
@@ -102,8 +101,7 @@ export async function getElementScreenshot(el) {
|
|
|
102
101
|
*/
|
|
103
102
|
export async function getViewportScreenshot() {
|
|
104
103
|
if (this.isWebContext()) {
|
|
105
|
-
return await
|
|
106
|
-
.captureScreenshot();
|
|
104
|
+
return await this.remote.captureScreenshot();
|
|
107
105
|
}
|
|
108
106
|
|
|
109
107
|
const screenshot = await this.getScreenshot();
|
package/lib/commands/timeouts.js
CHANGED
|
@@ -49,7 +49,7 @@ export async function asyncScriptTimeout(ms) {
|
|
|
49
49
|
export function setPageLoadTimeout(ms) {
|
|
50
50
|
ms = parseInt(ms, 10);
|
|
51
51
|
this.pageLoadMs = ms;
|
|
52
|
-
if (this.
|
|
52
|
+
if (this._remote) {
|
|
53
53
|
this.remote.pageLoadMs = ms;
|
|
54
54
|
}
|
|
55
55
|
this.log.debug(`Set page load timeout to ${ms}ms`);
|