askui 0.20.2 → 0.20.3

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 (228) hide show
  1. package/dist/cjs/core/model/custom-element-json.d.ts +1 -1
  2. package/dist/cjs/execution/dsl.d.ts +528 -162
  3. package/dist/cjs/execution/dsl.js +533 -162
  4. package/dist/esm/core/model/custom-element-json.d.ts +1 -1
  5. package/dist/esm/execution/dsl.d.ts +528 -162
  6. package/dist/esm/execution/dsl.js +533 -162
  7. package/package.json +1 -1
  8. package/dist/cjs/core/annotation/annotation-writer.js.map +0 -1
  9. package/dist/cjs/core/annotation/annotation.js.map +0 -1
  10. package/dist/cjs/core/inference-response/inference-response.js.map +0 -1
  11. package/dist/cjs/core/inference-response/invalid-model-type-error.js.map +0 -1
  12. package/dist/cjs/core/inference-response/model-type.js.map +0 -1
  13. package/dist/cjs/core/model/annotation-result/annotation-interface.js.map +0 -1
  14. package/dist/cjs/core/model/annotation-result/boundary-box.js.map +0 -1
  15. package/dist/cjs/core/model/annotation-result/detected-element.js.map +0 -1
  16. package/dist/cjs/core/model/custom-element-json.js.map +0 -1
  17. package/dist/cjs/core/model/custom-element.js.map +0 -1
  18. package/dist/cjs/core/reporting/default-step.js.map +0 -1
  19. package/dist/cjs/core/reporting/index.js.map +0 -1
  20. package/dist/cjs/core/reporting/instruction.js.map +0 -1
  21. package/dist/cjs/core/reporting/reporter-config.js.map +0 -1
  22. package/dist/cjs/core/reporting/reporter.js.map +0 -1
  23. package/dist/cjs/core/reporting/snapshot-detail-level.js.map +0 -1
  24. package/dist/cjs/core/reporting/snapshot.js.map +0 -1
  25. package/dist/cjs/core/reporting/step-reporter.js.map +0 -1
  26. package/dist/cjs/core/reporting/step-run.js.map +0 -1
  27. package/dist/cjs/core/reporting/step-status-end.js.map +0 -1
  28. package/dist/cjs/core/reporting/step-status.js.map +0 -1
  29. package/dist/cjs/core/reporting/step.js.map +0 -1
  30. package/dist/cjs/core/runner-protocol/index.js.map +0 -1
  31. package/dist/cjs/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
  32. package/dist/cjs/core/runner-protocol/request/control-request.js.map +0 -1
  33. package/dist/cjs/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
  34. package/dist/cjs/core/runner-protocol/request/index.js.map +0 -1
  35. package/dist/cjs/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
  36. package/dist/cjs/core/runner-protocol/request/read-recording-request.js.map +0 -1
  37. package/dist/cjs/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
  38. package/dist/cjs/core/runner-protocol/request/start-recording-request.js.map +0 -1
  39. package/dist/cjs/core/runner-protocol/request/stop-recording-request.js.map +0 -1
  40. package/dist/cjs/core/runner-protocol/response/index.js.map +0 -1
  41. package/dist/cjs/core/ui-control-commands/action.js.map +0 -1
  42. package/dist/cjs/core/ui-control-commands/control-command-code.js.map +0 -1
  43. package/dist/cjs/core/ui-control-commands/control-command.js.map +0 -1
  44. package/dist/cjs/core/ui-control-commands/index.js.map +0 -1
  45. package/dist/cjs/core/ui-control-commands/input-event.js.map +0 -1
  46. package/dist/cjs/execution/config-error.js.map +0 -1
  47. package/dist/cjs/execution/control-command-error.js.map +0 -1
  48. package/dist/cjs/execution/credentials-args.js.map +0 -1
  49. package/dist/cjs/execution/dsl.js.map +0 -1
  50. package/dist/cjs/execution/execution-runtime.js.map +0 -1
  51. package/dist/cjs/execution/index.js.map +0 -1
  52. package/dist/cjs/execution/inference-client.js.map +0 -1
  53. package/dist/cjs/execution/inference-response-error.js.map +0 -1
  54. package/dist/cjs/execution/is-image-required-interface.js.map +0 -1
  55. package/dist/cjs/execution/misc.js.map +0 -1
  56. package/dist/cjs/execution/model-composition-branch.js.map +0 -1
  57. package/dist/cjs/execution/read-environment-credentials.js.map +0 -1
  58. package/dist/cjs/execution/read-recording-response-stream-handler.js.map +0 -1
  59. package/dist/cjs/execution/repeat-error.js.map +0 -1
  60. package/dist/cjs/execution/ui-control-client-dependency-builder.js.map +0 -1
  61. package/dist/cjs/execution/ui-control-client.js.map +0 -1
  62. package/dist/cjs/execution/ui-controller-client-connection-state.js.map +0 -1
  63. package/dist/cjs/execution/ui-controller-client-error.js.map +0 -1
  64. package/dist/cjs/execution/ui-controller-client-interface.js.map +0 -1
  65. package/dist/cjs/execution/ui-controller-client.js.map +0 -1
  66. package/dist/cjs/lib/download-binaries.js.map +0 -1
  67. package/dist/cjs/lib/index.js.map +0 -1
  68. package/dist/cjs/lib/interactive_cli/add-script-package-json.d.ts +0 -1
  69. package/dist/cjs/lib/interactive_cli/add-script-package-json.js +0 -39
  70. package/dist/cjs/lib/interactive_cli/add-script-package-json.js.map +0 -1
  71. package/dist/cjs/lib/interactive_cli/cli-options-interface.js.map +0 -1
  72. package/dist/cjs/lib/interactive_cli/cli.js.map +0 -1
  73. package/dist/cjs/lib/interactive_cli/create-example-project.js.map +0 -1
  74. package/dist/cjs/lib/interactive_cli/index.js.map +0 -1
  75. package/dist/cjs/lib/libfuse-error.js.map +0 -1
  76. package/dist/cjs/lib/logger.js.map +0 -1
  77. package/dist/cjs/lib/timeout-error.js.map +0 -1
  78. package/dist/cjs/lib/ui-controller-args.js.map +0 -1
  79. package/dist/cjs/lib/ui-controller-darwin.js.map +0 -1
  80. package/dist/cjs/lib/ui-controller-facade.js.map +0 -1
  81. package/dist/cjs/lib/ui-controller-linux.js.map +0 -1
  82. package/dist/cjs/lib/ui-controller-win32.js.map +0 -1
  83. package/dist/cjs/lib/ui-controller.js.map +0 -1
  84. package/dist/cjs/lib/unkown-error.js.map +0 -1
  85. package/dist/cjs/lib/wayland-error.js.map +0 -1
  86. package/dist/cjs/main.js.map +0 -1
  87. package/dist/cjs/shared/index.js.map +0 -1
  88. package/dist/cjs/shared/log-levels.js.map +0 -1
  89. package/dist/cjs/shared/proxy-agent-args.js.map +0 -1
  90. package/dist/cjs/utils/analytics/analytics-interface.js.map +0 -1
  91. package/dist/cjs/utils/analytics/analytics.js.map +0 -1
  92. package/dist/cjs/utils/analytics/index.js.map +0 -1
  93. package/dist/cjs/utils/analytics/installation-timestamp-create-error.js.map +0 -1
  94. package/dist/cjs/utils/analytics/installation-timestamp-get-error.js.map +0 -1
  95. package/dist/cjs/utils/analytics/installation-timestamp.js.map +0 -1
  96. package/dist/cjs/utils/analytics/user-identifier-interface.js.map +0 -1
  97. package/dist/cjs/utils/analytics/user-identifier.js.map +0 -1
  98. package/dist/cjs/utils/base_64_image/base-64-image-error.js.map +0 -1
  99. package/dist/cjs/utils/base_64_image/base-64-image-string-error.js.map +0 -1
  100. package/dist/cjs/utils/base_64_image/base-64-image.js.map +0 -1
  101. package/dist/cjs/utils/base_64_image/sharp.js.map +0 -1
  102. package/dist/cjs/utils/http/credentials.js.map +0 -1
  103. package/dist/cjs/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
  104. package/dist/cjs/utils/http/custom-errors/client-http-client-error.js.map +0 -1
  105. package/dist/cjs/utils/http/custom-errors/general-http-client-error.js.map +0 -1
  106. package/dist/cjs/utils/http/custom-errors/http-client-error.js.map +0 -1
  107. package/dist/cjs/utils/http/custom-errors/index.js.map +0 -1
  108. package/dist/cjs/utils/http/custom-errors/server-http-client-error.js.map +0 -1
  109. package/dist/cjs/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
  110. package/dist/cjs/utils/http/http-client-got.js.map +0 -1
  111. package/dist/cjs/utils/http/index.js.map +0 -1
  112. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
  113. package/dist/cjs/utils/image-resize-errors/index.js.map +0 -1
  114. package/dist/cjs/utils/path.js.map +0 -1
  115. package/dist/cjs/utils/proxy/proxy-builder.js.map +0 -1
  116. package/dist/cjs/utils/resized-image-interface.js.map +0 -1
  117. package/dist/cjs/utils/transformations.js.map +0 -1
  118. package/dist/esm/core/annotation/annotation-writer.js.map +0 -1
  119. package/dist/esm/core/annotation/annotation.js.map +0 -1
  120. package/dist/esm/core/inference-response/inference-response.js.map +0 -1
  121. package/dist/esm/core/inference-response/invalid-model-type-error.js.map +0 -1
  122. package/dist/esm/core/inference-response/model-type.js.map +0 -1
  123. package/dist/esm/core/model/annotation-result/annotation-interface.js.map +0 -1
  124. package/dist/esm/core/model/annotation-result/boundary-box.js.map +0 -1
  125. package/dist/esm/core/model/annotation-result/detected-element.js.map +0 -1
  126. package/dist/esm/core/model/custom-element-json.js.map +0 -1
  127. package/dist/esm/core/model/custom-element.js.map +0 -1
  128. package/dist/esm/core/reporting/default-step.js.map +0 -1
  129. package/dist/esm/core/reporting/index.js.map +0 -1
  130. package/dist/esm/core/reporting/instruction.js.map +0 -1
  131. package/dist/esm/core/reporting/reporter-config.js.map +0 -1
  132. package/dist/esm/core/reporting/reporter.js.map +0 -1
  133. package/dist/esm/core/reporting/snapshot-detail-level.js.map +0 -1
  134. package/dist/esm/core/reporting/snapshot.js.map +0 -1
  135. package/dist/esm/core/reporting/step-reporter.js.map +0 -1
  136. package/dist/esm/core/reporting/step-run.js.map +0 -1
  137. package/dist/esm/core/reporting/step-status-end.js.map +0 -1
  138. package/dist/esm/core/reporting/step-status.js.map +0 -1
  139. package/dist/esm/core/reporting/step.js.map +0 -1
  140. package/dist/esm/core/runner-protocol/index.js.map +0 -1
  141. package/dist/esm/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
  142. package/dist/esm/core/runner-protocol/request/control-request.js.map +0 -1
  143. package/dist/esm/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
  144. package/dist/esm/core/runner-protocol/request/index.js.map +0 -1
  145. package/dist/esm/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
  146. package/dist/esm/core/runner-protocol/request/read-recording-request.js.map +0 -1
  147. package/dist/esm/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
  148. package/dist/esm/core/runner-protocol/request/start-recording-request.js.map +0 -1
  149. package/dist/esm/core/runner-protocol/request/stop-recording-request.js.map +0 -1
  150. package/dist/esm/core/runner-protocol/response/index.js.map +0 -1
  151. package/dist/esm/core/ui-control-commands/action.js.map +0 -1
  152. package/dist/esm/core/ui-control-commands/control-command-code.js.map +0 -1
  153. package/dist/esm/core/ui-control-commands/control-command.js.map +0 -1
  154. package/dist/esm/core/ui-control-commands/index.js.map +0 -1
  155. package/dist/esm/core/ui-control-commands/input-event.js.map +0 -1
  156. package/dist/esm/execution/config-error.js.map +0 -1
  157. package/dist/esm/execution/control-command-error.js.map +0 -1
  158. package/dist/esm/execution/credentials-args.js.map +0 -1
  159. package/dist/esm/execution/dsl.js.map +0 -1
  160. package/dist/esm/execution/execution-runtime.js.map +0 -1
  161. package/dist/esm/execution/index.js.map +0 -1
  162. package/dist/esm/execution/inference-client.js.map +0 -1
  163. package/dist/esm/execution/inference-response-error.js.map +0 -1
  164. package/dist/esm/execution/is-image-required-interface.js.map +0 -1
  165. package/dist/esm/execution/misc.js.map +0 -1
  166. package/dist/esm/execution/model-composition-branch.js.map +0 -1
  167. package/dist/esm/execution/read-environment-credentials.js.map +0 -1
  168. package/dist/esm/execution/read-recording-response-stream-handler.js.map +0 -1
  169. package/dist/esm/execution/repeat-error.js.map +0 -1
  170. package/dist/esm/execution/ui-control-client-dependency-builder.js.map +0 -1
  171. package/dist/esm/execution/ui-control-client.js.map +0 -1
  172. package/dist/esm/execution/ui-controller-client-connection-state.js.map +0 -1
  173. package/dist/esm/execution/ui-controller-client-error.js.map +0 -1
  174. package/dist/esm/execution/ui-controller-client-interface.js.map +0 -1
  175. package/dist/esm/execution/ui-controller-client.js.map +0 -1
  176. package/dist/esm/lib/download-binaries.js.map +0 -1
  177. package/dist/esm/lib/index.js.map +0 -1
  178. package/dist/esm/lib/interactive_cli/add-script-package-json.d.ts +0 -1
  179. package/dist/esm/lib/interactive_cli/add-script-package-json.js +0 -32
  180. package/dist/esm/lib/interactive_cli/add-script-package-json.js.map +0 -1
  181. package/dist/esm/lib/interactive_cli/cli-options-interface.js.map +0 -1
  182. package/dist/esm/lib/interactive_cli/cli.js.map +0 -1
  183. package/dist/esm/lib/interactive_cli/create-example-project.js.map +0 -1
  184. package/dist/esm/lib/interactive_cli/index.js.map +0 -1
  185. package/dist/esm/lib/libfuse-error.js.map +0 -1
  186. package/dist/esm/lib/logger.js.map +0 -1
  187. package/dist/esm/lib/timeout-error.js.map +0 -1
  188. package/dist/esm/lib/ui-controller-args.js.map +0 -1
  189. package/dist/esm/lib/ui-controller-darwin.js.map +0 -1
  190. package/dist/esm/lib/ui-controller-facade.js.map +0 -1
  191. package/dist/esm/lib/ui-controller-linux.js.map +0 -1
  192. package/dist/esm/lib/ui-controller-win32.js.map +0 -1
  193. package/dist/esm/lib/ui-controller.js.map +0 -1
  194. package/dist/esm/lib/unkown-error.js.map +0 -1
  195. package/dist/esm/lib/wayland-error.js.map +0 -1
  196. package/dist/esm/main.js.map +0 -1
  197. package/dist/esm/shared/index.js.map +0 -1
  198. package/dist/esm/shared/log-levels.js.map +0 -1
  199. package/dist/esm/shared/proxy-agent-args.js.map +0 -1
  200. package/dist/esm/utils/analytics/analytics-interface.js.map +0 -1
  201. package/dist/esm/utils/analytics/analytics.js.map +0 -1
  202. package/dist/esm/utils/analytics/index.js.map +0 -1
  203. package/dist/esm/utils/analytics/installation-timestamp-create-error.js.map +0 -1
  204. package/dist/esm/utils/analytics/installation-timestamp-get-error.js.map +0 -1
  205. package/dist/esm/utils/analytics/installation-timestamp.js.map +0 -1
  206. package/dist/esm/utils/analytics/user-identifier-interface.js.map +0 -1
  207. package/dist/esm/utils/analytics/user-identifier.js.map +0 -1
  208. package/dist/esm/utils/base_64_image/base-64-image-error.js.map +0 -1
  209. package/dist/esm/utils/base_64_image/base-64-image-string-error.js.map +0 -1
  210. package/dist/esm/utils/base_64_image/base-64-image.js.map +0 -1
  211. package/dist/esm/utils/base_64_image/sharp.js.map +0 -1
  212. package/dist/esm/utils/http/credentials.js.map +0 -1
  213. package/dist/esm/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
  214. package/dist/esm/utils/http/custom-errors/client-http-client-error.js.map +0 -1
  215. package/dist/esm/utils/http/custom-errors/general-http-client-error.js.map +0 -1
  216. package/dist/esm/utils/http/custom-errors/http-client-error.js.map +0 -1
  217. package/dist/esm/utils/http/custom-errors/index.js.map +0 -1
  218. package/dist/esm/utils/http/custom-errors/server-http-client-error.js.map +0 -1
  219. package/dist/esm/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
  220. package/dist/esm/utils/http/http-client-got.js.map +0 -1
  221. package/dist/esm/utils/http/index.js.map +0 -1
  222. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
  223. package/dist/esm/utils/image-resize-errors/index.js.map +0 -1
  224. package/dist/esm/utils/path.js.map +0 -1
  225. package/dist/esm/utils/proxy/proxy-builder.js.map +0 -1
  226. package/dist/esm/utils/resized-image-interface.js.map +0 -1
  227. package/dist/esm/utils/transformations.js.map +0 -1
  228. package/dist/example_projects_templates/configs/jasmine.config.json +0 -12
@@ -1,3 +1,8 @@
1
+ /* eslint-disable @typescript-eslint/no-use-before-define */
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ /* eslint-disable max-classes-per-file */
4
+ /* eslint-disable max-len */
5
+ // Autogenerated from typescript.template file
1
6
  export var Separators;
2
7
  (function (Separators) {
3
8
  Separators["STRING"] = "<|string|>";
@@ -285,7 +290,7 @@ export class FluentFilters extends FluentBase {
285
290
  * .customElement({
286
291
  * customImage: './logo.png', // required
287
292
  * name: 'myLogo', // optional
288
- * threshold: 0.9, // optional, defaults to 0.9
293
+ * threshold: 0.5, // optional, defaults to 0.5
289
294
  * stopThreshold: 0.9, // optional, defaults to 0.9
290
295
  * rotationDegreePerStep: 0, // optional, defaults to 0
291
296
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
@@ -301,7 +306,7 @@ export class FluentFilters extends FluentBase {
301
306
  * - **name** (*`string`, optional*):
302
307
  * - A unique name that can be used for filtering for the custom element. If not given, any text inside the custom image will be detected via OCR.
303
308
  * - **threshold** (*`number`, optional*):
304
- * - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.9`.
309
+ * - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.5`.
305
310
  * - **stopThreshold** (*`number`, optional*):
306
311
  * - A threshold for when to stop searching for UI elements similar to the custom element. As soon as UI elements have been found that are at least as similar as the `stopThreshold`, the search is going to stop. After that elements are filtered using the `threshold`. Because of that the `stopThreshold` should be greater than or equal to `threshold`. It is primarily to be used as a speed improvement (by lowering the value). Takes values between `0.0` and `1.0`. Defaults to `0.9`.
307
312
  * - **rotationDegreePerStep** (*`number`, optional*):
@@ -449,7 +454,7 @@ export class FluentFilters extends FluentBase {
449
454
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
450
455
  * ```
451
456
  *
452
- * ![](https://docs.askui.com/img/gif/withtextregex.gif)
457
+ * ![](https://docs.askui.com/img/gif/withTextRegex.gif)
453
458
  *
454
459
  *
455
460
  *
@@ -481,7 +486,7 @@ export class FluentFilters extends FluentBase {
481
486
  * await aui.moveMouseTo().text().withExactText('Password').exec()
482
487
  * ```
483
488
  *
484
- * ![](https://docs.askui.com/img/gif/withexacttext.gif)
489
+ * ![](https://docs.askui.com/img/gif/withExactText.gif)
485
490
  *
486
491
  *
487
492
  *
@@ -529,7 +534,7 @@ export class FluentFilters extends FluentBase {
529
534
  * **Important: _Matching only returns the best matching element when you use it with `get()`_**
530
535
  *
531
536
  * A bit of playing around to find a matching description is sometimes needed:
532
- * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
537
+ * For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
533
538
  * Generally, the more detail the better.
534
539
  *
535
540
  * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
@@ -713,17 +718,46 @@ export class FluentFiltersOrRelations extends FluentFilters {
713
718
  *
714
719
  * **Examples:**
715
720
  * ```typescript
716
- * -------------- -------------- --------------
717
- * | leftEl | | rightEl0 | | rightEl1 |
718
- * -------------- -------------- --------------
721
+ * ---------- --------- ---------
722
+ * | button | | text0 | | text3 |
723
+ * ---------- --------- --------- ---------
724
+ * | text1 | ---------
725
+ * --------- | text2 |
726
+ * ---------
719
727
  *
720
- * // Returns rightEl0 because rightEl0 is the first element right of leftEl
721
- * ...rightEl().rightOf().leftEl()
722
- * ...rightEl().rightOf(0).leftEl()
723
- * // Returns rightEl1 because rightEl1 is the second element right of leftEl
724
- * ...rightEl().rightOf(1).leftEl()
725
- * // Returns no element because leftEl is left of rightEl
726
- * ...leftEl().rightOf().rightEl()
728
+ * // General explanation for element_center_line
729
+ * // This will find text0 and text3
730
+ * ...text().rightOf(..., 'element_center_line').button()
731
+ *
732
+ * // General explanation for element_edge_area
733
+ * // This will find text0, text1 and text3
734
+ * ...text().rightOf(..., 'element_edge_area').button()
735
+ *
736
+ * // General explanation and display_edge_area
737
+ * // This will find text0, text1, text2 and text3
738
+ * ...text().rightOf(..., 'display_edge_area').button()
739
+ *
740
+ * // More examples:
741
+ * // Returns text0 because it is the first element rightOf button
742
+ * ...text().rightOf().button()
743
+ * ...text().rightOf(0).button()
744
+ * ...text().rightOf(0, 'element_edge_area').button()
745
+ *
746
+ * // Returns text3 because it is the second text touched by the
747
+ * // horizontal line from the center of button
748
+ * // Notice: text1 is not touched!
749
+ * ...text().rightOf(1, 'element_center_line').button()
750
+ *
751
+ * // Returns text3 because it is the third text touched by the
752
+ * // vertical area rightOf the y-axis of button
753
+ * // Notice: text2 is not touched!
754
+ * ...text().rightOf(2, 'element_edge_area').button()
755
+ *
756
+ * // Returns text2 because it is the third element rightOf button
757
+ * ...text().rightOf(2, 'display_edge_area').button()
758
+ *
759
+ * // Returns no element because button is rightOf the texts
760
+ * ...button().rightOf().text()
727
761
  * ```
728
762
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
729
763
  *
@@ -756,17 +790,46 @@ export class FluentFiltersOrRelations extends FluentFilters {
756
790
  *
757
791
  * **Examples:**
758
792
  * ```typescript
759
- * -------------- -------------- --------------
760
- * | leftEl1 | | leftEl0 | | rightEl |
761
- * -------------- -------------- --------------
793
+ * --------- --------- ----------
794
+ * | text3 | | text0 | | button |
795
+ * --------- --------- --------- ----------
796
+ * --------- | text1 |
797
+ * | text2 | ---------
798
+ * ---------
799
+ *
800
+ * // General explanation for element_center_line
801
+ * // This will find text0 and text3
802
+ * ...text().leftOf(..., 'element_center_line').button()
803
+ *
804
+ * // General explanation for element_edge_area
805
+ * // This will find text0, text1 and text3
806
+ * ...text().leftOf(..., 'element_edge_area').button()
807
+ *
808
+ * // General explanation and display_edge_area
809
+ * // This will find text0, text1, text2 and text3
810
+ * ...text().leftOf(..., 'display_edge_area').button()
811
+ *
812
+ * // More examples:
813
+ * // Returns text0 because it is the first element leftOf button
814
+ * ...text().leftOf().button()
815
+ * ...text().leftOf(0).button()
816
+ * ...text().leftOf(0, 'element_edge_area').button()
817
+ *
818
+ * // Returns text3 because it is the second text touched by the
819
+ * // horizontal line from the center of button
820
+ * // Notice: text1 is not touched!
821
+ * ...text().leftOf(1, 'element_center_line').button()
822
+ *
823
+ * // Returns text3 because it is the third text touched by the
824
+ * // vertical area leftOf the y-axis of button
825
+ * // Notice: text2 is not touched!
826
+ * ...text().leftOf(2, 'element_edge_area').button()
827
+ *
828
+ * // Returns text2 because it is the third element leftOf button
829
+ * ...text().leftOf(2, 'display_edge_area').button()
762
830
  *
763
- * // Returns leftEl0 because leftEl0 is the first element left of rightEl
764
- * ...leftEl().leftOf().rightEl()
765
- * ...leftEl().leftOf(0).rightEl()
766
- * // Returns leftEl1 because leftEl1 is the second element left of rightEl
767
- * ...leftEl().leftOf(1).rightEl()
768
- * // Returns no element because rightEl is left of leftEl
769
- * ...rightEl().leftOf().leftEl()
831
+ * // Returns no element because button is rightOf the texts
832
+ * ...button().leftOf().text()
770
833
  * ```
771
834
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
772
835
  *
@@ -799,22 +862,54 @@ export class FluentFiltersOrRelations extends FluentFilters {
799
862
  *
800
863
  * **Examples:**
801
864
  * ```typescript
802
- * --------------
803
- * | text |
804
- * --------------
805
- * --------------
806
- * | button0 |
807
- * --------------
808
- * --------------
809
- * | button1 |
810
- * --------------
811
- *
865
+ * ------------
866
+ * | text |
867
+ * ------------
868
+ * ------------
869
+ * | button0 |
870
+ * ------------
871
+ * -----------
872
+ * | button1 |
873
+ * -----------
874
+ * -----------
875
+ * | button2 |
876
+ * -----------
877
+ * ------------
878
+ * | button3 |
879
+ * ------------
880
+ *
881
+ * // General explanation for element_center_line
882
+ * // This will find button0 and button3
883
+ * ...button().below(..., 'element_center_line').text()
884
+ *
885
+ * // General explanation for element_edge_area
886
+ * // This will find button0, button1 and button3
887
+ * ...button().below(..., 'element_edge_area').text()
888
+ *
889
+ * // General explanation and display_edge_area
890
+ * // This will find button0, button1, button2 and button3
891
+ * ...button().below(..., 'display_edge_area').text()
892
+ *
893
+ * // More examples:
812
894
  * // Returns button0 because button0 is the first button below text
813
895
  * ...button().below().text()
814
896
  * ...button().below(0).text()
815
- * // Returns button1 because button1 is the second button below text
816
- * ...button().below(1).text()
817
- * // Returns no element because text is above button
897
+ * ...button().below(0, 'element_edge_area').text()
898
+ *
899
+ * // Returns button3 because it is the second button touched by the
900
+ * // vertical line from the center of text
901
+ * // Notice: button1 is not touched
902
+ * ...button().below(1, 'element_center_line').text()
903
+ *
904
+ * // Returns button3 because it is the third button touched by the
905
+ * // vertical area below the x-axis of text
906
+ * // Notice: button2 is not touched!
907
+ * ...button().below(2, 'element_edge_area').text()
908
+ *
909
+ * // Returns button2 because it is the third element below text
910
+ * ...button().below(2, 'display_edge_area').text()
911
+ *
912
+ * // Returns no element because text is above the buttons
818
913
  * ...text().below().button()
819
914
  * ```
820
915
  * ![](https://docs.askui.com/img/gif/below.gif)
@@ -847,22 +942,54 @@ export class FluentFiltersOrRelations extends FluentFilters {
847
942
  *
848
943
  * **Examples:**
849
944
  * ```typescript
850
- * --------------
851
- * | text1 |
852
- * --------------
853
- * --------------
854
- * | text0 |
855
- * --------------
856
- * --------------
857
- * | button |
858
- * --------------
859
- *
860
- * // Returns text0 because text0 is the first element above button
945
+ * ------------
946
+ * | text3 |
947
+ * ------------
948
+ * ------------
949
+ * | text2 |
950
+ * ------------
951
+ * ------------
952
+ * | text1 |
953
+ * ------------
954
+ * ------------
955
+ * | text0 |
956
+ * ------------
957
+ * ------------
958
+ * | button |
959
+ * ------------
960
+ *
961
+ * // General explanation for element_center_line
962
+ * // This will find text0 and text3
963
+ * ...text().above(..., 'element_center_line').button()
964
+ *
965
+ * // General explanation for element_edge_area
966
+ * // This will find text0, text1 and text3
967
+ * ...text().above(..., 'element_edge_area').button()
968
+ *
969
+ * // General explanation and display_edge_area
970
+ * // This will find text0, text1, text2 and text3
971
+ * ...text().above(..., 'display_edge_area').button()
972
+ *
973
+ * // More examples:
974
+ * // Returns text0 because it is the first element above button
861
975
  * ...text().above().button()
862
976
  * ...text().above(0).button()
863
- * // Returns text1 because text1 is the second element above button
864
- * ...text().above(1).button()
865
- * // Returns no element because button is below text
977
+ * ...text().above(0, 'element_edge_area').button()
978
+ *
979
+ * // Returns text3 because it is the second text touched by the
980
+ * // vertical line from the center of button
981
+ * // Notice: text1 is not touched!
982
+ * ...text().above(1, 'element_center_line').button()
983
+ *
984
+ * // Returns text3 because it is the third text touched by the
985
+ * // vertical area above the x-axis of button
986
+ * // Notice: text2 is not touched!
987
+ * ...text().above(2, 'element_edge_area').button()
988
+ *
989
+ * // Returns text2 because it is the third element above button
990
+ * ...text().above(2, 'display_edge_area').button()
991
+ *
992
+ * // Returns no element because button is below the texts
866
993
  * ...button().above().text()
867
994
  * ```
868
995
  * ![](https://docs.askui.com/img/gif/above.gif)
@@ -1159,7 +1286,7 @@ export class FluentFiltersCondition extends FluentBase {
1159
1286
  * .customElement({
1160
1287
  * customImage: './logo.png', // required
1161
1288
  * name: 'myLogo', // optional
1162
- * threshold: 0.9, // optional, defaults to 0.9
1289
+ * threshold: 0.5, // optional, defaults to 0.5
1163
1290
  * stopThreshold: 0.9, // optional, defaults to 0.9
1164
1291
  * rotationDegreePerStep: 0, // optional, defaults to 0
1165
1292
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
@@ -1175,7 +1302,7 @@ export class FluentFiltersCondition extends FluentBase {
1175
1302
  * - **name** (*`string`, optional*):
1176
1303
  * - A unique name that can be used for filtering for the custom element. If not given, any text inside the custom image will be detected via OCR.
1177
1304
  * - **threshold** (*`number`, optional*):
1178
- * - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.9`.
1305
+ * - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.5`.
1179
1306
  * - **stopThreshold** (*`number`, optional*):
1180
1307
  * - A threshold for when to stop searching for UI elements similar to the custom element. As soon as UI elements have been found that are at least as similar as the `stopThreshold`, the search is going to stop. After that elements are filtered using the `threshold`. Because of that the `stopThreshold` should be greater than or equal to `threshold`. It is primarily to be used as a speed improvement (by lowering the value). Takes values between `0.0` and `1.0`. Defaults to `0.9`.
1181
1308
  * - **rotationDegreePerStep** (*`number`, optional*):
@@ -1323,7 +1450,7 @@ export class FluentFiltersCondition extends FluentBase {
1323
1450
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
1324
1451
  * ```
1325
1452
  *
1326
- * ![](https://docs.askui.com/img/gif/withtextregex.gif)
1453
+ * ![](https://docs.askui.com/img/gif/withTextRegex.gif)
1327
1454
  *
1328
1455
  *
1329
1456
  *
@@ -1355,7 +1482,7 @@ export class FluentFiltersCondition extends FluentBase {
1355
1482
  * await aui.moveMouseTo().text().withExactText('Password').exec()
1356
1483
  * ```
1357
1484
  *
1358
- * ![](https://docs.askui.com/img/gif/withexacttext.gif)
1485
+ * ![](https://docs.askui.com/img/gif/withExactText.gif)
1359
1486
  *
1360
1487
  *
1361
1488
  *
@@ -1403,7 +1530,7 @@ export class FluentFiltersCondition extends FluentBase {
1403
1530
  * **Important: _Matching only returns the best matching element when you use it with `get()`_**
1404
1531
  *
1405
1532
  * A bit of playing around to find a matching description is sometimes needed:
1406
- * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
1533
+ * For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
1407
1534
  * Generally, the more detail the better.
1408
1535
  *
1409
1536
  * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
@@ -1587,17 +1714,46 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1587
1714
  *
1588
1715
  * **Examples:**
1589
1716
  * ```typescript
1590
- * -------------- -------------- --------------
1591
- * | leftEl | | rightEl0 | | rightEl1 |
1592
- * -------------- -------------- --------------
1717
+ * ---------- --------- ---------
1718
+ * | button | | text0 | | text3 |
1719
+ * ---------- --------- --------- ---------
1720
+ * | text1 | ---------
1721
+ * --------- | text2 |
1722
+ * ---------
1723
+ *
1724
+ * // General explanation for element_center_line
1725
+ * // This will find text0 and text3
1726
+ * ...text().rightOf(..., 'element_center_line').button()
1727
+ *
1728
+ * // General explanation for element_edge_area
1729
+ * // This will find text0, text1 and text3
1730
+ * ...text().rightOf(..., 'element_edge_area').button()
1731
+ *
1732
+ * // General explanation and display_edge_area
1733
+ * // This will find text0, text1, text2 and text3
1734
+ * ...text().rightOf(..., 'display_edge_area').button()
1735
+ *
1736
+ * // More examples:
1737
+ * // Returns text0 because it is the first element rightOf button
1738
+ * ...text().rightOf().button()
1739
+ * ...text().rightOf(0).button()
1740
+ * ...text().rightOf(0, 'element_edge_area').button()
1741
+ *
1742
+ * // Returns text3 because it is the second text touched by the
1743
+ * // horizontal line from the center of button
1744
+ * // Notice: text1 is not touched!
1745
+ * ...text().rightOf(1, 'element_center_line').button()
1593
1746
  *
1594
- * // Returns rightEl0 because rightEl0 is the first element right of leftEl
1595
- * ...rightEl().rightOf().leftEl()
1596
- * ...rightEl().rightOf(0).leftEl()
1597
- * // Returns rightEl1 because rightEl1 is the second element right of leftEl
1598
- * ...rightEl().rightOf(1).leftEl()
1599
- * // Returns no element because leftEl is left of rightEl
1600
- * ...leftEl().rightOf().rightEl()
1747
+ * // Returns text3 because it is the third text touched by the
1748
+ * // vertical area rightOf the y-axis of button
1749
+ * // Notice: text2 is not touched!
1750
+ * ...text().rightOf(2, 'element_edge_area').button()
1751
+ *
1752
+ * // Returns text2 because it is the third element rightOf button
1753
+ * ...text().rightOf(2, 'display_edge_area').button()
1754
+ *
1755
+ * // Returns no element because button is rightOf the texts
1756
+ * ...button().rightOf().text()
1601
1757
  * ```
1602
1758
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
1603
1759
  *
@@ -1630,17 +1786,46 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1630
1786
  *
1631
1787
  * **Examples:**
1632
1788
  * ```typescript
1633
- * -------------- -------------- --------------
1634
- * | leftEl1 | | leftEl0 | | rightEl |
1635
- * -------------- -------------- --------------
1789
+ * --------- --------- ----------
1790
+ * | text3 | | text0 | | button |
1791
+ * --------- --------- --------- ----------
1792
+ * --------- | text1 |
1793
+ * | text2 | ---------
1794
+ * ---------
1795
+ *
1796
+ * // General explanation for element_center_line
1797
+ * // This will find text0 and text3
1798
+ * ...text().leftOf(..., 'element_center_line').button()
1799
+ *
1800
+ * // General explanation for element_edge_area
1801
+ * // This will find text0, text1 and text3
1802
+ * ...text().leftOf(..., 'element_edge_area').button()
1803
+ *
1804
+ * // General explanation and display_edge_area
1805
+ * // This will find text0, text1, text2 and text3
1806
+ * ...text().leftOf(..., 'display_edge_area').button()
1807
+ *
1808
+ * // More examples:
1809
+ * // Returns text0 because it is the first element leftOf button
1810
+ * ...text().leftOf().button()
1811
+ * ...text().leftOf(0).button()
1812
+ * ...text().leftOf(0, 'element_edge_area').button()
1813
+ *
1814
+ * // Returns text3 because it is the second text touched by the
1815
+ * // horizontal line from the center of button
1816
+ * // Notice: text1 is not touched!
1817
+ * ...text().leftOf(1, 'element_center_line').button()
1636
1818
  *
1637
- * // Returns leftEl0 because leftEl0 is the first element left of rightEl
1638
- * ...leftEl().leftOf().rightEl()
1639
- * ...leftEl().leftOf(0).rightEl()
1640
- * // Returns leftEl1 because leftEl1 is the second element left of rightEl
1641
- * ...leftEl().leftOf(1).rightEl()
1642
- * // Returns no element because rightEl is left of leftEl
1643
- * ...rightEl().leftOf().leftEl()
1819
+ * // Returns text3 because it is the third text touched by the
1820
+ * // vertical area leftOf the y-axis of button
1821
+ * // Notice: text2 is not touched!
1822
+ * ...text().leftOf(2, 'element_edge_area').button()
1823
+ *
1824
+ * // Returns text2 because it is the third element leftOf button
1825
+ * ...text().leftOf(2, 'display_edge_area').button()
1826
+ *
1827
+ * // Returns no element because button is rightOf the texts
1828
+ * ...button().leftOf().text()
1644
1829
  * ```
1645
1830
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
1646
1831
  *
@@ -1673,22 +1858,54 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1673
1858
  *
1674
1859
  * **Examples:**
1675
1860
  * ```typescript
1676
- * --------------
1677
- * | text |
1678
- * --------------
1679
- * --------------
1680
- * | button0 |
1681
- * --------------
1682
- * --------------
1683
- * | button1 |
1684
- * --------------
1685
- *
1861
+ * ------------
1862
+ * | text |
1863
+ * ------------
1864
+ * ------------
1865
+ * | button0 |
1866
+ * ------------
1867
+ * -----------
1868
+ * | button1 |
1869
+ * -----------
1870
+ * -----------
1871
+ * | button2 |
1872
+ * -----------
1873
+ * ------------
1874
+ * | button3 |
1875
+ * ------------
1876
+ *
1877
+ * // General explanation for element_center_line
1878
+ * // This will find button0 and button3
1879
+ * ...button().below(..., 'element_center_line').text()
1880
+ *
1881
+ * // General explanation for element_edge_area
1882
+ * // This will find button0, button1 and button3
1883
+ * ...button().below(..., 'element_edge_area').text()
1884
+ *
1885
+ * // General explanation and display_edge_area
1886
+ * // This will find button0, button1, button2 and button3
1887
+ * ...button().below(..., 'display_edge_area').text()
1888
+ *
1889
+ * // More examples:
1686
1890
  * // Returns button0 because button0 is the first button below text
1687
1891
  * ...button().below().text()
1688
1892
  * ...button().below(0).text()
1689
- * // Returns button1 because button1 is the second button below text
1690
- * ...button().below(1).text()
1691
- * // Returns no element because text is above button
1893
+ * ...button().below(0, 'element_edge_area').text()
1894
+ *
1895
+ * // Returns button3 because it is the second button touched by the
1896
+ * // vertical line from the center of text
1897
+ * // Notice: button1 is not touched
1898
+ * ...button().below(1, 'element_center_line').text()
1899
+ *
1900
+ * // Returns button3 because it is the third button touched by the
1901
+ * // vertical area below the x-axis of text
1902
+ * // Notice: button2 is not touched!
1903
+ * ...button().below(2, 'element_edge_area').text()
1904
+ *
1905
+ * // Returns button2 because it is the third element below text
1906
+ * ...button().below(2, 'display_edge_area').text()
1907
+ *
1908
+ * // Returns no element because text is above the buttons
1692
1909
  * ...text().below().button()
1693
1910
  * ```
1694
1911
  * ![](https://docs.askui.com/img/gif/below.gif)
@@ -1721,22 +1938,54 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1721
1938
  *
1722
1939
  * **Examples:**
1723
1940
  * ```typescript
1724
- * --------------
1725
- * | text1 |
1726
- * --------------
1727
- * --------------
1728
- * | text0 |
1729
- * --------------
1730
- * --------------
1731
- * | button |
1732
- * --------------
1733
- *
1734
- * // Returns text0 because text0 is the first element above button
1941
+ * ------------
1942
+ * | text3 |
1943
+ * ------------
1944
+ * ------------
1945
+ * | text2 |
1946
+ * ------------
1947
+ * ------------
1948
+ * | text1 |
1949
+ * ------------
1950
+ * ------------
1951
+ * | text0 |
1952
+ * ------------
1953
+ * ------------
1954
+ * | button |
1955
+ * ------------
1956
+ *
1957
+ * // General explanation for element_center_line
1958
+ * // This will find text0 and text3
1959
+ * ...text().above(..., 'element_center_line').button()
1960
+ *
1961
+ * // General explanation for element_edge_area
1962
+ * // This will find text0, text1 and text3
1963
+ * ...text().above(..., 'element_edge_area').button()
1964
+ *
1965
+ * // General explanation and display_edge_area
1966
+ * // This will find text0, text1, text2 and text3
1967
+ * ...text().above(..., 'display_edge_area').button()
1968
+ *
1969
+ * // More examples:
1970
+ * // Returns text0 because it is the first element above button
1735
1971
  * ...text().above().button()
1736
1972
  * ...text().above(0).button()
1737
- * // Returns text1 because text1 is the second element above button
1738
- * ...text().above(1).button()
1739
- * // Returns no element because button is below text
1973
+ * ...text().above(0, 'element_edge_area').button()
1974
+ *
1975
+ * // Returns text3 because it is the second text touched by the
1976
+ * // vertical line from the center of button
1977
+ * // Notice: text1 is not touched!
1978
+ * ...text().above(1, 'element_center_line').button()
1979
+ *
1980
+ * // Returns text3 because it is the third text touched by the
1981
+ * // vertical area above the x-axis of button
1982
+ * // Notice: text2 is not touched!
1983
+ * ...text().above(2, 'element_edge_area').button()
1984
+ *
1985
+ * // Returns text2 because it is the third element above button
1986
+ * ...text().above(2, 'display_edge_area').button()
1987
+ *
1988
+ * // Returns no element because button is below the texts
1740
1989
  * ...button().above().text()
1741
1990
  * ```
1742
1991
  * ![](https://docs.askui.com/img/gif/above.gif)
@@ -1881,7 +2130,7 @@ export class FluentCommand extends FluentBase {
1881
2130
  super(undefined);
1882
2131
  }
1883
2132
  /**
1884
- * Expects a condition, e.g., `exists()` or `notExits()`.
2133
+ * Expects a condition, for example, `exists()` or `notExits()`.
1885
2134
  *
1886
2135
  * Use the structure `expect().<your filter>.(exists()|notExists())` as shown in the examples below.
1887
2136
  *
@@ -1928,7 +2177,7 @@ export class FluentCommand extends FluentBase {
1928
2177
  * await aui.moveMouseTo().text().withText('Grinning_Face').exec()
1929
2178
  * ```
1930
2179
  *
1931
- * ![](https://docs.askui.com/img/gif/movemouseto.gif)
2180
+ * ![](https://docs.askui.com/img/gif/moveMouseTo.gif)
1932
2181
  *
1933
2182
  *
1934
2183
  *
@@ -1976,7 +2225,7 @@ export class FluentCommand extends FluentBase {
1976
2225
  * await aui.scrollInside(0,-500).text().withText('Bottom sheet').exec();
1977
2226
  * ```
1978
2227
  *
1979
- * ![](https://docs.askui.com/img/gif/scrollinside.gif)
2228
+ * ![](https://docs.askui.com/img/gif/scrollInside.gif)
1980
2229
  *
1981
2230
  * @param {number} x_offset - A (positive/negative) x direction.
1982
2231
  * @param {number} y_offset - A (positive/negative) y direction.
@@ -2080,7 +2329,7 @@ export class FluentCommand extends FluentBase {
2080
2329
  * await aui.moveMouseRelatively(0, 50).exec();
2081
2330
  * ```
2082
2331
  *
2083
- * ![](https://docs.askui.com/img/gif/movemouserelatively.gif)
2332
+ * ![](https://docs.askui.com/img/gif/moveMouseRelatively.gif)
2084
2333
  *
2085
2334
  * @param {number} x_offset - A (positive/negative) x direction.
2086
2335
  * @param {number} y_offset - A (positive/negative) y direction.
@@ -2261,7 +2510,7 @@ export class FluentCommand extends FluentBase {
2261
2510
  * await aui.mouseDoubleLeftClick().exec();
2262
2511
  * ```
2263
2512
  *
2264
- * ![](https://docs.askui.com/img/gif/mousedoubleleftclick.gif)
2513
+ * ![](https://docs.askui.com/img/gif/mouseDoubleLeftClick.gif)
2265
2514
  *
2266
2515
  * @return {Exec}
2267
2516
  */
@@ -2453,7 +2702,7 @@ export class FluentCommand extends FluentBase {
2453
2702
  * await aui.pressAndroidTwoKey('volume_down', 'power').exec();
2454
2703
  * ```
2455
2704
  *
2456
- * ![](https://docs.askui.com/img/gif/pressAndroidTwoKey.gif)
2705
+ * ![](https://docs.askui.com/img/gif/pressAndroidTwoKeys.gif)
2457
2706
  *
2458
2707
  * @param {ANDROID_KEY} first_key - A Android key
2459
2708
  * @param {ANDROID_KEY} second_key - A Android key
@@ -2712,7 +2961,7 @@ export class FluentFiltersGetter extends FluentBase {
2712
2961
  * .customElement({
2713
2962
  * customImage: './logo.png', // required
2714
2963
  * name: 'myLogo', // optional
2715
- * threshold: 0.9, // optional, defaults to 0.9
2964
+ * threshold: 0.5, // optional, defaults to 0.5
2716
2965
  * stopThreshold: 0.9, // optional, defaults to 0.9
2717
2966
  * rotationDegreePerStep: 0, // optional, defaults to 0
2718
2967
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
@@ -2728,7 +2977,7 @@ export class FluentFiltersGetter extends FluentBase {
2728
2977
  * - **name** (*`string`, optional*):
2729
2978
  * - A unique name that can be used for filtering for the custom element. If not given, any text inside the custom image will be detected via OCR.
2730
2979
  * - **threshold** (*`number`, optional*):
2731
- * - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.9`.
2980
+ * - A threshold for how much a UI element needs to be similar to the custom element as defined by the image. Takes values between `0.0` (== all elements are recognized as the custom element which is probably not what you want) and `1.0` (== elements need to look exactly like the `customImage` which is unlikely to be achieved as even minor differences count). Defaults to `0.5`.
2732
2981
  * - **stopThreshold** (*`number`, optional*):
2733
2982
  * - A threshold for when to stop searching for UI elements similar to the custom element. As soon as UI elements have been found that are at least as similar as the `stopThreshold`, the search is going to stop. After that elements are filtered using the `threshold`. Because of that the `stopThreshold` should be greater than or equal to `threshold`. It is primarily to be used as a speed improvement (by lowering the value). Takes values between `0.0` and `1.0`. Defaults to `0.9`.
2734
2983
  * - **rotationDegreePerStep** (*`number`, optional*):
@@ -2876,7 +3125,7 @@ export class FluentFiltersGetter extends FluentBase {
2876
3125
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
2877
3126
  * ```
2878
3127
  *
2879
- * ![](https://docs.askui.com/img/gif/withtextregex.gif)
3128
+ * ![](https://docs.askui.com/img/gif/withTextRegex.gif)
2880
3129
  *
2881
3130
  *
2882
3131
  *
@@ -2908,7 +3157,7 @@ export class FluentFiltersGetter extends FluentBase {
2908
3157
  * await aui.moveMouseTo().text().withExactText('Password').exec()
2909
3158
  * ```
2910
3159
  *
2911
- * ![](https://docs.askui.com/img/gif/withexacttext.gif)
3160
+ * ![](https://docs.askui.com/img/gif/withExactText.gif)
2912
3161
  *
2913
3162
  *
2914
3163
  *
@@ -2956,7 +3205,7 @@ export class FluentFiltersGetter extends FluentBase {
2956
3205
  * **Important: _Matching only returns the best matching element when you use it with `get()`_**
2957
3206
  *
2958
3207
  * A bit of playing around to find a matching description is sometimes needed:
2959
- * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
3208
+ * For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
2960
3209
  * Generally, the more detail the better.
2961
3210
  *
2962
3211
  * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
@@ -3140,17 +3389,46 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3140
3389
  *
3141
3390
  * **Examples:**
3142
3391
  * ```typescript
3143
- * -------------- -------------- --------------
3144
- * | leftEl | | rightEl0 | | rightEl1 |
3145
- * -------------- -------------- --------------
3392
+ * ---------- --------- ---------
3393
+ * | button | | text0 | | text3 |
3394
+ * ---------- --------- --------- ---------
3395
+ * | text1 | ---------
3396
+ * --------- | text2 |
3397
+ * ---------
3398
+ *
3399
+ * // General explanation for element_center_line
3400
+ * // This will find text0 and text3
3401
+ * ...text().rightOf(..., 'element_center_line').button()
3402
+ *
3403
+ * // General explanation for element_edge_area
3404
+ * // This will find text0, text1 and text3
3405
+ * ...text().rightOf(..., 'element_edge_area').button()
3406
+ *
3407
+ * // General explanation and display_edge_area
3408
+ * // This will find text0, text1, text2 and text3
3409
+ * ...text().rightOf(..., 'display_edge_area').button()
3146
3410
  *
3147
- * // Returns rightEl0 because rightEl0 is the first element right of leftEl
3148
- * ...rightEl().rightOf().leftEl()
3149
- * ...rightEl().rightOf(0).leftEl()
3150
- * // Returns rightEl1 because rightEl1 is the second element right of leftEl
3151
- * ...rightEl().rightOf(1).leftEl()
3152
- * // Returns no element because leftEl is left of rightEl
3153
- * ...leftEl().rightOf().rightEl()
3411
+ * // More examples:
3412
+ * // Returns text0 because it is the first element rightOf button
3413
+ * ...text().rightOf().button()
3414
+ * ...text().rightOf(0).button()
3415
+ * ...text().rightOf(0, 'element_edge_area').button()
3416
+ *
3417
+ * // Returns text3 because it is the second text touched by the
3418
+ * // horizontal line from the center of button
3419
+ * // Notice: text1 is not touched!
3420
+ * ...text().rightOf(1, 'element_center_line').button()
3421
+ *
3422
+ * // Returns text3 because it is the third text touched by the
3423
+ * // vertical area rightOf the y-axis of button
3424
+ * // Notice: text2 is not touched!
3425
+ * ...text().rightOf(2, 'element_edge_area').button()
3426
+ *
3427
+ * // Returns text2 because it is the third element rightOf button
3428
+ * ...text().rightOf(2, 'display_edge_area').button()
3429
+ *
3430
+ * // Returns no element because button is rightOf the texts
3431
+ * ...button().rightOf().text()
3154
3432
  * ```
3155
3433
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
3156
3434
  *
@@ -3183,17 +3461,46 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3183
3461
  *
3184
3462
  * **Examples:**
3185
3463
  * ```typescript
3186
- * -------------- -------------- --------------
3187
- * | leftEl1 | | leftEl0 | | rightEl |
3188
- * -------------- -------------- --------------
3464
+ * --------- --------- ----------
3465
+ * | text3 | | text0 | | button |
3466
+ * --------- --------- --------- ----------
3467
+ * --------- | text1 |
3468
+ * | text2 | ---------
3469
+ * ---------
3470
+ *
3471
+ * // General explanation for element_center_line
3472
+ * // This will find text0 and text3
3473
+ * ...text().leftOf(..., 'element_center_line').button()
3474
+ *
3475
+ * // General explanation for element_edge_area
3476
+ * // This will find text0, text1 and text3
3477
+ * ...text().leftOf(..., 'element_edge_area').button()
3189
3478
  *
3190
- * // Returns leftEl0 because leftEl0 is the first element left of rightEl
3191
- * ...leftEl().leftOf().rightEl()
3192
- * ...leftEl().leftOf(0).rightEl()
3193
- * // Returns leftEl1 because leftEl1 is the second element left of rightEl
3194
- * ...leftEl().leftOf(1).rightEl()
3195
- * // Returns no element because rightEl is left of leftEl
3196
- * ...rightEl().leftOf().leftEl()
3479
+ * // General explanation and display_edge_area
3480
+ * // This will find text0, text1, text2 and text3
3481
+ * ...text().leftOf(..., 'display_edge_area').button()
3482
+ *
3483
+ * // More examples:
3484
+ * // Returns text0 because it is the first element leftOf button
3485
+ * ...text().leftOf().button()
3486
+ * ...text().leftOf(0).button()
3487
+ * ...text().leftOf(0, 'element_edge_area').button()
3488
+ *
3489
+ * // Returns text3 because it is the second text touched by the
3490
+ * // horizontal line from the center of button
3491
+ * // Notice: text1 is not touched!
3492
+ * ...text().leftOf(1, 'element_center_line').button()
3493
+ *
3494
+ * // Returns text3 because it is the third text touched by the
3495
+ * // vertical area leftOf the y-axis of button
3496
+ * // Notice: text2 is not touched!
3497
+ * ...text().leftOf(2, 'element_edge_area').button()
3498
+ *
3499
+ * // Returns text2 because it is the third element leftOf button
3500
+ * ...text().leftOf(2, 'display_edge_area').button()
3501
+ *
3502
+ * // Returns no element because button is rightOf the texts
3503
+ * ...button().leftOf().text()
3197
3504
  * ```
3198
3505
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
3199
3506
  *
@@ -3226,22 +3533,54 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3226
3533
  *
3227
3534
  * **Examples:**
3228
3535
  * ```typescript
3229
- * --------------
3230
- * | text |
3231
- * --------------
3232
- * --------------
3233
- * | button0 |
3234
- * --------------
3235
- * --------------
3236
- * | button1 |
3237
- * --------------
3238
- *
3536
+ * ------------
3537
+ * | text |
3538
+ * ------------
3539
+ * ------------
3540
+ * | button0 |
3541
+ * ------------
3542
+ * -----------
3543
+ * | button1 |
3544
+ * -----------
3545
+ * -----------
3546
+ * | button2 |
3547
+ * -----------
3548
+ * ------------
3549
+ * | button3 |
3550
+ * ------------
3551
+ *
3552
+ * // General explanation for element_center_line
3553
+ * // This will find button0 and button3
3554
+ * ...button().below(..., 'element_center_line').text()
3555
+ *
3556
+ * // General explanation for element_edge_area
3557
+ * // This will find button0, button1 and button3
3558
+ * ...button().below(..., 'element_edge_area').text()
3559
+ *
3560
+ * // General explanation and display_edge_area
3561
+ * // This will find button0, button1, button2 and button3
3562
+ * ...button().below(..., 'display_edge_area').text()
3563
+ *
3564
+ * // More examples:
3239
3565
  * // Returns button0 because button0 is the first button below text
3240
3566
  * ...button().below().text()
3241
3567
  * ...button().below(0).text()
3242
- * // Returns button1 because button1 is the second button below text
3243
- * ...button().below(1).text()
3244
- * // Returns no element because text is above button
3568
+ * ...button().below(0, 'element_edge_area').text()
3569
+ *
3570
+ * // Returns button3 because it is the second button touched by the
3571
+ * // vertical line from the center of text
3572
+ * // Notice: button1 is not touched
3573
+ * ...button().below(1, 'element_center_line').text()
3574
+ *
3575
+ * // Returns button3 because it is the third button touched by the
3576
+ * // vertical area below the x-axis of text
3577
+ * // Notice: button2 is not touched!
3578
+ * ...button().below(2, 'element_edge_area').text()
3579
+ *
3580
+ * // Returns button2 because it is the third element below text
3581
+ * ...button().below(2, 'display_edge_area').text()
3582
+ *
3583
+ * // Returns no element because text is above the buttons
3245
3584
  * ...text().below().button()
3246
3585
  * ```
3247
3586
  * ![](https://docs.askui.com/img/gif/below.gif)
@@ -3274,22 +3613,54 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3274
3613
  *
3275
3614
  * **Examples:**
3276
3615
  * ```typescript
3277
- * --------------
3278
- * | text1 |
3279
- * --------------
3280
- * --------------
3281
- * | text0 |
3282
- * --------------
3283
- * --------------
3284
- * | button |
3285
- * --------------
3286
- *
3287
- * // Returns text0 because text0 is the first element above button
3616
+ * ------------
3617
+ * | text3 |
3618
+ * ------------
3619
+ * ------------
3620
+ * | text2 |
3621
+ * ------------
3622
+ * ------------
3623
+ * | text1 |
3624
+ * ------------
3625
+ * ------------
3626
+ * | text0 |
3627
+ * ------------
3628
+ * ------------
3629
+ * | button |
3630
+ * ------------
3631
+ *
3632
+ * // General explanation for element_center_line
3633
+ * // This will find text0 and text3
3634
+ * ...text().above(..., 'element_center_line').button()
3635
+ *
3636
+ * // General explanation for element_edge_area
3637
+ * // This will find text0, text1 and text3
3638
+ * ...text().above(..., 'element_edge_area').button()
3639
+ *
3640
+ * // General explanation and display_edge_area
3641
+ * // This will find text0, text1, text2 and text3
3642
+ * ...text().above(..., 'display_edge_area').button()
3643
+ *
3644
+ * // More examples:
3645
+ * // Returns text0 because it is the first element above button
3288
3646
  * ...text().above().button()
3289
3647
  * ...text().above(0).button()
3290
- * // Returns text1 because text1 is the second element above button
3291
- * ...text().above(1).button()
3292
- * // Returns no element because button is below text
3648
+ * ...text().above(0, 'element_edge_area').button()
3649
+ *
3650
+ * // Returns text3 because it is the second text touched by the
3651
+ * // vertical line from the center of button
3652
+ * // Notice: text1 is not touched!
3653
+ * ...text().above(1, 'element_center_line').button()
3654
+ *
3655
+ * // Returns text3 because it is the third text touched by the
3656
+ * // vertical area above the x-axis of button
3657
+ * // Notice: text2 is not touched!
3658
+ * ...text().above(2, 'element_edge_area').button()
3659
+ *
3660
+ * // Returns text2 because it is the third element above button
3661
+ * ...text().above(2, 'display_edge_area').button()
3662
+ *
3663
+ * // Returns no element because button is below the texts
3293
3664
  * ...button().above().text()
3294
3665
  * ```
3295
3666
  * ![](https://docs.askui.com/img/gif/above.gif)