appium-espresso-driver 10.0.1 → 10.0.2

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 (151) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/lib/commands/server/builder.js +1 -1
  3. package/build/lib/commands/server/builder.js.map +1 -1
  4. package/build/lib/driver.d.ts.map +1 -1
  5. package/build/lib/driver.js.map +1 -1
  6. package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
  7. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
  8. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
  9. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
  11. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  12. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  13. package/lib/commands/server/builder.ts +1 -1
  14. package/lib/driver.ts +2 -2
  15. package/node_modules/@appium/base-driver/build/lib/index.d.ts +1 -1
  16. package/node_modules/@appium/base-driver/build/lib/index.d.ts.map +1 -1
  17. package/node_modules/@appium/base-driver/build/lib/index.js +1 -1
  18. package/node_modules/@appium/base-driver/build/lib/index.js.map +1 -1
  19. package/node_modules/@appium/base-driver/build/lib/protocol/errors.d.ts.map +1 -1
  20. package/node_modules/@appium/base-driver/build/lib/protocol/errors.js.map +1 -1
  21. package/node_modules/@appium/base-driver/build/lib/protocol/helpers.d.ts +27 -0
  22. package/node_modules/@appium/base-driver/build/lib/protocol/helpers.d.ts.map +1 -1
  23. package/node_modules/@appium/base-driver/build/lib/protocol/helpers.js +50 -0
  24. package/node_modules/@appium/base-driver/build/lib/protocol/helpers.js.map +1 -1
  25. package/node_modules/@appium/base-driver/build/lib/protocol/index.d.ts +1 -0
  26. package/node_modules/@appium/base-driver/build/lib/protocol/index.d.ts.map +1 -1
  27. package/node_modules/@appium/base-driver/build/lib/protocol/index.js +1 -0
  28. package/node_modules/@appium/base-driver/build/lib/protocol/index.js.map +1 -1
  29. package/node_modules/@appium/base-driver/build/lib/protocol/route-handler.js +19 -24
  30. package/node_modules/@appium/base-driver/build/lib/protocol/route-handler.js.map +1 -1
  31. package/node_modules/@appium/base-driver/build/lib/protocol/session.d.ts +0 -7
  32. package/node_modules/@appium/base-driver/build/lib/protocol/session.d.ts.map +1 -1
  33. package/node_modules/@appium/base-driver/build/lib/protocol/session.js +0 -17
  34. package/node_modules/@appium/base-driver/build/lib/protocol/session.js.map +1 -1
  35. package/node_modules/@appium/base-driver/lib/index.ts +2 -0
  36. package/node_modules/@appium/base-driver/lib/protocol/errors.ts +4 -4
  37. package/node_modules/@appium/base-driver/lib/protocol/helpers.ts +60 -0
  38. package/node_modules/@appium/base-driver/lib/protocol/index.ts +1 -0
  39. package/node_modules/@appium/base-driver/lib/protocol/route-handler.ts +18 -28
  40. package/node_modules/@appium/base-driver/lib/protocol/session.ts +0 -20
  41. package/node_modules/@appium/base-driver/package.json +5 -5
  42. package/node_modules/@appium/schema/build/lib/appium-config-schema.d.ts +21 -0
  43. package/node_modules/@appium/schema/build/lib/appium-config-schema.d.ts.map +1 -1
  44. package/node_modules/@appium/schema/build/lib/appium-config-schema.js +21 -0
  45. package/node_modules/@appium/schema/build/lib/appium-config-schema.js.map +1 -1
  46. package/node_modules/@appium/schema/lib/appium-config-schema.ts +24 -0
  47. package/node_modules/@appium/schema/lib/appium-config.schema.json +21 -0
  48. package/node_modules/@appium/schema/package.json +2 -2
  49. package/node_modules/@appium/support/build/lib/index.d.ts +1 -1
  50. package/node_modules/@appium/support/build/lib/index.d.ts.map +1 -1
  51. package/node_modules/@appium/support/build/lib/internal/zip-extractor.d.ts.map +1 -1
  52. package/node_modules/@appium/support/build/lib/internal/zip-extractor.js +8 -1
  53. package/node_modules/@appium/support/build/lib/internal/zip-extractor.js.map +1 -1
  54. package/node_modules/@appium/support/build/lib/net.d.ts +56 -0
  55. package/node_modules/@appium/support/build/lib/net.d.ts.map +1 -1
  56. package/node_modules/@appium/support/build/lib/net.js +96 -1
  57. package/node_modules/@appium/support/build/lib/net.js.map +1 -1
  58. package/node_modules/@appium/support/lib/index.ts +9 -1
  59. package/node_modules/@appium/support/lib/internal/zip-extractor.ts +7 -1
  60. package/node_modules/@appium/support/lib/net.ts +126 -1
  61. package/node_modules/@appium/support/package.json +5 -5
  62. package/node_modules/@appium/types/build/lib/appium-config.d.ts +15 -0
  63. package/node_modules/@appium/types/build/lib/appium-config.d.ts.map +1 -1
  64. package/node_modules/@appium/types/build/lib/bidi.d.ts +44 -0
  65. package/node_modules/@appium/types/build/lib/bidi.d.ts.map +1 -0
  66. package/node_modules/@appium/types/build/lib/bidi.js +2 -0
  67. package/node_modules/@appium/types/build/lib/bidi.js.map +1 -0
  68. package/node_modules/@appium/types/build/lib/driver.d.ts +6 -0
  69. package/node_modules/@appium/types/build/lib/driver.d.ts.map +1 -1
  70. package/node_modules/@appium/types/build/lib/index.d.ts +1 -0
  71. package/node_modules/@appium/types/build/lib/index.d.ts.map +1 -1
  72. package/node_modules/@appium/types/build/lib/index.js +1 -0
  73. package/node_modules/@appium/types/build/lib/index.js.map +1 -1
  74. package/node_modules/@appium/types/lib/appium-config.ts +15 -0
  75. package/node_modules/@appium/types/lib/bidi.ts +45 -0
  76. package/node_modules/@appium/types/lib/driver.ts +6 -0
  77. package/node_modules/@appium/types/lib/index.ts +1 -0
  78. package/node_modules/@appium/types/package.json +4 -4
  79. package/node_modules/appium-android-driver/CHANGELOG.md +24 -0
  80. package/node_modules/appium-android-driver/package.json +4 -4
  81. package/node_modules/appium-chromedriver/CHANGELOG.md +7 -0
  82. package/node_modules/appium-chromedriver/config/mapping.json +1 -0
  83. package/node_modules/appium-chromedriver/package.json +2 -2
  84. package/node_modules/bare-buffer/CMakeLists.txt +3 -3
  85. package/node_modules/bare-buffer/README.md +4 -0
  86. package/node_modules/bare-buffer/package.json +2 -2
  87. package/node_modules/bare-buffer/prebuilds/android-arm/bare-buffer.bare +0 -0
  88. package/node_modules/bare-buffer/prebuilds/android-arm64/bare-buffer.bare +0 -0
  89. package/node_modules/bare-buffer/prebuilds/android-ia32/bare-buffer.bare +0 -0
  90. package/node_modules/bare-buffer/prebuilds/android-x64/bare-buffer.bare +0 -0
  91. package/node_modules/bare-buffer/prebuilds/darwin-arm64/bare-buffer.bare +0 -0
  92. package/node_modules/bare-buffer/prebuilds/darwin-x64/bare-buffer.bare +0 -0
  93. package/node_modules/bare-buffer/prebuilds/ios-arm64/bare-buffer.bare +0 -0
  94. package/node_modules/bare-buffer/prebuilds/ios-arm64-simulator/bare-buffer.bare +0 -0
  95. package/node_modules/bare-buffer/prebuilds/ios-x64-simulator/bare-buffer.bare +0 -0
  96. package/node_modules/bare-buffer/prebuilds/linux-arm64/bare-buffer.bare +0 -0
  97. package/node_modules/bare-buffer/prebuilds/linux-x64/bare-buffer.bare +0 -0
  98. package/node_modules/bare-buffer/prebuilds/win32-arm64/bare-buffer.bare +0 -0
  99. package/node_modules/bare-buffer/prebuilds/win32-x64/bare-buffer.bare +0 -0
  100. package/node_modules/bare-path/README.md +8 -0
  101. package/node_modules/bare-path/binding.c +33 -12
  102. package/node_modules/bare-path/index.d.ts +64 -0
  103. package/node_modules/bare-path/package.json +1 -1
  104. package/node_modules/bare-path/prebuilds/android-arm/bare-path.bare +0 -0
  105. package/node_modules/bare-path/prebuilds/android-arm64/bare-path.bare +0 -0
  106. package/node_modules/bare-path/prebuilds/android-ia32/bare-path.bare +0 -0
  107. package/node_modules/bare-path/prebuilds/android-x64/bare-path.bare +0 -0
  108. package/node_modules/bare-path/prebuilds/darwin-arm64/bare-path.bare +0 -0
  109. package/node_modules/bare-path/prebuilds/darwin-x64/bare-path.bare +0 -0
  110. package/node_modules/bare-path/prebuilds/ios-arm64/bare-path.bare +0 -0
  111. package/node_modules/bare-path/prebuilds/ios-arm64-simulator/bare-path.bare +0 -0
  112. package/node_modules/bare-path/prebuilds/ios-x64-simulator/bare-path.bare +0 -0
  113. package/node_modules/bare-path/prebuilds/linux-arm64/bare-path.bare +0 -0
  114. package/node_modules/bare-path/prebuilds/linux-x64/bare-path.bare +0 -0
  115. package/node_modules/bare-path/prebuilds/win32-arm64/bare-path.bare +0 -0
  116. package/node_modules/bare-path/prebuilds/win32-x64/bare-path.bare +0 -0
  117. package/node_modules/bare-url/CMakeLists.txt +5 -5
  118. package/node_modules/bare-url/package.json +2 -2
  119. package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
  120. package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
  121. package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
  122. package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
  123. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  124. package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
  125. package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
  126. package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
  127. package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
  128. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  129. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  130. package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
  131. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  132. package/node_modules/io.appium.settings/CHANGELOG.md +14 -0
  133. package/node_modules/io.appium.settings/README.md +23 -0
  134. package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
  135. package/node_modules/io.appium.settings/build/lib/client.d.ts +3 -0
  136. package/node_modules/io.appium.settings/build/lib/client.d.ts.map +1 -1
  137. package/node_modules/io.appium.settings/build/lib/client.js +5 -0
  138. package/node_modules/io.appium.settings/build/lib/client.js.map +1 -1
  139. package/node_modules/io.appium.settings/build/lib/commands/accessibility.d.ts +25 -0
  140. package/node_modules/io.appium.settings/build/lib/commands/accessibility.d.ts.map +1 -0
  141. package/node_modules/io.appium.settings/build/lib/commands/accessibility.js +71 -0
  142. package/node_modules/io.appium.settings/build/lib/commands/accessibility.js.map +1 -0
  143. package/node_modules/io.appium.settings/build/lib/constants.d.ts +1 -0
  144. package/node_modules/io.appium.settings/build/lib/constants.d.ts.map +1 -1
  145. package/node_modules/io.appium.settings/build/lib/constants.js +1 -0
  146. package/node_modules/io.appium.settings/build/lib/constants.js.map +1 -1
  147. package/node_modules/io.appium.settings/lib/client.ts +7 -0
  148. package/node_modules/io.appium.settings/lib/commands/accessibility.ts +82 -0
  149. package/node_modules/io.appium.settings/lib/constants.ts +2 -0
  150. package/node_modules/io.appium.settings/package.json +3 -3
  151. package/package.json +4 -4
@@ -1,26 +1,90 @@
1
+ /** Path manipulation utilities, mirroring Node.js's `path` module. */
1
2
  declare namespace path {
3
+ /** The platform-specific path segment separator: `\` on Windows, `/` elsewhere. */
2
4
  export const sep: '/' | '\\'
5
+ /** The platform-specific path delimiter: `;` on Windows, `:` elsewhere. */
3
6
  export const delimiter: ':' | ';'
4
7
 
8
+ /**
9
+ * Returns the last portion of `path`, similar to the Unix `basename` command.
10
+ * @param path - The path to extract the last portion from.
11
+ * @param suffix - An optional suffix to remove from the end of the result, if it matches exactly.
12
+ * @returns An empty string if `suffix` equals `path` exactly.
13
+ * @throws {TypeError} thrown if `path`, or a defined `suffix`, is not a string.
14
+ */
5
15
  export function basename(path: string, suffix?: string): string
6
16
 
17
+ /**
18
+ * Returns the directory name of `path`, similar to the Unix `dirname` command.
19
+ * @param path - The path to extract the directory name from.
20
+ * @throws {TypeError} thrown if `path` is not a string.
21
+ */
7
22
  export function dirname(path: string): string
8
23
 
24
+ /**
25
+ * Returns the extension of `path`, from the last `.` to the end of the string.
26
+ * @param path - The path to extract the extension from.
27
+ * @returns An empty string if `path` has no `.` in its last segment, or if that segment's only
28
+ * `.` is its first character (for example a dotfile).
29
+ * @throws {TypeError} thrown if `path` is not a string.
30
+ */
9
31
  export function extname(path: string): string
10
32
 
33
+ /**
34
+ * Returns `true` if `path` is an absolute path.
35
+ * @param path - The path to test.
36
+ * @returns On Windows, a drive-qualified path such as `C:\foo` is also absolute; on POSIX, only
37
+ * paths starting with `/` are absolute.
38
+ * @throws {TypeError} thrown if `path` is not a string.
39
+ */
11
40
  export function isAbsolute(path: string): boolean
12
41
 
42
+ /**
43
+ * Joins all given path segments using the platform-specific separator, then normalizes the
44
+ * result.
45
+ * @param paths - The path segments to join together, in the order given.
46
+ * @throws {TypeError} thrown if any path segment is not a string.
47
+ */
13
48
  export function join(...paths: string[]): string
14
49
 
50
+ /**
51
+ * Normalizes `path`, resolving `.` and `..` segments.
52
+ * @param path - The path to normalize.
53
+ * @throws {TypeError} thrown if `path` is not a string.
54
+ */
15
55
  export function normalize(path: string): string
16
56
 
57
+ /**
58
+ * Returns the relative path from `from` to `to`.
59
+ * @param from - The path to resolve the relative path from.
60
+ * @param to - The path to resolve the relative path to.
61
+ * @returns Both `from` and `to` are resolved to absolute paths before comparing, and an empty
62
+ * string is returned if they resolve to the same path.
63
+ * @throws {TypeError} thrown if `from` or `to` is not a string.
64
+ */
17
65
  export function relative(from: string, to: string): string
18
66
 
67
+ /**
68
+ * Resolves a sequence of paths or path segments into an absolute path.
69
+ * @param args - The path segments to resolve, processed from right to left until an absolute path
70
+ * is constructed.
71
+ * @returns Falls back to the current working directory (or that of the resolved drive, on
72
+ * Windows) if none of the given segments is absolute.
73
+ * @throws {TypeError} thrown if any path segment is not a string.
74
+ */
19
75
  export function resolve(...args: string[]): string
20
76
 
77
+ /**
78
+ * Converts `path` to a namespace-prefixed path on Windows; returns `path` unchanged on POSIX.
79
+ * @param path - The path to convert.
80
+ * @returns On Windows, resolves `path` and prefixes UNC paths with `\\?\UNC\` and drive-letter
81
+ * paths with `\\?\`; other paths (including non-string input) are returned unchanged.
82
+ */
21
83
  export function toNamespacedPath(path: string): string
22
84
 
85
+ /** The POSIX-specific implementation of the `path` methods. */
23
86
  export const posix = path
87
+ /** The Windows-specific implementation of the `path` methods. */
24
88
  export const win32 = path
25
89
  }
26
90
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-path",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "Path manipulation library for JavaScript",
5
5
  "exports": {
6
6
  ".": {
@@ -5,11 +5,11 @@ find_package(cmake-fetch REQUIRED PATHS node_modules/cmake-fetch)
5
5
 
6
6
  project(bare_url C)
7
7
 
8
- fetch_package("github:holepunchto/libutf#a1ceca8")
9
- fetch_package("github:holepunchto/libpunycode#e91ee34")
10
- fetch_package("github:holepunchto/libnormalize#0e81f65")
11
- fetch_package("github:holepunchto/libidna#1471406")
12
- fetch_package("github:holepunchto/liburl#2efedc5")
8
+ fetch_package("github:holepunchto/libutf#a7f9f6b")
9
+ fetch_package("github:holepunchto/libpunycode#35fc8e7")
10
+ fetch_package("github:holepunchto/libnormalize#bf5337f")
11
+ fetch_package("github:holepunchto/libidna#071a545")
12
+ fetch_package("github:holepunchto/liburl#fe905f7")
13
13
 
14
14
  add_bare_module(bare_url)
15
15
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-url",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "WHATWG URL implementation for JavaScript",
5
5
  "exports": {
6
6
  "./package": "./package.json",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "brittle": "^3.3.2",
49
- "cmake-bare": "^1.8.1",
49
+ "cmake-bare": "^1.13.0",
50
50
  "cmake-fetch": "^1.0.0",
51
51
  "lunte": "^1.6.0",
52
52
  "prettier": "^3.3.3",
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [9.1.0](https://github.com/appium/appium-android/compare/io.appium.settings@9.0.1...io.appium.settings@9.1.0) (2026-11-12)
7
+
8
+ ### Features
9
+
10
+ * **settings:** add no-op accessibility events service ([#103](https://github.com/appium/appium-android/issues/103)) ([b6d36cb](https://github.com/appium/appium-android/commit/b6d36cb6db2eea35410a981f8382a3d107b7349d))
11
+
12
+
13
+ ## [9.0.1](https://github.com/appium/appium-android/compare/io.appium.settings@9.0.0...io.appium.settings@9.0.1) (2026-11-11)
14
+
15
+ ### Miscellaneous Chores
16
+
17
+ * **settings:** drop appium-adb 16 from peer dependencies ([#105](https://github.com/appium/appium-android/issues/105)) ([c9d9cf3](https://github.com/appium/appium-android/commit/c9d9cf3899b1014e3e5452efd4c3dcf967ec81d1))
18
+
19
+
6
20
  ## [9.0.0](https://github.com/appium/appium-android/compare/io.appium.settings@8.5.5...io.appium.settings@9.0.0) (2026-11-11)
7
21
 
8
22
  ### ⚠ BREAKING CHANGES
@@ -330,6 +330,29 @@ and https://developer.android.com/reference/android/app/Notification.html
330
330
  for more information on available notification properties and their values.
331
331
 
332
332
 
333
+ ## Accessibility Events Service
334
+
335
+ Chrome emits no `AccessibilityEvent`s for web content if UiAutomation is the only accessibility
336
+ client, because it only dispatches the event types requested by enabled accessibility services.
337
+ Automation servers relying on these events to invalidate accessibility caches (for example the
338
+ `deferAccessibilityCacheReset` setting of UiAutomator2 server) then keep returning a stale tree.
339
+
340
+ Appium Settings ships a no-op accessibility service, `io.appium.settings/.AccessibilityEventsService`,
341
+ that only requests window content/state change events and does nothing with them. Enabling it
342
+ makes Chrome emit these events. UiAutomation must not suppress accessibility services while
343
+ it is connected (e.g. the `DISABLE_SUPPRESS_ACCESSIBILITY_SERVICES` instrumentation argument
344
+ of UiAutomator2 server).
345
+
346
+ ```js
347
+ await settingsApp.setAccessibilityEventsServiceState(true);
348
+ // ... run the automation
349
+ await settingsApp.setAccessibilityEventsServiceState(false);
350
+ ```
351
+
352
+ Other enabled accessibility services are preserved. The global accessibility toggle is switched on if needed and
353
+ is switched off again only if the same `SettingsApp` instance has switched it on. Changing the state requires the
354
+ `WRITE_SECURE_SETTINGS` permission (granted to the `adb shell` user).
355
+
333
356
  ## SMS
334
357
 
335
358
  **Trust requirement:** Once this helper has `READ_SMS`, other apps on the device can
@@ -1,5 +1,6 @@
1
1
  import type { Logger } from '@appium/logger';
2
2
  import type { ADB } from 'appium-adb';
3
+ import { setAccessibilityEventsServiceState, isAccessibilityEventsServiceEnabled } from './commands/accessibility.js';
3
4
  import { setAnimationState } from './commands/animation.js';
4
5
  import { setBluetoothState, unpairAllBluetoothDevices } from './commands/bluetooth.js';
5
6
  import { getClipboard } from './commands/clipboard.js';
@@ -39,6 +40,8 @@ export declare class SettingsApp {
39
40
  scanMedia: typeof scanMedia;
40
41
  setDataState: typeof setDataState;
41
42
  setWifiState: typeof setWifiState;
43
+ setAccessibilityEventsServiceState: typeof setAccessibilityEventsServiceState;
44
+ isAccessibilityEventsServiceEnabled: typeof isAccessibilityEventsServiceEnabled;
42
45
  getNotifications: typeof getNotifications;
43
46
  adjustNotificationsPermissions: typeof adjustNotificationsPermissions;
44
47
  getSmsList: typeof getSmsList;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAC,iBAAiB,EAAE,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAE,cAAc,EAAE,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B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,CAAC,IAAI,GAAE,yBAA8B,GAAG,OAAO,CAAC,WAAW,CAAC;IA6ChF;;;;;OAKG;IACG,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAO/C;;;;;;;;OAQG;IACG,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,UAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAkB/F;;;;;;;;OAQG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,GAAG;CAoBxD"}
@@ -1,4 +1,5 @@
1
1
  import { waitForCondition } from 'asyncbox';
2
+ import { setAccessibilityEventsServiceState, isAccessibilityEventsServiceEnabled } from './commands/accessibility.js';
2
3
  import { setAnimationState } from './commands/animation.js';
3
4
  import { setBluetoothState, unpairAllBluetoothDevices } from './commands/bluetooth.js';
4
5
  import { getClipboard } from './commands/clipboard.js';
@@ -17,6 +18,8 @@ import { log, LOG_PREFIX } from './logger.js';
17
18
  export class SettingsApp {
18
19
  adb;
19
20
  log;
21
+ /** @internal Whether the global accessibility toggle has been switched on by `setAccessibilityEventsServiceState` */
22
+ _accessibilityToggleWasOff = false;
20
23
  setAnimationState = setAnimationState;
21
24
  setBluetoothState = setBluetoothState;
22
25
  unpairAllBluetoothDevices = unpairAllBluetoothDevices;
@@ -29,6 +32,8 @@ export class SettingsApp {
29
32
  scanMedia = scanMedia;
30
33
  setDataState = setDataState;
31
34
  setWifiState = setWifiState;
35
+ setAccessibilityEventsServiceState = setAccessibilityEventsServiceState;
36
+ isAccessibilityEventsServiceEnabled = isAccessibilityEventsServiceEnabled;
32
37
  getNotifications = getNotifications;
33
38
  adjustNotificationsPermissions = adjustNotificationsPermissions;
34
39
  getSmsList = getSmsList;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CA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AmC,GAAG,uCAAuC,CACxG,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ import type { SettingsApp } from '../client.js';
2
+ /**
3
+ * Enables or disables the no-op accessibility service shipped with Appium Settings.
4
+ *
5
+ * Chrome emits no `AccessibilityEvent`s for web content if UiAutomation is the only
6
+ * accessibility client, because it only dispatches event types requested by enabled
7
+ * accessibility services. Having this service enabled fixes that. It is only effective
8
+ * if the UiAutomation connection does not suppress accessibility services
9
+ * (see the `DISABLE_SUPPRESS_ACCESSIBILITY_SERVICES` instrumentation argument of
10
+ * appium-uiautomator2-server).
11
+ *
12
+ * Other enabled accessibility services are left untouched. The global accessibility toggle
13
+ * (`accessibility_enabled`) is switched on if needed. It is only switched off again on disabling
14
+ * if this `SettingsApp` instance has switched it on before; otherwise it is left as is.
15
+ *
16
+ * @param enabled - True to enable and false to disable the service
17
+ * @returns True if the state has actually been changed
18
+ */
19
+ export declare function setAccessibilityEventsServiceState(this: SettingsApp, enabled: boolean): Promise<boolean>;
20
+ /**
21
+ * @returns True if the accessibility service of Appium Settings is enabled and
22
+ * accessibility is switched on globally
23
+ */
24
+ export declare function isAccessibilityEventsServiceEnabled(this: SettingsApp): Promise<boolean>;
25
+ //# sourceMappingURL=accessibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../lib/commands/accessibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAO9C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,kCAAkC,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAuC9G;AAED;;;GAGG;AACH,wBAAsB,mCAAmC,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAG7F"}
@@ -0,0 +1,71 @@
1
+ import { ACCESSIBILITY_EVENTS_SERVICE } from '../constants.js';
2
+ import { LOG_PREFIX } from '../logger.js';
3
+ const ENABLED_SERVICES_SETTING = 'enabled_accessibility_services';
4
+ const ACCESSIBILITY_ENABLED_SETTING = 'accessibility_enabled';
5
+ /**
6
+ * Enables or disables the no-op accessibility service shipped with Appium Settings.
7
+ *
8
+ * Chrome emits no `AccessibilityEvent`s for web content if UiAutomation is the only
9
+ * accessibility client, because it only dispatches event types requested by enabled
10
+ * accessibility services. Having this service enabled fixes that. It is only effective
11
+ * if the UiAutomation connection does not suppress accessibility services
12
+ * (see the `DISABLE_SUPPRESS_ACCESSIBILITY_SERVICES` instrumentation argument of
13
+ * appium-uiautomator2-server).
14
+ *
15
+ * Other enabled accessibility services are left untouched. The global accessibility toggle
16
+ * (`accessibility_enabled`) is switched on if needed. It is only switched off again on disabling
17
+ * if this `SettingsApp` instance has switched it on before; otherwise it is left as is.
18
+ *
19
+ * @param enabled - True to enable and false to disable the service
20
+ * @returns True if the state has actually been changed
21
+ */
22
+ export async function setAccessibilityEventsServiceState(enabled) {
23
+ const [services, isToggleOn] = await Promise.all([getEnabledServices(this), isAccessibilityToggleOn(this)]);
24
+ const isListed = services.includes(ACCESSIBILITY_EVENTS_SERVICE);
25
+ if (enabled) {
26
+ if (isListed && isToggleOn) {
27
+ return false;
28
+ }
29
+ if (!isListed) {
30
+ await this.adb.setSetting('secure', ENABLED_SERVICES_SETTING, [...services, ACCESSIBILITY_EVENTS_SERVICE].join(':'));
31
+ }
32
+ if (!isToggleOn) {
33
+ this._accessibilityToggleWasOff = true;
34
+ await this.adb.setSetting('secure', ACCESSIBILITY_ENABLED_SETTING, 1);
35
+ }
36
+ }
37
+ else {
38
+ if (!isListed) {
39
+ return false;
40
+ }
41
+ const newServices = services.filter((s) => s !== ACCESSIBILITY_EVENTS_SERVICE);
42
+ if (newServices.length > 0) {
43
+ await this.adb.setSetting('secure', ENABLED_SERVICES_SETTING, newServices.join(':'));
44
+ }
45
+ else {
46
+ await this.adb.shell(['settings', 'delete', 'secure', ENABLED_SERVICES_SETTING]);
47
+ }
48
+ if (this._accessibilityToggleWasOff) {
49
+ await this.adb.setSetting('secure', ACCESSIBILITY_ENABLED_SETTING, 0);
50
+ }
51
+ this._accessibilityToggleWasOff = false;
52
+ }
53
+ this.log.debug(LOG_PREFIX, `${enabled ? 'Enabled' : 'Disabled'} accessibility service '${ACCESSIBILITY_EVENTS_SERVICE}'`);
54
+ return true;
55
+ }
56
+ /**
57
+ * @returns True if the accessibility service of Appium Settings is enabled and
58
+ * accessibility is switched on globally
59
+ */
60
+ export async function isAccessibilityEventsServiceEnabled() {
61
+ const [services, isToggleOn] = await Promise.all([getEnabledServices(this), isAccessibilityToggleOn(this)]);
62
+ return isToggleOn && services.includes(ACCESSIBILITY_EVENTS_SERVICE);
63
+ }
64
+ async function getEnabledServices(settingsApp) {
65
+ const output = (await settingsApp.adb.getSetting('secure', ENABLED_SERVICES_SETTING)).trim();
66
+ return !output || output === 'null' ? [] : output.split(':').filter(Boolean);
67
+ }
68
+ async function isAccessibilityToggleOn(settingsApp) {
69
+ return (await settingsApp.adb.getSetting('secure', ACCESSIBILITY_ENABLED_SETTING)).trim() === '1';
70
+ }
71
+ //# sourceMappingURL=accessibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility.js","sourceRoot":"","sources":["../../../lib/commands/accessibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,4BAA4B,EAAC,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAExC,MAAM,wBAAwB,GAAG,gCAAgC,CAAC;AAClE,MAAM,6BAA6B,GAAG,uBAAuB,CAAC;AAE9D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,kCAAkC,CAAoB,OAAgB;IAC1F,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,kBAAkB,CAAC,IAAI,C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ST_RETRIEVAL_ACTION = "io.appium.settings.sms.read";
25
25
  export declare const MEDIA_SCAN_RECEIVER = "io.appium.settings/.receivers.MediaScannerReceiver";
26
26
  export declare const MEDIA_SCAN_ACTION = "io.appium.settings.scan_media";
27
+ export declare const ACCESSIBILITY_EVENTS_SERVICE = "io.appium.settings/.AccessibilityEventsService";
27
28
  export declare const SETTING_NOTIFICATIONS_LISTENER_SERVICE = "io.appium.settings/.NLService";
28
29
  export declare const NOTIFICATIONS_RETRIEVAL_ACTION = "io.appium.settings.notifications";
29
30
  export declare const RECORDING_SERVICE_NAME = "io.appium.settings/.recorder.RecorderService";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../lib/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,6BAA6B,cAAc,CAAC;AAIzD,eAAO,MAAM,kBAAkB,oDAAuC,CAAC;AACvE,eAAO,MAAM,0BAA0B,qCAAwC,CAAC;AAEhF,eAAO,MAAM,UAAU,kCAAqC,CAAC;AAC7D,eAAO,MAAM,WAAW,mCAAsC,CAAC;AAC/D,eAAO,MAAM,SAAS,iCAAoC,CAAC;AAE3D,eAAO,MAAM,gCAAgC,gEAAmD,CAAC;AACjG,eAAO,MAAM,8BAA8B,4BAA+B,CAAC;AAC3E,eAAO,MAAM,0BAA0B,qEAAwD,CAAC;AAChG,eAAO,MAAM,wBAAwB,iCAAoC,CAAC;AAC1E,eAAO,MAAM,yBAAyB,iEAAoD,CAAC;AAC3F,eAAO,MAAM,uBAAuB,wCAA2C,CAAC;AAEhF,eAAO,MAAM,0BAA0B,2DAA8C,CAAC;AACtF,eAAO,MAAM,wBAAwB,iCAAoC,CAAC;AAE1E,eAAO,MAAM,uBAAuB,wDAA2C,CAAC;AAChF,eAAO,MAAM,qBAAqB,8BAAiC,CAAC;AAEpE,eAAO,MAAM,6BAA6B,gDAAmC,CAAC;AAC9E,eAAO,MAAM,2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AAE1F,eAAO,MAAM,yBAAyB,qDAAwD,CAAC;AAC/F,eAAO,MAAM,yBAAyB,oDAAuD,CAAC;AAC9F,eAAO,MAAM,wBAAwB,mDAAsD,CAAC"}
@@ -25,6 +25,7 @@ export const SMS_LIST_RECEIVER = `${RECEIVERS_PKG}.SmsReader`;
25
25
  export const SMS_LIST_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.sms.read`;
26
26
  export const MEDIA_SCAN_RECEIVER = `${RECEIVERS_PKG}.MediaScannerReceiver`;
27
27
  export const MEDIA_SCAN_ACTION = `${SETTINGS_HELPER_ID}.scan_media`;
28
+ export const ACCESSIBILITY_EVENTS_SERVICE = `${SETTINGS_HELPER_ID}/.AccessibilityEventsService`;
28
29
  export const SETTING_NOTIFICATIONS_LISTENER_SERVICE = `${SETTINGS_HELPER_ID}/.NLService`;
29
30
  export const NOTIFICATIONS_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.notifications`;
30
31
  export const RECORDING_SERVICE_NAME = `${SETTINGS_HELPER_ID}/.recorder.RecorderService`;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../lib/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACvD,MAAM,CAAC,MAAM,6BAA6B,GAAG,WAAW,CAAC;AAEzD,MAAM,aAAa,GAAG,GAAG,kBAAkB,aAAa,CAAC;AAEzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,aAAa,oBAAoB,CAAC;AACvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,kBAAkB,gBAAgB,CAAC;AAEhF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,kBAAkB,aAAa,CAAC;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,kBAAkB,cAAc,CAAC;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,kBAAkB,YAAY,CAAC;AAE3D,MAAM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{waitForCondition} from 'asyncbox';
4
4
 
5
+ import {setAccessibilityEventsServiceState, isAccessibilityEventsServiceEnabled} from './commands/accessibility.js';
5
6
  import {setAnimationState} from './commands/animation.js';
6
7
  import {setBluetoothState, unpairAllBluetoothDevices} from './commands/bluetooth.js';
7
8
  import {getClipboard} from './commands/clipboard.js';
@@ -35,6 +36,9 @@ export class SettingsApp {
35
36
  readonly adb: ADB;
36
37
  readonly log: Logger;
37
38
 
39
+ /** @internal Whether the global accessibility toggle has been switched on by `setAccessibilityEventsServiceState` */
40
+ _accessibilityToggleWasOff = false;
41
+
38
42
  setAnimationState = setAnimationState;
39
43
 
40
44
  setBluetoothState = setBluetoothState;
@@ -54,6 +58,9 @@ export class SettingsApp {
54
58
  setDataState = setDataState;
55
59
  setWifiState = setWifiState;
56
60
 
61
+ setAccessibilityEventsServiceState = setAccessibilityEventsServiceState;
62
+ isAccessibilityEventsServiceEnabled = isAccessibilityEventsServiceEnabled;
63
+
57
64
  getNotifications = getNotifications;
58
65
  adjustNotificationsPermissions = adjustNotificationsPermissions;
59
66
  getSmsList = getSmsList;
@@ -0,0 +1,82 @@
1
+ import type {SettingsApp} from '../client.js';
2
+ import {ACCESSIBILITY_EVENTS_SERVICE} from '../constants.js';
3
+ import {LOG_PREFIX} from '../logger.js';
4
+
5
+ const ENABLED_SERVICES_SETTING = 'enabled_accessibility_services';
6
+ const ACCESSIBILITY_ENABLED_SETTING = 'accessibility_enabled';
7
+
8
+ /**
9
+ * Enables or disables the no-op accessibility service shipped with Appium Settings.
10
+ *
11
+ * Chrome emits no `AccessibilityEvent`s for web content if UiAutomation is the only
12
+ * accessibility client, because it only dispatches event types requested by enabled
13
+ * accessibility services. Having this service enabled fixes that. It is only effective
14
+ * if the UiAutomation connection does not suppress accessibility services
15
+ * (see the `DISABLE_SUPPRESS_ACCESSIBILITY_SERVICES` instrumentation argument of
16
+ * appium-uiautomator2-server).
17
+ *
18
+ * Other enabled accessibility services are left untouched. The global accessibility toggle
19
+ * (`accessibility_enabled`) is switched on if needed. It is only switched off again on disabling
20
+ * if this `SettingsApp` instance has switched it on before; otherwise it is left as is.
21
+ *
22
+ * @param enabled - True to enable and false to disable the service
23
+ * @returns True if the state has actually been changed
24
+ */
25
+ export async function setAccessibilityEventsServiceState(this: SettingsApp, enabled: boolean): Promise<boolean> {
26
+ const [services, isToggleOn] = await Promise.all([getEnabledServices(this), isAccessibilityToggleOn(this)]);
27
+ const isListed = services.includes(ACCESSIBILITY_EVENTS_SERVICE);
28
+
29
+ if (enabled) {
30
+ if (isListed && isToggleOn) {
31
+ return false;
32
+ }
33
+ if (!isListed) {
34
+ await this.adb.setSetting(
35
+ 'secure',
36
+ ENABLED_SERVICES_SETTING,
37
+ [...services, ACCESSIBILITY_EVENTS_SERVICE].join(':'),
38
+ );
39
+ }
40
+ if (!isToggleOn) {
41
+ this._accessibilityToggleWasOff = true;
42
+ await this.adb.setSetting('secure', ACCESSIBILITY_ENABLED_SETTING, 1);
43
+ }
44
+ } else {
45
+ if (!isListed) {
46
+ return false;
47
+ }
48
+ const newServices = services.filter((s) => s !== ACCESSIBILITY_EVENTS_SERVICE);
49
+ if (newServices.length > 0) {
50
+ await this.adb.setSetting('secure', ENABLED_SERVICES_SETTING, newServices.join(':'));
51
+ } else {
52
+ await this.adb.shell(['settings', 'delete', 'secure', ENABLED_SERVICES_SETTING]);
53
+ }
54
+ if (this._accessibilityToggleWasOff) {
55
+ await this.adb.setSetting('secure', ACCESSIBILITY_ENABLED_SETTING, 0);
56
+ }
57
+ this._accessibilityToggleWasOff = false;
58
+ }
59
+ this.log.debug(
60
+ LOG_PREFIX,
61
+ `${enabled ? 'Enabled' : 'Disabled'} accessibility service '${ACCESSIBILITY_EVENTS_SERVICE}'`,
62
+ );
63
+ return true;
64
+ }
65
+
66
+ /**
67
+ * @returns True if the accessibility service of Appium Settings is enabled and
68
+ * accessibility is switched on globally
69
+ */
70
+ export async function isAccessibilityEventsServiceEnabled(this: SettingsApp): Promise<boolean> {
71
+ const [services, isToggleOn] = await Promise.all([getEnabledServices(this), isAccessibilityToggleOn(this)]);
72
+ return isToggleOn && services.includes(ACCESSIBILITY_EVENTS_SERVICE);
73
+ }
74
+
75
+ async function getEnabledServices(settingsApp: SettingsApp): Promise<string[]> {
76
+ const output = (await settingsApp.adb.getSetting('secure', ENABLED_SERVICES_SETTING)).trim();
77
+ return !output || output === 'null' ? [] : output.split(':').filter(Boolean);
78
+ }
79
+
80
+ async function isAccessibilityToggleOn(settingsApp: SettingsApp): Promise<boolean> {
81
+ return (await settingsApp.adb.getSetting('secure', ACCESSIBILITY_ENABLED_SETTING)).trim() === '1';
82
+ }
@@ -36,6 +36,8 @@ export const SMS_LIST_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.sms.read`;
36
36
  export const MEDIA_SCAN_RECEIVER = `${RECEIVERS_PKG}.MediaScannerReceiver`;
37
37
  export const MEDIA_SCAN_ACTION = `${SETTINGS_HELPER_ID}.scan_media`;
38
38
 
39
+ export const ACCESSIBILITY_EVENTS_SERVICE = `${SETTINGS_HELPER_ID}/.AccessibilityEventsService`;
40
+
39
41
  export const SETTING_NOTIFICATIONS_LISTENER_SERVICE = `${SETTINGS_HELPER_ID}/.NLService`;
40
42
  export const NOTIFICATIONS_RETRIEVAL_ACTION = `${SETTINGS_HELPER_ID}.notifications`;
41
43