appium-xcuitest-driver 12.3.4 → 12.5.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 +16 -0
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/helpers/guards.d.ts +7 -0
- package/build/lib/commands/helpers/guards.d.ts.map +1 -1
- package/build/lib/commands/helpers/guards.js +9 -0
- package/build/lib/commands/helpers/guards.js.map +1 -1
- package/build/lib/commands/helpers/index.d.ts +2 -2
- package/build/lib/commands/helpers/index.d.ts.map +1 -1
- package/build/lib/commands/helpers/index.js +1 -1
- package/build/lib/commands/helpers/index.js.map +1 -1
- package/build/lib/commands/wda/utils.d.ts +7 -0
- package/build/lib/commands/wda/utils.d.ts.map +1 -1
- package/build/lib/commands/wda/utils.js +19 -0
- package/build/lib/commands/wda/utils.js.map +1 -1
- package/build/lib/commands/web-native-bridge.d.ts +116 -0
- package/build/lib/commands/web-native-bridge.d.ts.map +1 -0
- package/build/lib/commands/web-native-bridge.js +533 -0
- package/build/lib/commands/web-native-bridge.js.map +1 -0
- package/build/lib/commands/web.d.ts +21 -107
- package/build/lib/commands/web.d.ts.map +1 -1
- package/build/lib/commands/web.js +71 -482
- package/build/lib/commands/web.js.map +1 -1
- package/build/lib/driver.d.ts +26 -14
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +43 -15
- package/build/lib/driver.js.map +1 -1
- package/build/lib/types.d.ts +41 -0
- package/build/lib/types.d.ts.map +1 -1
- package/build/lib/utils/index.d.ts +1 -1
- package/build/lib/utils/index.d.ts.map +1 -1
- package/build/lib/utils/index.js +1 -1
- package/build/lib/utils/index.js.map +1 -1
- package/build/lib/utils/lang.d.ts +7 -0
- package/build/lib/utils/lang.d.ts.map +1 -1
- package/build/lib/utils/lang.js +9 -0
- package/build/lib/utils/lang.js.map +1 -1
- package/lib/commands/execute.ts +1 -1
- package/lib/commands/helpers/guards.ts +14 -0
- package/lib/commands/helpers/index.ts +2 -2
- package/lib/commands/wda/utils.ts +22 -0
- package/lib/commands/web-native-bridge.ts +609 -0
- package/lib/commands/web.ts +106 -595
- package/lib/driver.ts +49 -16
- package/lib/types.ts +45 -0
- package/lib/utils/index.ts +1 -0
- package/lib/utils/lang.ts +10 -0
- package/npm-shrinkwrap.json +15 -15
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [12.5.0](https://github.com/appium/appium-xcuitest-driver/compare/v12.4.0...v12.5.0) (2026-08-17)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* support native web tap inside same-origin iframes, bump remote-debugger ([#2950](https://github.com/appium/appium-xcuitest-driver/issues/2950)) ([6f91d47](https://github.com/appium/appium-xcuitest-driver/commit/6f91d47349484742e05d9da56148a8c4d264f9a2))
|
|
6
|
+
|
|
7
|
+
## [12.4.0](https://github.com/appium/appium-xcuitest-driver/compare/v12.3.4...v12.4.0) (2026-08-17)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* replace native web tap heuristics with automatic coordinate calibration ([#2948](https://github.com/appium/appium-xcuitest-driver/issues/2948)) ([9fd2107](https://github.com/appium/appium-xcuitest-driver/commit/9fd21077a6fda9a162713438edc635b9a7677361))
|
|
12
|
+
|
|
13
|
+
### Code Refactoring
|
|
14
|
+
|
|
15
|
+
* tighten typing in web commands and dedupe web-context guards ([#2947](https://github.com/appium/appium-xcuitest-driver/issues/2947)) ([96299f3](https://github.com/appium/appium-xcuitest-driver/commit/96299f38145d2fe7ba9624212933e71044c44039))
|
|
16
|
+
|
|
1
17
|
## [12.3.4](https://github.com/appium/appium-xcuitest-driver/compare/v12.3.3...v12.3.4) (2026-08-14)
|
|
2
18
|
|
|
3
19
|
### Bug Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.ts"],"names":[],"mappings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IAED;;;;OAIG;IACH,IAAI,WAAW,IAAI,iBAAiB,IAAI,yBAAyB,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC;QACvF,iBAAiB,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,SAAqC,CAAC,CAAC;IAC5G,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
|
|
@@ -5,6 +5,9 @@ export interface DeviceGuardDriver {
|
|
|
5
5
|
isRealDevice(): boolean;
|
|
6
6
|
readonly device: unknown;
|
|
7
7
|
}
|
|
8
|
+
export interface WebContextGuardDriver {
|
|
9
|
+
isWebContext(): boolean;
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* Requires that the given driver is running on a Simulator and return
|
|
10
13
|
* the simulator instance.
|
|
@@ -15,4 +18,8 @@ export declare function requireSimulator(driver: DeviceGuardDriver, action: stri
|
|
|
15
18
|
* the real device instance.
|
|
16
19
|
*/
|
|
17
20
|
export declare function requireRealDevice(driver: DeviceGuardDriver, action: string): RealDevice;
|
|
21
|
+
/**
|
|
22
|
+
* Throws if the given driver is not currently in a web context.
|
|
23
|
+
*/
|
|
24
|
+
export declare function requireWebContext(driver: WebContextGuardDriver, message?: string): void;
|
|
18
25
|
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../../lib/commands/helpers/guards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../../lib/commands/helpers/guards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAGpD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,wCAAwC,CAAC;AAGvE,MAAM,WAAW,iBAAiB;IAChC,WAAW,IAAI,OAAO,CAAC;IACvB,YAAY,IAAI,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,IAAI,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAKrF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAKvF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAIvF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { errors } from 'appium/driver.js';
|
|
1
2
|
import { upperFirst } from '../../utils/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Requires that the given driver is running on a Simulator and return
|
|
@@ -19,4 +20,12 @@ export function requireRealDevice(driver, action) {
|
|
|
19
20
|
}
|
|
20
21
|
return driver.device;
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Throws if the given driver is not currently in a web context.
|
|
25
|
+
*/
|
|
26
|
+
export function requireWebContext(driver, message) {
|
|
27
|
+
if (!driver.isWebContext()) {
|
|
28
|
+
throw new errors.NotImplementedError(message);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
22
31
|
//# sourceMappingURL=guards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../../lib/commands/helpers/guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../../lib/commands/helpers/guards.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAGxC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAYhD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAyB,EAAE,MAAc;IACxE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,qCAAqC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,MAAM,CAAC,MAAmB,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAyB,EAAE,MAAc;IACzE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,MAAM,CAAC,MAAoB,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAA6B,EAAE,OAAgB;IAC/E,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC;QAC3B,MAAM,IAAI,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { SAFARI_BUNDLE_ID, buildSafariPreferences, checkAutInstallationState, findApps, installAUT, onDownloadApp, onPostConfigureApp, } from './app.js';
|
|
2
2
|
export { TimeoutError, withTimeout } from './async.js';
|
|
3
|
-
export { requireRealDevice, requireSimulator } from './guards.js';
|
|
4
|
-
export type { DeviceGuardDriver } from './guards.js';
|
|
3
|
+
export { requireRealDevice, requireSimulator, requireWebContext } from './guards.js';
|
|
4
|
+
export type { DeviceGuardDriver, WebContextGuardDriver } from './guards.js';
|
|
5
5
|
export { encodeBase64OrUpload, getPIDsListeningOnPort, isLocalHost } from './network.js';
|
|
6
6
|
export type { UploadOptions } from './network.js';
|
|
7
7
|
export { handleMjpegOptions } from './mjpeg.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/commands/helpers/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAErD,OAAO,EAAC,iBAAiB,EAAE,gBAAgB,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/commands/helpers/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAErD,OAAO,EAAC,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAC;AACnF,YAAY,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAC,oBAAoB,EAAE,sBAAsB,EAAE,WAAW,EAAC,MAAM,cAAc,CAAC;AACvF,YAAY,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AACtD,YAAY,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAC,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,YAAY,CAAC;AAE7E,OAAO,EAAC,iCAAiC,EAAE,yBAAyB,EAAC,MAAM,cAAc,CAAC;AAC1F,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAC,mBAAmB,EAAE,eAAe,EAAE,wBAAwB,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Submodules must import siblings directly, never this barrel — avoids cycles.
|
|
2
2
|
export { SAFARI_BUNDLE_ID, buildSafariPreferences, checkAutInstallationState, findApps, installAUT, onDownloadApp, onPostConfigureApp, } from './app.js';
|
|
3
3
|
export { TimeoutError, withTimeout } from './async.js';
|
|
4
|
-
export { requireRealDevice, requireSimulator } from './guards.js';
|
|
4
|
+
export { requireRealDevice, requireSimulator, requireWebContext } from './guards.js';
|
|
5
5
|
export { encodeBase64OrUpload, getPIDsListeningOnPort, isLocalHost } from './network.js';
|
|
6
6
|
export { handleMjpegOptions } from './mjpeg.js';
|
|
7
7
|
export { getDriverInfo, printUser } from './runtime.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/commands/helpers/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAErD,OAAO,EAAC,iBAAiB,EAAE,gBAAgB,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/commands/helpers/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAErD,OAAO,EAAC,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAC;AAGnF,OAAO,EAAC,oBAAoB,EAAE,sBAAsB,EAAE,WAAW,EAAC,MAAM,cAAc,CAAC;AAGvF,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAGtD,OAAO,EAAC,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,YAAY,CAAC;AAE7E,OAAO,EAAC,iCAAiC,EAAE,yBAAyB,EAAC,MAAM,cAAc,CAAC;AAG1F,OAAO,EAAC,mBAAmB,EAAE,eAAe,EAAE,wBAAwB,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { WebDriverAgent } from 'appium-webdriveragent';
|
|
2
|
+
import type { XCUITestDriver } from '../../driver.js';
|
|
2
3
|
/**
|
|
3
4
|
* Returns the WebDriverAgent derived data root from Xcode build settings.
|
|
4
5
|
*/
|
|
5
6
|
export declare function getDerivedDataPath(wda: WebDriverAgent): Promise<string | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Gets the base URL for accessing WDA HTTP endpoints.
|
|
9
|
+
*
|
|
10
|
+
* @returns The base URL (e.g., 'http://127.0.0.1:8100')
|
|
11
|
+
*/
|
|
12
|
+
export declare function getWdaLocalhostRoot(this: XCUITestDriver): string;
|
|
6
13
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../lib/commands/wda/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAMzF"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../lib/commands/wda/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAEpD;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAMzF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAahE"}
|
|
@@ -9,4 +9,23 @@ export async function getDerivedDataPath(wda) {
|
|
|
9
9
|
const buildDir = buildSettings?.BUILD_DIR;
|
|
10
10
|
return buildDir ? path.dirname(path.dirname(path.normalize(buildDir))) : undefined;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Gets the base URL for accessing WDA HTTP endpoints.
|
|
14
|
+
*
|
|
15
|
+
* @returns The base URL (e.g., 'http://127.0.0.1:8100')
|
|
16
|
+
*/
|
|
17
|
+
export function getWdaLocalhostRoot() {
|
|
18
|
+
const wdaPort = () => {
|
|
19
|
+
try {
|
|
20
|
+
return this.wda.url?.port;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// this.wda could raise an error when that was not initialized yet.
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const remotePort = ((this.isRealDevice() ? this.opts.wdaRemotePort : null) ?? wdaPort() ?? this.opts.wdaLocalPort) || 8100;
|
|
28
|
+
const remoteIp = this.opts.wdaBindingIP ?? '127.0.0.1';
|
|
29
|
+
return `http://${remoteIp}:${remotePort}`;
|
|
30
|
+
}
|
|
12
31
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/commands/wda/utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/commands/wda/utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAM7B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,GAAmB;IAC1D,MAAM,aAAa,GAAG,MAAM,GAAG,CAAC,qBAAqB,CAAC;QACpD,MAAM,EAAE,sBAAsB;KAC/B,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,aAAa,EAAE,SAAS,CAAC;IAC1C,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACrF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC;QAC5B,CAAC;QAAC,MAAM,CAAC;YACP,mEAAmE;YACnE,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,CAAC;IACF,MAAM,UAAU,GACd,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC;IAC1G,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,WAAW,CAAC;IACvD,OAAO,UAAU,QAAQ,IAAI,UAAU,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { Element, Position, Size } from '@appium/types';
|
|
2
|
+
import type { XCUITestDriver } from '../driver.js';
|
|
3
|
+
import type { CalibrationData, CalibrationSample, ViewportState } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Computes the affine transform (`native = offset + ratio * web`) that best
|
|
6
|
+
* fits a set of native/web coordinate sample pairs, independently per axis.
|
|
7
|
+
* With exactly 2 samples this reduces to the same 2-point calculation the
|
|
8
|
+
* driver has always used; with more it's an ordinary least-squares fit,
|
|
9
|
+
* which lets calibration become more robust in the future without changing
|
|
10
|
+
* the shape of the result.
|
|
11
|
+
*
|
|
12
|
+
* Pure and driver-independent so it can be unit tested directly.
|
|
13
|
+
*
|
|
14
|
+
* @param samples - At least 2 native/web coordinate pairs
|
|
15
|
+
* @throws {Error} If fewer than 2 samples are given, or the samples don't
|
|
16
|
+
* vary enough along an axis to fit a transform (e.g. all web x values equal)
|
|
17
|
+
*/
|
|
18
|
+
export declare function fitAffineTransform(samples: readonly CalibrationSample[]): CalibrationData;
|
|
19
|
+
/**
|
|
20
|
+
* Builds the cache key `translateWebCoords` uses to decide whether a
|
|
21
|
+
* previously fitted calibration transform is still valid. Rotating the
|
|
22
|
+
* device, resizing the viewport (e.g. the on-screen keyboard appearing), or
|
|
23
|
+
* scrolling away from the top of the page can all change how web
|
|
24
|
+
* coordinates map to native ones, so any change to this signature should
|
|
25
|
+
* invalidate the cache.
|
|
26
|
+
*
|
|
27
|
+
* Pure and driver-independent so it can be unit tested directly.
|
|
28
|
+
*/
|
|
29
|
+
export declare function viewportSignature(state: ViewportState): string;
|
|
30
|
+
/**
|
|
31
|
+
* Clicks at the specified web coordinates.
|
|
32
|
+
*
|
|
33
|
+
* Coordinates are automatically translated from web to native coordinates.
|
|
34
|
+
*
|
|
35
|
+
* @param x - X coordinate in web space
|
|
36
|
+
* @param y - Y coordinate in web space
|
|
37
|
+
*/
|
|
38
|
+
export declare function clickWebCoords(this: XCUITestDriver, x: number, y: number): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated No longer used: coordinate translation is calibrated
|
|
41
|
+
* automatically and no longer needs a device-type hint. Kept as a no-op only
|
|
42
|
+
* for backward compatibility with existing callers.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getSafariIsIphone(this: XCUITestDriver): Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated No longer used: coordinate translation is calibrated
|
|
47
|
+
* automatically and no longer needs the device's screen size. Kept as a
|
|
48
|
+
* no-op only for backward compatibility with existing callers.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getSafariDeviceSize(this: XCUITestDriver): Promise<Size>;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated No longer used: coordinate translation is calibrated
|
|
53
|
+
* automatically and no longer needs a notch hint. Kept as a no-op only for
|
|
54
|
+
* backward compatibility with existing callers.
|
|
55
|
+
*/
|
|
56
|
+
export declare function getSafariIsNotched(this: XCUITestDriver): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated No longer used: coordinate translation is calibrated
|
|
59
|
+
* automatically instead of computing Safari-chrome offsets. Kept as a no-op
|
|
60
|
+
* only for backward compatibility with existing callers.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getExtraTranslateWebCoordsOffset(this: XCUITestDriver, wvPos: {
|
|
63
|
+
x: number;
|
|
64
|
+
y: number;
|
|
65
|
+
}, realDims: {
|
|
66
|
+
w: number;
|
|
67
|
+
h: number;
|
|
68
|
+
}): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated No longer used: coordinate translation is calibrated
|
|
71
|
+
* automatically instead of computing a smart-app-banner offset. Kept as a
|
|
72
|
+
* no-op only for backward compatibility with existing callers.
|
|
73
|
+
*/
|
|
74
|
+
export declare function getExtraNativeWebTapOffset(this: XCUITestDriver, isIphone: boolean, bannerVisibility: string): Promise<number>;
|
|
75
|
+
/**
|
|
76
|
+
* Performs a native tap on a web element.
|
|
77
|
+
*
|
|
78
|
+
* Attempts to use a simple native tap first, falling back to coordinate-based tapping if needed.
|
|
79
|
+
*
|
|
80
|
+
* @param el - Element to tap
|
|
81
|
+
*/
|
|
82
|
+
export declare function nativeWebTap(this: XCUITestDriver, el: Element | string): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Translates web coordinates to native screen coordinates.
|
|
85
|
+
*
|
|
86
|
+
* Always uses a calibration transform, automatically (re)fitting one via
|
|
87
|
+
* {@linkcode getOrCreateWebviewCalibration} whenever the cached one no
|
|
88
|
+
* longer matches the current orientation/size/scroll state. That transform
|
|
89
|
+
* is fitted against the top-level page, so `x`/`y` are first shifted by the
|
|
90
|
+
* current sub-frame's offset (see {@linkcode getFrameChainOffset}), if any.
|
|
91
|
+
*
|
|
92
|
+
* @param x - X coordinate in web space
|
|
93
|
+
* @param y - Y coordinate in web space
|
|
94
|
+
* @returns Translated position in native coordinates
|
|
95
|
+
* @throws {Error} If no WebView is found, if calibration fails, or if the
|
|
96
|
+
* current frame (or one of its ancestors) has a different origin than the
|
|
97
|
+
* top-level page
|
|
98
|
+
*/
|
|
99
|
+
export declare function translateWebCoords(this: XCUITestDriver, x: number, y: number): Promise<Position>;
|
|
100
|
+
/**
|
|
101
|
+
* Primes (or refreshes) the calibration transform that `translateWebCoords`
|
|
102
|
+
* fits and applies automatically for every native web tap. Calibration
|
|
103
|
+
* happens transparently as soon as it's needed, so calling this explicitly
|
|
104
|
+
* is optional; it's useful mainly to warm the cache ahead of a
|
|
105
|
+
* timing-sensitive interaction, or to force a fresh fit without waiting for
|
|
106
|
+
* the viewport signature to change.
|
|
107
|
+
*
|
|
108
|
+
* Measures against the current page in place, without navigating away from
|
|
109
|
+
* it, so it is safe to call without losing web app state, and works
|
|
110
|
+
* identically for Safari and hybrid-app webviews.
|
|
111
|
+
*
|
|
112
|
+
* @returns Calibration data with offset and pixel ratio information
|
|
113
|
+
* @throws {errors.NotImplementedError} If not in a web context
|
|
114
|
+
*/
|
|
115
|
+
export declare function mobileCalibrateWebToRealCoordinatesTranslation(this: XCUITestDriver): Promise<CalibrationData>;
|
|
116
|
+
//# sourceMappingURL=web-native-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-native-bridge.d.ts","sourceRoot":"","sources":["../../../lib/commands/web-native-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAE,QAAQ,EAAQ,IAAI,EAAC,MAAM,eAAe,CAAC;AAIjE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAwB,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AA6J1G;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,eAAe,CAwCzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAK9D;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9F;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAE9E;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7E;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/E;AAED;;;;GAIG;AACH,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,EAC7B,QAAQ,EAAE;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,E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