appium-xcuitest-driver 10.14.5 → 10.14.7
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/active-app-info.d.ts +4 -3
- package/build/lib/commands/active-app-info.d.ts.map +1 -1
- package/build/lib/commands/active-app-info.js +2 -3
- package/build/lib/commands/active-app-info.js.map +1 -1
- package/build/lib/commands/app-strings.d.ts +6 -7
- package/build/lib/commands/app-strings.d.ts.map +1 -1
- package/build/lib/commands/app-strings.js +3 -8
- package/build/lib/commands/app-strings.js.map +1 -1
- package/build/lib/commands/audit.d.ts +5 -33
- package/build/lib/commands/audit.d.ts.map +1 -1
- package/build/lib/commands/audit.js +3 -16
- package/build/lib/commands/audit.js.map +1 -1
- package/build/lib/commands/device-info.d.ts +13 -0
- package/build/lib/commands/device-info.d.ts.map +1 -0
- package/build/lib/commands/{deviceInfo.js → device-info.js} +3 -8
- package/build/lib/commands/device-info.js.map +1 -0
- package/build/lib/commands/keychains.d.ts +2 -2
- package/build/lib/commands/keychains.d.ts.map +1 -1
- package/build/lib/commands/keychains.js +1 -4
- package/build/lib/commands/keychains.js.map +1 -1
- package/build/lib/commands/localization.d.ts +7 -6
- package/build/lib/commands/localization.d.ts.map +1 -1
- package/build/lib/commands/localization.js +7 -8
- package/build/lib/commands/localization.js.map +1 -1
- package/build/lib/commands/types.d.ts +22 -0
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/driver.d.ts +1 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +1 -1
- package/build/lib/driver.js.map +1 -1
- package/build/lib/index.d.ts +5 -0
- package/build/lib/index.d.ts.map +1 -0
- package/build/{index.js → lib/index.js} +2 -2
- package/build/lib/index.js.map +1 -0
- package/build/test/functional/basic/alert-e2e-specs.d.ts +2 -0
- package/build/test/functional/basic/alert-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/basic/alert-e2e-specs.js +129 -0
- package/build/test/functional/basic/alert-e2e-specs.js.map +1 -0
- package/build/test/functional/basic/basic-e2e-specs.d.ts +2 -0
- package/build/test/functional/basic/basic-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/basic/basic-e2e-specs.js +268 -0
- package/build/test/functional/basic/basic-e2e-specs.js.map +1 -0
- package/build/test/functional/basic/element-e2e-specs.d.ts +2 -0
- package/build/test/functional/basic/element-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/basic/element-e2e-specs.js +354 -0
- package/build/test/functional/basic/element-e2e-specs.js.map +1 -0
- package/build/test/functional/basic/find-e2e-specs.d.ts +2 -0
- package/build/test/functional/basic/find-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/basic/find-e2e-specs.js +434 -0
- package/build/test/functional/basic/find-e2e-specs.js.map +1 -0
- package/build/test/functional/basic/gesture-e2e-specs.d.ts +2 -0
- package/build/test/functional/basic/gesture-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/basic/gesture-e2e-specs.js +211 -0
- package/build/test/functional/basic/gesture-e2e-specs.js.map +1 -0
- package/build/test/functional/desired.d.ts +26 -0
- package/build/test/functional/desired.d.ts.map +1 -0
- package/build/test/functional/desired.js +124 -0
- package/build/test/functional/desired.js.map +1 -0
- package/build/test/functional/device/accessibility-e2e-specs.d.ts +2 -0
- package/build/test/functional/device/accessibility-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/device/accessibility-e2e-specs.js +117 -0
- package/build/test/functional/device/accessibility-e2e-specs.js.map +1 -0
- package/build/test/functional/device/file-movement-e2e-specs.d.ts +2 -0
- package/build/test/functional/device/file-movement-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/device/file-movement-e2e-specs.js +141 -0
- package/build/test/functional/device/file-movement-e2e-specs.js.map +1 -0
- package/build/test/functional/device/otherApps-e2e-specs.d.ts +2 -0
- package/build/test/functional/device/otherApps-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/device/otherApps-e2e-specs.js +66 -0
- package/build/test/functional/device/otherApps-e2e-specs.js.map +1 -0
- package/build/test/functional/device/passwords-e2e-specs.d.ts +2 -0
- package/build/test/functional/device/passwords-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/device/passwords-e2e-specs.js +91 -0
- package/build/test/functional/device/passwords-e2e-specs.js.map +1 -0
- package/build/test/functional/device/performance-e2e-specs.d.ts +2 -0
- package/build/test/functional/device/performance-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/device/performance-e2e-specs.js +72 -0
- package/build/test/functional/device/performance-e2e-specs.js.map +1 -0
- package/build/test/functional/driver/driver-e2e-specs.d.ts +2 -0
- package/build/test/functional/driver/driver-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/driver/driver-e2e-specs.js +296 -0
- package/build/test/functional/driver/driver-e2e-specs.js.map +1 -0
- package/build/test/functional/helpers/element.d.ts +4 -0
- package/build/test/functional/helpers/element.d.ts.map +1 -0
- package/build/test/functional/helpers/element.js +8 -0
- package/build/test/functional/helpers/element.js.map +1 -0
- package/build/test/functional/helpers/ports.d.ts +6 -0
- package/build/test/functional/helpers/ports.d.ts.map +1 -0
- package/build/test/functional/helpers/ports.js +29 -0
- package/build/test/functional/helpers/ports.js.map +1 -0
- package/build/test/functional/helpers/session.d.ts +7 -0
- package/build/test/functional/helpers/session.d.ts.map +1 -0
- package/build/test/functional/helpers/session.js +39 -0
- package/build/test/functional/helpers/session.js.map +1 -0
- package/build/test/functional/helpers/simulator.d.ts +12 -0
- package/build/test/functional/helpers/simulator.d.ts.map +1 -0
- package/build/test/functional/helpers/simulator.js +51 -0
- package/build/test/functional/helpers/simulator.js.map +1 -0
- package/build/test/functional/long/typing-stress-e2e-specs.d.ts +2 -0
- package/build/test/functional/long/typing-stress-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/long/typing-stress-e2e-specs.js +84 -0
- package/build/test/functional/long/typing-stress-e2e-specs.js.map +1 -0
- package/build/test/functional/tv/tvos-e2e-specs.d.ts +2 -0
- package/build/test/functional/tv/tvos-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/tv/tvos-e2e-specs.js +83 -0
- package/build/test/functional/tv/tvos-e2e-specs.js.map +1 -0
- package/build/test/functional/web/helpers.d.ts +28 -0
- package/build/test/functional/web/helpers.d.ts.map +1 -0
- package/build/test/functional/web/helpers.js +137 -0
- package/build/test/functional/web/helpers.js.map +1 -0
- package/build/test/functional/web/safari-alerts-e2e-specs.d.ts +2 -0
- package/build/test/functional/web/safari-alerts-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/web/safari-alerts-e2e-specs.js +109 -0
- package/build/test/functional/web/safari-alerts-e2e-specs.js.map +1 -0
- package/build/test/functional/web/safari-basic-e2e-specs.d.ts +2 -0
- package/build/test/functional/web/safari-basic-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/web/safari-basic-e2e-specs.js +425 -0
- package/build/test/functional/web/safari-basic-e2e-specs.js.map +1 -0
- package/build/test/functional/web/safari-execute-e2e-specs.d.ts +2 -0
- package/build/test/functional/web/safari-execute-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/web/safari-execute-e2e-specs.js +167 -0
- package/build/test/functional/web/safari-execute-e2e-specs.js.map +1 -0
- package/build/test/functional/web/safari-nativewebtap-e2e-specs.d.ts +2 -0
- package/build/test/functional/web/safari-nativewebtap-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/web/safari-nativewebtap-e2e-specs.js +323 -0
- package/build/test/functional/web/safari-nativewebtap-e2e-specs.js.map +1 -0
- package/build/test/functional/web/safari-ssl-e2e-specs.d.ts +2 -0
- package/build/test/functional/web/safari-ssl-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/web/safari-ssl-e2e-specs.js +131 -0
- package/build/test/functional/web/safari-ssl-e2e-specs.js.map +1 -0
- package/build/test/functional/web/safari-window-e2e-specs.d.ts +2 -0
- package/build/test/functional/web/safari-window-e2e-specs.d.ts.map +1 -0
- package/build/test/functional/web/safari-window-e2e-specs.js +263 -0
- package/build/test/functional/web/safari-window-e2e-specs.js.map +1 -0
- package/build/test/setup.d.ts +19 -0
- package/build/test/setup.d.ts.map +1 -0
- package/build/test/setup.js +117 -0
- package/build/test/setup.js.map +1 -0
- package/build/test/unit/app-infos-cache-specs.d.ts +2 -0
- package/build/test/unit/app-infos-cache-specs.d.ts.map +1 -0
- package/build/test/unit/app-infos-cache-specs.js +101 -0
- package/build/test/unit/app-infos-cache-specs.js.map +1 -0
- package/build/test/unit/app-utils-specs.d.ts +2 -0
- package/build/test/unit/app-utils-specs.d.ts.map +1 -0
- package/build/test/unit/app-utils-specs.js +131 -0
- package/build/test/unit/app-utils-specs.js.map +1 -0
- package/build/test/unit/commands/activeAppInfo-specs.d.ts +2 -0
- package/build/test/unit/commands/activeAppInfo-specs.d.ts.map +1 -0
- package/build/test/unit/commands/activeAppInfo-specs.js +74 -0
- package/build/test/unit/commands/activeAppInfo-specs.js.map +1 -0
- package/build/test/unit/commands/alert-specs.d.ts +2 -0
- package/build/test/unit/commands/alert-specs.d.ts.map +1 -0
- package/build/test/unit/commands/alert-specs.js +111 -0
- package/build/test/unit/commands/alert-specs.js.map +1 -0
- package/build/test/unit/commands/context-specs.d.ts +2 -0
- package/build/test/unit/commands/context-specs.d.ts.map +1 -0
- package/build/test/unit/commands/context-specs.js +119 -0
- package/build/test/unit/commands/context-specs.js.map +1 -0
- package/build/test/unit/commands/deviceinfo-specs.d.ts +2 -0
- package/build/test/unit/commands/deviceinfo-specs.d.ts.map +1 -0
- package/build/test/unit/commands/deviceinfo-specs.js +67 -0
- package/build/test/unit/commands/deviceinfo-specs.js.map +1 -0
- package/build/test/unit/commands/element-specs.d.ts +2 -0
- package/build/test/unit/commands/element-specs.d.ts.map +1 -0
- package/build/test/unit/commands/element-specs.js +419 -0
- package/build/test/unit/commands/element-specs.js.map +1 -0
- package/build/test/unit/commands/file-movement-specs.d.ts +2 -0
- package/build/test/unit/commands/file-movement-specs.d.ts.map +1 -0
- package/build/test/unit/commands/file-movement-specs.js +81 -0
- package/build/test/unit/commands/file-movement-specs.js.map +1 -0
- package/build/test/unit/commands/find-specs.d.ts +2 -0
- package/build/test/unit/commands/find-specs.d.ts.map +1 -0
- package/build/test/unit/commands/find-specs.js +106 -0
- package/build/test/unit/commands/find-specs.js.map +1 -0
- package/build/test/unit/commands/general-specs.d.ts +2 -0
- package/build/test/unit/commands/general-specs.d.ts.map +1 -0
- package/build/test/unit/commands/general-specs.js +154 -0
- package/build/test/unit/commands/general-specs.js.map +1 -0
- package/build/test/unit/commands/gesture-specs.d.ts +2 -0
- package/build/test/unit/commands/gesture-specs.d.ts.map +1 -0
- package/build/test/unit/commands/gesture-specs.js +263 -0
- package/build/test/unit/commands/gesture-specs.js.map +1 -0
- package/build/test/unit/commands/location-specs.d.ts +2 -0
- package/build/test/unit/commands/location-specs.d.ts.map +1 -0
- package/build/test/unit/commands/location-specs.js +141 -0
- package/build/test/unit/commands/location-specs.js.map +1 -0
- package/build/test/unit/commands/pasteboard-specs.d.ts +2 -0
- package/build/test/unit/commands/pasteboard-specs.d.ts.map +1 -0
- package/build/test/unit/commands/pasteboard-specs.js +65 -0
- package/build/test/unit/commands/pasteboard-specs.js.map +1 -0
- package/build/test/unit/commands/proxy-helper-specs.d.ts +2 -0
- package/build/test/unit/commands/proxy-helper-specs.d.ts.map +1 -0
- package/build/test/unit/commands/proxy-helper-specs.js +88 -0
- package/build/test/unit/commands/proxy-helper-specs.js.map +1 -0
- package/build/test/unit/commands/screenshots-specs.d.ts +2 -0
- package/build/test/unit/commands/screenshots-specs.d.ts.map +1 -0
- package/build/test/unit/commands/screenshots-specs.js +71 -0
- package/build/test/unit/commands/screenshots-specs.js.map +1 -0
- package/build/test/unit/commands/session-specs.d.ts +2 -0
- package/build/test/unit/commands/session-specs.d.ts.map +1 -0
- package/build/test/unit/commands/session-specs.js +49 -0
- package/build/test/unit/commands/session-specs.js.map +1 -0
- package/build/test/unit/commands/simctl-specs.d.ts +2 -0
- package/build/test/unit/commands/simctl-specs.d.ts.map +1 -0
- package/build/test/unit/commands/simctl-specs.js +54 -0
- package/build/test/unit/commands/simctl-specs.js.map +1 -0
- package/build/test/unit/commands/source-specs.d.ts +2 -0
- package/build/test/unit/commands/source-specs.d.ts.map +1 -0
- package/build/test/unit/commands/source-specs.js +55 -0
- package/build/test/unit/commands/source-specs.js.map +1 -0
- package/build/test/unit/commands/ssl-certificate-specs.d.ts +2 -0
- package/build/test/unit/commands/ssl-certificate-specs.d.ts.map +1 -0
- package/build/test/unit/commands/ssl-certificate-specs.js +16 -0
- package/build/test/unit/commands/ssl-certificate-specs.js.map +1 -0
- package/build/test/unit/commands/xctest-specs.d.ts +2 -0
- package/build/test/unit/commands/xctest-specs.d.ts.map +1 -0
- package/build/test/unit/commands/xctest-specs.js +116 -0
- package/build/test/unit/commands/xctest-specs.js.map +1 -0
- package/build/test/unit/css-converter-specs.d.ts +2 -0
- package/build/test/unit/css-converter-specs.d.ts.map +1 -0
- package/build/test/unit/css-converter-specs.js +99 -0
- package/build/test/unit/css-converter-specs.js.map +1 -0
- package/build/test/unit/device-connections-factory-specs.d.ts +2 -0
- package/build/test/unit/device-connections-factory-specs.d.ts.map +1 -0
- package/build/test/unit/device-connections-factory-specs.js +88 -0
- package/build/test/unit/device-connections-factory-specs.js.map +1 -0
- package/build/test/unit/driver-specs.d.ts +2 -0
- package/build/test/unit/driver-specs.d.ts.map +1 -0
- package/build/test/unit/driver-specs.js +358 -0
- package/build/test/unit/driver-specs.js.map +1 -0
- package/build/test/unit/helpers.d.ts +2 -0
- package/build/test/unit/helpers.d.ts.map +1 -0
- package/build/test/unit/helpers.js +5 -0
- package/build/test/unit/helpers.js.map +1 -0
- package/build/test/unit/language-specs.d.ts +2 -0
- package/build/test/unit/language-specs.d.ts.map +1 -0
- package/build/test/unit/language-specs.js +159 -0
- package/build/test/unit/language-specs.js.map +1 -0
- package/build/test/unit/logs-helpers-specs.d.ts +2 -0
- package/build/test/unit/logs-helpers-specs.d.ts.map +1 -0
- package/build/test/unit/logs-helpers-specs.js +71 -0
- package/build/test/unit/logs-helpers-specs.js.map +1 -0
- package/build/test/unit/processargs-specs.d.ts +2 -0
- package/build/test/unit/processargs-specs.d.ts.map +1 -0
- package/build/test/unit/processargs-specs.js +87 -0
- package/build/test/unit/processargs-specs.js.map +1 -0
- package/build/test/unit/real-device-management-specs.d.ts +2 -0
- package/build/test/unit/real-device-management-specs.d.ts.map +1 -0
- package/build/test/unit/real-device-management-specs.js +151 -0
- package/build/test/unit/real-device-management-specs.js.map +1 -0
- package/build/test/unit/simulator-management-specs.d.ts +2 -0
- package/build/test/unit/simulator-management-specs.d.ts.map +1 -0
- package/build/test/unit/simulator-management-specs.js +143 -0
- package/build/test/unit/simulator-management-specs.js.map +1 -0
- package/build/test/unit/utils-specs.d.ts +2 -0
- package/build/test/unit/utils-specs.d.ts.map +1 -0
- package/build/test/unit/utils-specs.js +132 -0
- package/build/test/unit/utils-specs.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/lib/commands/active-app-info.ts +15 -0
- package/lib/commands/{app-strings.js → app-strings.ts} +10 -9
- package/lib/commands/audit.ts +25 -0
- package/lib/commands/device-info.ts +24 -0
- package/lib/commands/keychains.ts +16 -0
- package/lib/commands/{localization.js → localization.ts} +22 -12
- package/lib/commands/types.ts +23 -0
- package/lib/driver.ts +1 -1
- package/lib/index.ts +5 -0
- package/npm-shrinkwrap.json +5 -5
- package/package.json +4 -7
- package/build/index.d.ts +0 -5
- package/build/lib/commands/deviceInfo.d.ts +0 -12
- package/build/lib/commands/deviceInfo.d.ts.map +0 -1
- package/build/lib/commands/deviceInfo.js.map +0 -1
- package/index.js +0 -7
- package/lib/commands/active-app-info.js +0 -12
- package/lib/commands/audit.js +0 -31
- package/lib/commands/deviceInfo.js +0 -27
- package/lib/commands/keychains.js +0 -17
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type {XCUITestDriver} from '../driver';
|
|
2
|
+
import type {ActiveAppInfo} from './types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Returns information about the active application.
|
|
6
|
+
*
|
|
7
|
+
* @returns Active app information
|
|
8
|
+
* @throws {Error} if an error raised by command
|
|
9
|
+
*/
|
|
10
|
+
export async function mobileGetActiveAppInfo(
|
|
11
|
+
this: XCUITestDriver,
|
|
12
|
+
): Promise<ActiveAppInfo> {
|
|
13
|
+
return await this.proxyCommand<unknown, ActiveAppInfo>('/wda/activeAppInfo', 'GET');
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import {parseLocalizableStrings} from '../app-utils';
|
|
2
|
+
import type {XCUITestDriver} from '../driver';
|
|
3
|
+
import type {StringRecord} from '@appium/types';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Return the language-specific strings for an app
|
|
5
7
|
*
|
|
6
|
-
* @param
|
|
8
|
+
* @param language - The language abbreviation to fetch app strings mapping for.
|
|
7
9
|
* If no language is provided then strings for the 'en language would be returned
|
|
8
|
-
* @param
|
|
10
|
+
* @param stringFile - Relative path to the corresponding .strings
|
|
9
11
|
* file starting from the corresponding .lproj folder, e.g., `base/main.strings`. If omitted,
|
|
10
12
|
* then Appium will make its best guess where the file is.
|
|
11
13
|
*
|
|
12
|
-
* @returns
|
|
13
|
-
*
|
|
14
|
-
* @this {XCUITestDriver}
|
|
14
|
+
* @returns A record of localized keys to localized text
|
|
15
15
|
*/
|
|
16
|
-
export async function getStrings(
|
|
16
|
+
export async function getStrings(
|
|
17
|
+
this: XCUITestDriver,
|
|
18
|
+
language: string,
|
|
19
|
+
stringFile: string | null = null,
|
|
20
|
+
): Promise<StringRecord<string>> {
|
|
17
21
|
this.log.debug(`Gettings strings for language '${language}' and string file '${stringFile}'`);
|
|
18
22
|
return await parseLocalizableStrings.bind(this)(
|
|
19
23
|
{
|
|
@@ -25,6 +29,3 @@ export async function getStrings(language, stringFile = null) {
|
|
|
25
29
|
);
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
/**
|
|
29
|
-
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
30
|
-
*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type {XCUITestDriver} from '../driver';
|
|
2
|
+
import type {AccessibilityAuditItem} from './types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Performs accessibility audit of the current application according to the given type or multiple types.
|
|
6
|
+
*
|
|
7
|
+
* @since Xcode 15/iOS 17
|
|
8
|
+
* @param auditTypes - One or more type names to perform the audit for.
|
|
9
|
+
* The full list of available names could be found at
|
|
10
|
+
* https://developer.apple.com/documentation/xctest/xcuiaccessibilityaudittype?language=objc
|
|
11
|
+
* If no type if provided explicitly then XCUIAccessibilityAuditTypeAll is assumed.
|
|
12
|
+
*
|
|
13
|
+
* @returns List of found issues or an empty list
|
|
14
|
+
*/
|
|
15
|
+
export async function mobilePerformAccessibilityAudit(
|
|
16
|
+
this: XCUITestDriver,
|
|
17
|
+
auditTypes?: string[],
|
|
18
|
+
): Promise<AccessibilityAuditItem[]> {
|
|
19
|
+
return await this.proxyCommand<{auditTypes?: string[]}, AccessibilityAuditItem[]>(
|
|
20
|
+
'/wda/performAccessibilityAudit',
|
|
21
|
+
'POST',
|
|
22
|
+
{auditTypes},
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {utilities} from 'appium-ios-device';
|
|
2
|
+
import type {XCUITestDriver} from '../driver';
|
|
3
|
+
import type {DeviceInfo, LockdownInfo} from './types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the miscellaneous information about the device under test.
|
|
7
|
+
*
|
|
8
|
+
* Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
|
|
9
|
+
*
|
|
10
|
+
* @returns The response of `/wda/device/info'`
|
|
11
|
+
*/
|
|
12
|
+
export async function mobileGetDeviceInfo(
|
|
13
|
+
this: XCUITestDriver,
|
|
14
|
+
): Promise<DeviceInfo | (DeviceInfo & {lockdownInfo: LockdownInfo})> {
|
|
15
|
+
const infoByWda = await this.proxyCommand<unknown, DeviceInfo>('/wda/device/info', 'GET');
|
|
16
|
+
|
|
17
|
+
if (this.isRealDevice()) {
|
|
18
|
+
const lockdownInfo = await utilities.getDeviceInfo(this.device.udid);
|
|
19
|
+
return {...infoByWda, ...{lockdownInfo}};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return infoByWda;
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {assertSimulator} from '../utils';
|
|
2
|
+
import type {XCUITestDriver} from '../driver';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Clears keychains on a simulated device.
|
|
6
|
+
*
|
|
7
|
+
* @throws {Error} If current device is not a Simulator or there was an error
|
|
8
|
+
* while clearing keychains.
|
|
9
|
+
* @group Simulator Only
|
|
10
|
+
*/
|
|
11
|
+
export async function mobileClearKeychains(
|
|
12
|
+
this: XCUITestDriver,
|
|
13
|
+
): Promise<void> {
|
|
14
|
+
await assertSimulator.call(this, 'Keychain modification').clearKeychains();
|
|
15
|
+
}
|
|
16
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {assertSimulator
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {assertSimulator} from '../utils';
|
|
2
|
+
import type {XCUITestDriver} from '../driver';
|
|
3
|
+
import type {KeyboardOptions, LanguageOptions, LocaleOptions} from './types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Change localization settings on the currently booted simulator
|
|
@@ -9,21 +9,31 @@ const assertSimulator = (driver) => _assertSimulator.call(driver, 'Localization
|
|
|
9
9
|
* Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
|
|
10
10
|
*
|
|
11
11
|
* The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
12
|
+
* @param keyboard - Keyboard options
|
|
13
|
+
* @param language - Language options
|
|
14
|
+
* @param locale - Locale options
|
|
15
15
|
* @throws {Error} If there was a failure while setting the preferences
|
|
16
|
-
* @returns
|
|
16
|
+
* @returns `true` if any of settings has been successfully changed
|
|
17
17
|
* @group Simulator Only
|
|
18
|
-
* @this {import('../driver').XCUITestDriver}
|
|
19
18
|
*/
|
|
20
|
-
export async function mobileConfigureLocalization(
|
|
21
|
-
|
|
19
|
+
export async function mobileConfigureLocalization(
|
|
20
|
+
this: XCUITestDriver,
|
|
21
|
+
keyboard?: KeyboardOptions,
|
|
22
|
+
language?: LanguageOptions,
|
|
23
|
+
locale?: LocaleOptions,
|
|
24
|
+
): Promise<boolean> {
|
|
25
|
+
;
|
|
22
26
|
|
|
23
|
-
const localizationOptions
|
|
27
|
+
const localizationOptions: {
|
|
28
|
+
locale?: LocaleOptions;
|
|
29
|
+
keyboard?: KeyboardOptions;
|
|
30
|
+
language?: LanguageOptions & {skipSyncUiDialogTranslation?: boolean};
|
|
31
|
+
} = {locale, keyboard};
|
|
24
32
|
if (language) {
|
|
25
33
|
// Assign skipSyncUiDialogTranslation: true option in order to avoid shutting down the WDA session
|
|
26
34
|
localizationOptions.language = Object.assign(language, {skipSyncUiDialogTranslation: true});
|
|
27
35
|
}
|
|
28
|
-
return await
|
|
36
|
+
return await assertSimulator.call(this, 'Localization configuration')
|
|
37
|
+
.configureLocalization(localizationOptions);
|
|
29
38
|
}
|
|
39
|
+
|
package/lib/commands/types.ts
CHANGED
|
@@ -334,6 +334,29 @@ export interface ProcessArguments {
|
|
|
334
334
|
args: string[];
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
+
/**
|
|
338
|
+
* Accessibility audit item returned by the audit command.
|
|
339
|
+
*/
|
|
340
|
+
export interface AccessibilityAuditItem {
|
|
341
|
+
/**
|
|
342
|
+
* The detailed description of the found accessibility issue.
|
|
343
|
+
*/
|
|
344
|
+
detailedDescription: string;
|
|
345
|
+
/**
|
|
346
|
+
* The compact description of the found accessibility issue.
|
|
347
|
+
*/
|
|
348
|
+
compactDescription: string;
|
|
349
|
+
/**
|
|
350
|
+
* The name of the audit type this issue belongs to. Could be
|
|
351
|
+
* a number if the type name is unknown.
|
|
352
|
+
*/
|
|
353
|
+
auditType: string | number;
|
|
354
|
+
/**
|
|
355
|
+
* The description of the element this issue was found for.
|
|
356
|
+
*/
|
|
357
|
+
element: string;
|
|
358
|
+
}
|
|
359
|
+
|
|
337
360
|
/**
|
|
338
361
|
* Pressable button names; used by the {@linkcode XCUITest.mobilePressButton mobile: pressButton} command.
|
|
339
362
|
*/
|
package/lib/driver.ts
CHANGED
|
@@ -41,7 +41,7 @@ import * as clipboardCommands from './commands/clipboard';
|
|
|
41
41
|
import * as conditionCommands from './commands/condition';
|
|
42
42
|
import * as contentSizeCommands from './commands/content-size';
|
|
43
43
|
import * as contextCommands from './commands/context';
|
|
44
|
-
import * as deviceInfoCommands from './commands/
|
|
44
|
+
import * as deviceInfoCommands from './commands/device-info';
|
|
45
45
|
import * as elementCommands from './commands/element';
|
|
46
46
|
import * as executeCommands from './commands/execute';
|
|
47
47
|
import * as fileMovementCommands from './commands/file-movement';
|
package/lib/index.ts
ADDED
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-xcuitest-driver",
|
|
3
|
-
"version": "10.14.
|
|
3
|
+
"version": "10.14.7",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-xcuitest-driver",
|
|
9
|
-
"version": "10.14.
|
|
9
|
+
"version": "10.14.7",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@appium/strongbox": "^1.0.0-rc.1",
|
|
@@ -692,9 +692,9 @@
|
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
694
|
"node_modules/appium-ios-remotexpc": {
|
|
695
|
-
"version": "0.
|
|
696
|
-
"resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.
|
|
697
|
-
"integrity": "sha512-
|
|
695
|
+
"version": "0.25.0",
|
|
696
|
+
"resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.25.0.tgz",
|
|
697
|
+
"integrity": "sha512-inc/mZc3Dz7mtBj/CWC+m3NlWB2a14aZ4Ug6onM/7vI80N3YRsOyaSfYk1HCLwacstvDJhjEoA6bqi5LMtVwYA==",
|
|
698
698
|
"license": "Apache-2.0",
|
|
699
699
|
"optional": true,
|
|
700
700
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"xcuitest",
|
|
9
9
|
"xctest"
|
|
10
10
|
],
|
|
11
|
-
"version": "10.14.
|
|
11
|
+
"version": "10.14.7",
|
|
12
12
|
"author": "Appium Contributors",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"repository": {
|
|
@@ -61,24 +61,21 @@
|
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"main": "./build/index.js",
|
|
64
|
+
"main": "./build/lib/index.js",
|
|
65
65
|
"bin": {},
|
|
66
66
|
"directories": {
|
|
67
67
|
"lib": "lib"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
|
-
"index.js",
|
|
71
70
|
"lib",
|
|
72
71
|
"scripts",
|
|
73
|
-
"build
|
|
74
|
-
"build/index.d.ts",
|
|
75
|
-
"build/lib",
|
|
72
|
+
"build",
|
|
76
73
|
"!.DS_Store",
|
|
77
74
|
"CHANGELOG.md",
|
|
78
75
|
"LICENSE",
|
|
79
76
|
"npm-shrinkwrap.json"
|
|
80
77
|
],
|
|
81
|
-
"types": "./build/index.d.ts",
|
|
78
|
+
"types": "./build/lib/index.d.ts",
|
|
82
79
|
"dependencies": {
|
|
83
80
|
"@appium/strongbox": "^1.0.0-rc.1",
|
|
84
81
|
"@colors/colors": "^1.6.0",
|
package/build/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the miscellaneous information about the device under test.
|
|
3
|
-
*
|
|
4
|
-
* Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
|
|
5
|
-
*
|
|
6
|
-
* @returns {Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>} The response of `/wda/device/info'`
|
|
7
|
-
* @this {import('../driver').XCUITestDriver}
|
|
8
|
-
*/
|
|
9
|
-
export function mobileGetDeviceInfo(this: import("../driver").XCUITestDriver): Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>;
|
|
10
|
-
export type DeviceInfo = import("./types").DeviceInfo;
|
|
11
|
-
export type LockdownInfo = import("./types").LockdownInfo;
|
|
12
|
-
//# sourceMappingURL=deviceInfo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../../lib/commands/deviceInfo.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,+EAHa,OAAO,CAAC,UAAU,GAAG,CAAC,UAAU,GAAG,YAAY,CAAC,CAAC,CAc7D;yBAGY,OAAO,SAAS,EAAE,UAAU;2BAC5B,OAAO,SAAS,EAAE,YAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deviceInfo.js","sourceRoot":"","sources":["../../../lib/commands/deviceInfo.js"],"names":[],"mappings":";;AAUA,kDAWC;AArBD,yDAA4C;AAE5C;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB;IACvC,MAAM,SAAS,GAAG,2CAA2C,CAAC,CAC5D,MAAM,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,KAAK,CAAC,CACnD,CAAC;IAEF,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACxB,MAAM,YAAY,GAAG,MAAM,6BAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrE,OAAO,EAAC,GAAG,SAAS,EAAE,GAAG,EAAC,YAAY,EAAC,EAAC,CAAC;IAC3C,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG"}
|
package/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns information about the active application.
|
|
3
|
-
*
|
|
4
|
-
* @returns {Promise<import('./types').ActiveAppInfo>} Active app information
|
|
5
|
-
* @throws {Error} if an error raised by command
|
|
6
|
-
* @this {import('../driver').XCUITestDriver}
|
|
7
|
-
*/
|
|
8
|
-
export async function mobileGetActiveAppInfo() {
|
|
9
|
-
return /** @type {import('./types').ActiveAppInfo} */ (
|
|
10
|
-
await this.proxyCommand('/wda/activeAppInfo', 'GET')
|
|
11
|
-
);
|
|
12
|
-
}
|
package/lib/commands/audit.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} AccessibilityAuditItem
|
|
3
|
-
* @property {string} detailedDescription The detailed description of the found accessibility issue.
|
|
4
|
-
* @property {string} compactDescription The compact description of the found accessibility issue.
|
|
5
|
-
* @property {string|number} auditType The name of the audit type this issue belongs to. Could be
|
|
6
|
-
* a number if the type name is unknown.
|
|
7
|
-
* @property {string} element The description of the element this issue was found for.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Performs accessibility audit of the current application according to the given type or multiple types.
|
|
12
|
-
*
|
|
13
|
-
* @since Xcode 15/iOS 17
|
|
14
|
-
* @param {string[]?} auditTypes - One or more type names to perform the audit for.
|
|
15
|
-
* The full list of available names could be found at
|
|
16
|
-
* https://developer.apple.com/documentation/xctest/xcuiaccessibilityaudittype?language=objc
|
|
17
|
-
* If no type if provided explicitly then XCUIAccessibilityAuditTypeAll is assumed.
|
|
18
|
-
*
|
|
19
|
-
* @returns {Promise<AccessibilityAuditItem[]>} List of found issues or an empty list
|
|
20
|
-
*
|
|
21
|
-
* @this {XCUITestDriver}
|
|
22
|
-
*/
|
|
23
|
-
export async function mobilePerformAccessibilityAudit(auditTypes) {
|
|
24
|
-
return /** @type {AccessibilityAuditItem[]} */ (
|
|
25
|
-
await this.proxyCommand('/wda/performAccessibilityAudit', 'POST', {auditTypes})
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
31
|
-
*/
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {utilities} from 'appium-ios-device';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Returns the miscellaneous information about the device under test.
|
|
5
|
-
*
|
|
6
|
-
* Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
|
|
7
|
-
*
|
|
8
|
-
* @returns {Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>} The response of `/wda/device/info'`
|
|
9
|
-
* @this {import('../driver').XCUITestDriver}
|
|
10
|
-
*/
|
|
11
|
-
export async function mobileGetDeviceInfo() {
|
|
12
|
-
const infoByWda = /** @type {import('./types').DeviceInfo} */ (
|
|
13
|
-
await this.proxyCommand('/wda/device/info', 'GET')
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
if (this.isRealDevice()) {
|
|
17
|
-
const lockdownInfo = await utilities.getDeviceInfo(this.device.udid);
|
|
18
|
-
return {...infoByWda, ...{lockdownInfo}};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return infoByWda;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @typedef {import('./types').DeviceInfo} DeviceInfo
|
|
26
|
-
* @typedef {import('./types').LockdownInfo} LockdownInfo
|
|
27
|
-
*/
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {assertSimulator as _assertSimulator} from '../utils';
|
|
2
|
-
|
|
3
|
-
const assertSimulator = (driver) => _assertSimulator.call(driver, 'Keychain modification');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Clears keychains on a simulated device.
|
|
7
|
-
*
|
|
8
|
-
* @throws {Error} If current device is not a Simulator or there was an error
|
|
9
|
-
* while clearing keychains.
|
|
10
|
-
* @this {import('../driver').XCUITestDriver}
|
|
11
|
-
* @group Simulator Only
|
|
12
|
-
*/
|
|
13
|
-
export async function mobileClearKeychains() {
|
|
14
|
-
assertSimulator(this);
|
|
15
|
-
|
|
16
|
-
await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).clearKeychains();
|
|
17
|
-
}
|