askui 0.20.2 → 0.20.4

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 (234) hide show
  1. package/dist/cjs/core/model/custom-element-json.d.ts +1 -1
  2. package/dist/cjs/core/ui-control-commands/action.d.ts +5 -1
  3. package/dist/cjs/core/ui-control-commands/action.js +3 -2
  4. package/dist/cjs/core/ui-control-commands/control-command.js +1 -1
  5. package/dist/cjs/execution/dsl.d.ts +531 -164
  6. package/dist/cjs/execution/dsl.js +540 -165
  7. package/dist/esm/core/model/custom-element-json.d.ts +1 -1
  8. package/dist/esm/core/ui-control-commands/action.d.ts +5 -1
  9. package/dist/esm/core/ui-control-commands/action.js +3 -2
  10. package/dist/esm/core/ui-control-commands/control-command.js +1 -1
  11. package/dist/esm/execution/dsl.d.ts +531 -164
  12. package/dist/esm/execution/dsl.js +540 -165
  13. package/package.json +1 -1
  14. package/dist/cjs/core/annotation/annotation-writer.js.map +0 -1
  15. package/dist/cjs/core/annotation/annotation.js.map +0 -1
  16. package/dist/cjs/core/inference-response/inference-response.js.map +0 -1
  17. package/dist/cjs/core/inference-response/invalid-model-type-error.js.map +0 -1
  18. package/dist/cjs/core/inference-response/model-type.js.map +0 -1
  19. package/dist/cjs/core/model/annotation-result/annotation-interface.js.map +0 -1
  20. package/dist/cjs/core/model/annotation-result/boundary-box.js.map +0 -1
  21. package/dist/cjs/core/model/annotation-result/detected-element.js.map +0 -1
  22. package/dist/cjs/core/model/custom-element-json.js.map +0 -1
  23. package/dist/cjs/core/model/custom-element.js.map +0 -1
  24. package/dist/cjs/core/reporting/default-step.js.map +0 -1
  25. package/dist/cjs/core/reporting/index.js.map +0 -1
  26. package/dist/cjs/core/reporting/instruction.js.map +0 -1
  27. package/dist/cjs/core/reporting/reporter-config.js.map +0 -1
  28. package/dist/cjs/core/reporting/reporter.js.map +0 -1
  29. package/dist/cjs/core/reporting/snapshot-detail-level.js.map +0 -1
  30. package/dist/cjs/core/reporting/snapshot.js.map +0 -1
  31. package/dist/cjs/core/reporting/step-reporter.js.map +0 -1
  32. package/dist/cjs/core/reporting/step-run.js.map +0 -1
  33. package/dist/cjs/core/reporting/step-status-end.js.map +0 -1
  34. package/dist/cjs/core/reporting/step-status.js.map +0 -1
  35. package/dist/cjs/core/reporting/step.js.map +0 -1
  36. package/dist/cjs/core/runner-protocol/index.js.map +0 -1
  37. package/dist/cjs/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
  38. package/dist/cjs/core/runner-protocol/request/control-request.js.map +0 -1
  39. package/dist/cjs/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
  40. package/dist/cjs/core/runner-protocol/request/index.js.map +0 -1
  41. package/dist/cjs/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
  42. package/dist/cjs/core/runner-protocol/request/read-recording-request.js.map +0 -1
  43. package/dist/cjs/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
  44. package/dist/cjs/core/runner-protocol/request/start-recording-request.js.map +0 -1
  45. package/dist/cjs/core/runner-protocol/request/stop-recording-request.js.map +0 -1
  46. package/dist/cjs/core/runner-protocol/response/index.js.map +0 -1
  47. package/dist/cjs/core/ui-control-commands/action.js.map +0 -1
  48. package/dist/cjs/core/ui-control-commands/control-command-code.js.map +0 -1
  49. package/dist/cjs/core/ui-control-commands/control-command.js.map +0 -1
  50. package/dist/cjs/core/ui-control-commands/index.js.map +0 -1
  51. package/dist/cjs/core/ui-control-commands/input-event.js.map +0 -1
  52. package/dist/cjs/execution/config-error.js.map +0 -1
  53. package/dist/cjs/execution/control-command-error.js.map +0 -1
  54. package/dist/cjs/execution/credentials-args.js.map +0 -1
  55. package/dist/cjs/execution/dsl.js.map +0 -1
  56. package/dist/cjs/execution/execution-runtime.js.map +0 -1
  57. package/dist/cjs/execution/index.js.map +0 -1
  58. package/dist/cjs/execution/inference-client.js.map +0 -1
  59. package/dist/cjs/execution/inference-response-error.js.map +0 -1
  60. package/dist/cjs/execution/is-image-required-interface.js.map +0 -1
  61. package/dist/cjs/execution/misc.js.map +0 -1
  62. package/dist/cjs/execution/model-composition-branch.js.map +0 -1
  63. package/dist/cjs/execution/read-environment-credentials.js.map +0 -1
  64. package/dist/cjs/execution/read-recording-response-stream-handler.js.map +0 -1
  65. package/dist/cjs/execution/repeat-error.js.map +0 -1
  66. package/dist/cjs/execution/ui-control-client-dependency-builder.js.map +0 -1
  67. package/dist/cjs/execution/ui-control-client.js.map +0 -1
  68. package/dist/cjs/execution/ui-controller-client-connection-state.js.map +0 -1
  69. package/dist/cjs/execution/ui-controller-client-error.js.map +0 -1
  70. package/dist/cjs/execution/ui-controller-client-interface.js.map +0 -1
  71. package/dist/cjs/execution/ui-controller-client.js.map +0 -1
  72. package/dist/cjs/lib/download-binaries.js.map +0 -1
  73. package/dist/cjs/lib/index.js.map +0 -1
  74. package/dist/cjs/lib/interactive_cli/add-script-package-json.d.ts +0 -1
  75. package/dist/cjs/lib/interactive_cli/add-script-package-json.js +0 -39
  76. package/dist/cjs/lib/interactive_cli/add-script-package-json.js.map +0 -1
  77. package/dist/cjs/lib/interactive_cli/cli-options-interface.js.map +0 -1
  78. package/dist/cjs/lib/interactive_cli/cli.js.map +0 -1
  79. package/dist/cjs/lib/interactive_cli/create-example-project.js.map +0 -1
  80. package/dist/cjs/lib/interactive_cli/index.js.map +0 -1
  81. package/dist/cjs/lib/libfuse-error.js.map +0 -1
  82. package/dist/cjs/lib/logger.js.map +0 -1
  83. package/dist/cjs/lib/timeout-error.js.map +0 -1
  84. package/dist/cjs/lib/ui-controller-args.js.map +0 -1
  85. package/dist/cjs/lib/ui-controller-darwin.js.map +0 -1
  86. package/dist/cjs/lib/ui-controller-facade.js.map +0 -1
  87. package/dist/cjs/lib/ui-controller-linux.js.map +0 -1
  88. package/dist/cjs/lib/ui-controller-win32.js.map +0 -1
  89. package/dist/cjs/lib/ui-controller.js.map +0 -1
  90. package/dist/cjs/lib/unkown-error.js.map +0 -1
  91. package/dist/cjs/lib/wayland-error.js.map +0 -1
  92. package/dist/cjs/main.js.map +0 -1
  93. package/dist/cjs/shared/index.js.map +0 -1
  94. package/dist/cjs/shared/log-levels.js.map +0 -1
  95. package/dist/cjs/shared/proxy-agent-args.js.map +0 -1
  96. package/dist/cjs/utils/analytics/analytics-interface.js.map +0 -1
  97. package/dist/cjs/utils/analytics/analytics.js.map +0 -1
  98. package/dist/cjs/utils/analytics/index.js.map +0 -1
  99. package/dist/cjs/utils/analytics/installation-timestamp-create-error.js.map +0 -1
  100. package/dist/cjs/utils/analytics/installation-timestamp-get-error.js.map +0 -1
  101. package/dist/cjs/utils/analytics/installation-timestamp.js.map +0 -1
  102. package/dist/cjs/utils/analytics/user-identifier-interface.js.map +0 -1
  103. package/dist/cjs/utils/analytics/user-identifier.js.map +0 -1
  104. package/dist/cjs/utils/base_64_image/base-64-image-error.js.map +0 -1
  105. package/dist/cjs/utils/base_64_image/base-64-image-string-error.js.map +0 -1
  106. package/dist/cjs/utils/base_64_image/base-64-image.js.map +0 -1
  107. package/dist/cjs/utils/base_64_image/sharp.js.map +0 -1
  108. package/dist/cjs/utils/http/credentials.js.map +0 -1
  109. package/dist/cjs/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
  110. package/dist/cjs/utils/http/custom-errors/client-http-client-error.js.map +0 -1
  111. package/dist/cjs/utils/http/custom-errors/general-http-client-error.js.map +0 -1
  112. package/dist/cjs/utils/http/custom-errors/http-client-error.js.map +0 -1
  113. package/dist/cjs/utils/http/custom-errors/index.js.map +0 -1
  114. package/dist/cjs/utils/http/custom-errors/server-http-client-error.js.map +0 -1
  115. package/dist/cjs/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
  116. package/dist/cjs/utils/http/http-client-got.js.map +0 -1
  117. package/dist/cjs/utils/http/index.js.map +0 -1
  118. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
  119. package/dist/cjs/utils/image-resize-errors/index.js.map +0 -1
  120. package/dist/cjs/utils/path.js.map +0 -1
  121. package/dist/cjs/utils/proxy/proxy-builder.js.map +0 -1
  122. package/dist/cjs/utils/resized-image-interface.js.map +0 -1
  123. package/dist/cjs/utils/transformations.js.map +0 -1
  124. package/dist/esm/core/annotation/annotation-writer.js.map +0 -1
  125. package/dist/esm/core/annotation/annotation.js.map +0 -1
  126. package/dist/esm/core/inference-response/inference-response.js.map +0 -1
  127. package/dist/esm/core/inference-response/invalid-model-type-error.js.map +0 -1
  128. package/dist/esm/core/inference-response/model-type.js.map +0 -1
  129. package/dist/esm/core/model/annotation-result/annotation-interface.js.map +0 -1
  130. package/dist/esm/core/model/annotation-result/boundary-box.js.map +0 -1
  131. package/dist/esm/core/model/annotation-result/detected-element.js.map +0 -1
  132. package/dist/esm/core/model/custom-element-json.js.map +0 -1
  133. package/dist/esm/core/model/custom-element.js.map +0 -1
  134. package/dist/esm/core/reporting/default-step.js.map +0 -1
  135. package/dist/esm/core/reporting/index.js.map +0 -1
  136. package/dist/esm/core/reporting/instruction.js.map +0 -1
  137. package/dist/esm/core/reporting/reporter-config.js.map +0 -1
  138. package/dist/esm/core/reporting/reporter.js.map +0 -1
  139. package/dist/esm/core/reporting/snapshot-detail-level.js.map +0 -1
  140. package/dist/esm/core/reporting/snapshot.js.map +0 -1
  141. package/dist/esm/core/reporting/step-reporter.js.map +0 -1
  142. package/dist/esm/core/reporting/step-run.js.map +0 -1
  143. package/dist/esm/core/reporting/step-status-end.js.map +0 -1
  144. package/dist/esm/core/reporting/step-status.js.map +0 -1
  145. package/dist/esm/core/reporting/step.js.map +0 -1
  146. package/dist/esm/core/runner-protocol/index.js.map +0 -1
  147. package/dist/esm/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
  148. package/dist/esm/core/runner-protocol/request/control-request.js.map +0 -1
  149. package/dist/esm/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
  150. package/dist/esm/core/runner-protocol/request/index.js.map +0 -1
  151. package/dist/esm/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
  152. package/dist/esm/core/runner-protocol/request/read-recording-request.js.map +0 -1
  153. package/dist/esm/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
  154. package/dist/esm/core/runner-protocol/request/start-recording-request.js.map +0 -1
  155. package/dist/esm/core/runner-protocol/request/stop-recording-request.js.map +0 -1
  156. package/dist/esm/core/runner-protocol/response/index.js.map +0 -1
  157. package/dist/esm/core/ui-control-commands/action.js.map +0 -1
  158. package/dist/esm/core/ui-control-commands/control-command-code.js.map +0 -1
  159. package/dist/esm/core/ui-control-commands/control-command.js.map +0 -1
  160. package/dist/esm/core/ui-control-commands/index.js.map +0 -1
  161. package/dist/esm/core/ui-control-commands/input-event.js.map +0 -1
  162. package/dist/esm/execution/config-error.js.map +0 -1
  163. package/dist/esm/execution/control-command-error.js.map +0 -1
  164. package/dist/esm/execution/credentials-args.js.map +0 -1
  165. package/dist/esm/execution/dsl.js.map +0 -1
  166. package/dist/esm/execution/execution-runtime.js.map +0 -1
  167. package/dist/esm/execution/index.js.map +0 -1
  168. package/dist/esm/execution/inference-client.js.map +0 -1
  169. package/dist/esm/execution/inference-response-error.js.map +0 -1
  170. package/dist/esm/execution/is-image-required-interface.js.map +0 -1
  171. package/dist/esm/execution/misc.js.map +0 -1
  172. package/dist/esm/execution/model-composition-branch.js.map +0 -1
  173. package/dist/esm/execution/read-environment-credentials.js.map +0 -1
  174. package/dist/esm/execution/read-recording-response-stream-handler.js.map +0 -1
  175. package/dist/esm/execution/repeat-error.js.map +0 -1
  176. package/dist/esm/execution/ui-control-client-dependency-builder.js.map +0 -1
  177. package/dist/esm/execution/ui-control-client.js.map +0 -1
  178. package/dist/esm/execution/ui-controller-client-connection-state.js.map +0 -1
  179. package/dist/esm/execution/ui-controller-client-error.js.map +0 -1
  180. package/dist/esm/execution/ui-controller-client-interface.js.map +0 -1
  181. package/dist/esm/execution/ui-controller-client.js.map +0 -1
  182. package/dist/esm/lib/download-binaries.js.map +0 -1
  183. package/dist/esm/lib/index.js.map +0 -1
  184. package/dist/esm/lib/interactive_cli/add-script-package-json.d.ts +0 -1
  185. package/dist/esm/lib/interactive_cli/add-script-package-json.js +0 -32
  186. package/dist/esm/lib/interactive_cli/add-script-package-json.js.map +0 -1
  187. package/dist/esm/lib/interactive_cli/cli-options-interface.js.map +0 -1
  188. package/dist/esm/lib/interactive_cli/cli.js.map +0 -1
  189. package/dist/esm/lib/interactive_cli/create-example-project.js.map +0 -1
  190. package/dist/esm/lib/interactive_cli/index.js.map +0 -1
  191. package/dist/esm/lib/libfuse-error.js.map +0 -1
  192. package/dist/esm/lib/logger.js.map +0 -1
  193. package/dist/esm/lib/timeout-error.js.map +0 -1
  194. package/dist/esm/lib/ui-controller-args.js.map +0 -1
  195. package/dist/esm/lib/ui-controller-darwin.js.map +0 -1
  196. package/dist/esm/lib/ui-controller-facade.js.map +0 -1
  197. package/dist/esm/lib/ui-controller-linux.js.map +0 -1
  198. package/dist/esm/lib/ui-controller-win32.js.map +0 -1
  199. package/dist/esm/lib/ui-controller.js.map +0 -1
  200. package/dist/esm/lib/unkown-error.js.map +0 -1
  201. package/dist/esm/lib/wayland-error.js.map +0 -1
  202. package/dist/esm/main.js.map +0 -1
  203. package/dist/esm/shared/index.js.map +0 -1
  204. package/dist/esm/shared/log-levels.js.map +0 -1
  205. package/dist/esm/shared/proxy-agent-args.js.map +0 -1
  206. package/dist/esm/utils/analytics/analytics-interface.js.map +0 -1
  207. package/dist/esm/utils/analytics/analytics.js.map +0 -1
  208. package/dist/esm/utils/analytics/index.js.map +0 -1
  209. package/dist/esm/utils/analytics/installation-timestamp-create-error.js.map +0 -1
  210. package/dist/esm/utils/analytics/installation-timestamp-get-error.js.map +0 -1
  211. package/dist/esm/utils/analytics/installation-timestamp.js.map +0 -1
  212. package/dist/esm/utils/analytics/user-identifier-interface.js.map +0 -1
  213. package/dist/esm/utils/analytics/user-identifier.js.map +0 -1
  214. package/dist/esm/utils/base_64_image/base-64-image-error.js.map +0 -1
  215. package/dist/esm/utils/base_64_image/base-64-image-string-error.js.map +0 -1
  216. package/dist/esm/utils/base_64_image/base-64-image.js.map +0 -1
  217. package/dist/esm/utils/base_64_image/sharp.js.map +0 -1
  218. package/dist/esm/utils/http/credentials.js.map +0 -1
  219. package/dist/esm/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
  220. package/dist/esm/utils/http/custom-errors/client-http-client-error.js.map +0 -1
  221. package/dist/esm/utils/http/custom-errors/general-http-client-error.js.map +0 -1
  222. package/dist/esm/utils/http/custom-errors/http-client-error.js.map +0 -1
  223. package/dist/esm/utils/http/custom-errors/index.js.map +0 -1
  224. package/dist/esm/utils/http/custom-errors/server-http-client-error.js.map +0 -1
  225. package/dist/esm/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
  226. package/dist/esm/utils/http/http-client-got.js.map +0 -1
  227. package/dist/esm/utils/http/index.js.map +0 -1
  228. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
  229. package/dist/esm/utils/image-resize-errors/index.js.map +0 -1
  230. package/dist/esm/utils/path.js.map +0 -1
  231. package/dist/esm/utils/proxy/proxy-builder.js.map +0 -1
  232. package/dist/esm/utils/resized-image-interface.js.map +0 -1
  233. package/dist/esm/utils/transformations.js.map +0 -1
  234. 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()
1746
+ *
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()
1593
1751
  *
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()
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()
1818
+ *
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()
1636
1823
  *
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()
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.
@@ -2176,16 +2425,20 @@ export class FluentCommand extends FluentBase {
2176
2425
  * await aui.execOnShell("chrome").exec();
2177
2426
  * ```
2178
2427
  *
2179
- * @param {string} shell_command - A shell command which is executed.
2428
+ * @param {string} shellCommand - A shell command which is executed.
2429
+ * @param {number} [timeoutInMilliseconds=1] - A timeout in milliseconds.
2180
2430
  *
2181
2431
  * @return {Exec}
2182
2432
  */
2183
- execOnShell(shell_command) {
2433
+ execOnShell(shellCommand, timeoutInMilliseconds = 1) {
2184
2434
  this._textStr = '';
2185
2435
  this._textStr += 'Execute';
2186
2436
  this._textStr += ' shell';
2187
2437
  this._textStr += ' command';
2188
- this._textStr += ` ${Separators.STRING}${shell_command}${Separators.STRING}`;
2438
+ this._textStr += ` ${Separators.STRING}${shellCommand}${Separators.STRING}`;
2439
+ if (timeoutInMilliseconds !== undefined) {
2440
+ this._textStr += ` with ${timeoutInMilliseconds} milliseconds timeout`;
2441
+ }
2189
2442
  return new Exec(this);
2190
2443
  }
2191
2444
  /**
@@ -2261,7 +2514,7 @@ export class FluentCommand extends FluentBase {
2261
2514
  * await aui.mouseDoubleLeftClick().exec();
2262
2515
  * ```
2263
2516
  *
2264
- * ![](https://docs.askui.com/img/gif/mousedoubleleftclick.gif)
2517
+ * ![](https://docs.askui.com/img/gif/mouseDoubleLeftClick.gif)
2265
2518
  *
2266
2519
  * @return {Exec}
2267
2520
  */
@@ -2453,7 +2706,7 @@ export class FluentCommand extends FluentBase {
2453
2706
  * await aui.pressAndroidTwoKey('volume_down', 'power').exec();
2454
2707
  * ```
2455
2708
  *
2456
- * ![](https://docs.askui.com/img/gif/pressAndroidTwoKey.gif)
2709
+ * ![](https://docs.askui.com/img/gif/pressAndroidTwoKeys.gif)
2457
2710
  *
2458
2711
  * @param {ANDROID_KEY} first_key - A Android key
2459
2712
  * @param {ANDROID_KEY} second_key - A Android key
@@ -2712,7 +2965,7 @@ export class FluentFiltersGetter extends FluentBase {
2712
2965
  * .customElement({
2713
2966
  * customImage: './logo.png', // required
2714
2967
  * name: 'myLogo', // optional
2715
- * threshold: 0.9, // optional, defaults to 0.9
2968
+ * threshold: 0.5, // optional, defaults to 0.5
2716
2969
  * stopThreshold: 0.9, // optional, defaults to 0.9
2717
2970
  * rotationDegreePerStep: 0, // optional, defaults to 0
2718
2971
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
@@ -2728,7 +2981,7 @@ export class FluentFiltersGetter extends FluentBase {
2728
2981
  * - **name** (*`string`, optional*):
2729
2982
  * - 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
2983
  * - **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`.
2984
+ * - 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
2985
  * - **stopThreshold** (*`number`, optional*):
2733
2986
  * - 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
2987
  * - **rotationDegreePerStep** (*`number`, optional*):
@@ -2876,7 +3129,7 @@ export class FluentFiltersGetter extends FluentBase {
2876
3129
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
2877
3130
  * ```
2878
3131
  *
2879
- * ![](https://docs.askui.com/img/gif/withtextregex.gif)
3132
+ * ![](https://docs.askui.com/img/gif/withTextRegex.gif)
2880
3133
  *
2881
3134
  *
2882
3135
  *
@@ -2908,7 +3161,7 @@ export class FluentFiltersGetter extends FluentBase {
2908
3161
  * await aui.moveMouseTo().text().withExactText('Password').exec()
2909
3162
  * ```
2910
3163
  *
2911
- * ![](https://docs.askui.com/img/gif/withexacttext.gif)
3164
+ * ![](https://docs.askui.com/img/gif/withExactText.gif)
2912
3165
  *
2913
3166
  *
2914
3167
  *
@@ -2956,7 +3209,7 @@ export class FluentFiltersGetter extends FluentBase {
2956
3209
  * **Important: _Matching only returns the best matching element when you use it with `get()`_**
2957
3210
  *
2958
3211
  * 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.
3212
+ * For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
2960
3213
  * Generally, the more detail the better.
2961
3214
  *
2962
3215
  * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
@@ -3140,17 +3393,46 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3140
3393
  *
3141
3394
  * **Examples:**
3142
3395
  * ```typescript
3143
- * -------------- -------------- --------------
3144
- * | leftEl | | rightEl0 | | rightEl1 |
3145
- * -------------- -------------- --------------
3396
+ * ---------- --------- ---------
3397
+ * | button | | text0 | | text3 |
3398
+ * ---------- --------- --------- ---------
3399
+ * | text1 | ---------
3400
+ * --------- | text2 |
3401
+ * ---------
3402
+ *
3403
+ * // General explanation for element_center_line
3404
+ * // This will find text0 and text3
3405
+ * ...text().rightOf(..., 'element_center_line').button()
3406
+ *
3407
+ * // General explanation for element_edge_area
3408
+ * // This will find text0, text1 and text3
3409
+ * ...text().rightOf(..., 'element_edge_area').button()
3410
+ *
3411
+ * // General explanation and display_edge_area
3412
+ * // This will find text0, text1, text2 and text3
3413
+ * ...text().rightOf(..., 'display_edge_area').button()
3146
3414
  *
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()
3415
+ * // More examples:
3416
+ * // Returns text0 because it is the first element rightOf button
3417
+ * ...text().rightOf().button()
3418
+ * ...text().rightOf(0).button()
3419
+ * ...text().rightOf(0, 'element_edge_area').button()
3420
+ *
3421
+ * // Returns text3 because it is the second text touched by the
3422
+ * // horizontal line from the center of button
3423
+ * // Notice: text1 is not touched!
3424
+ * ...text().rightOf(1, 'element_center_line').button()
3425
+ *
3426
+ * // Returns text3 because it is the third text touched by the
3427
+ * // vertical area rightOf the y-axis of button
3428
+ * // Notice: text2 is not touched!
3429
+ * ...text().rightOf(2, 'element_edge_area').button()
3430
+ *
3431
+ * // Returns text2 because it is the third element rightOf button
3432
+ * ...text().rightOf(2, 'display_edge_area').button()
3433
+ *
3434
+ * // Returns no element because button is rightOf the texts
3435
+ * ...button().rightOf().text()
3154
3436
  * ```
3155
3437
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
3156
3438
  *
@@ -3183,17 +3465,46 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3183
3465
  *
3184
3466
  * **Examples:**
3185
3467
  * ```typescript
3186
- * -------------- -------------- --------------
3187
- * | leftEl1 | | leftEl0 | | rightEl |
3188
- * -------------- -------------- --------------
3468
+ * --------- --------- ----------
3469
+ * | text3 | | text0 | | button |
3470
+ * --------- --------- --------- ----------
3471
+ * --------- | text1 |
3472
+ * | text2 | ---------
3473
+ * ---------
3474
+ *
3475
+ * // General explanation for element_center_line
3476
+ * // This will find text0 and text3
3477
+ * ...text().leftOf(..., 'element_center_line').button()
3478
+ *
3479
+ * // General explanation for element_edge_area
3480
+ * // This will find text0, text1 and text3
3481
+ * ...text().leftOf(..., 'element_edge_area').button()
3189
3482
  *
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()
3483
+ * // General explanation and display_edge_area
3484
+ * // This will find text0, text1, text2 and text3
3485
+ * ...text().leftOf(..., 'display_edge_area').button()
3486
+ *
3487
+ * // More examples:
3488
+ * // Returns text0 because it is the first element leftOf button
3489
+ * ...text().leftOf().button()
3490
+ * ...text().leftOf(0).button()
3491
+ * ...text().leftOf(0, 'element_edge_area').button()
3492
+ *
3493
+ * // Returns text3 because it is the second text touched by the
3494
+ * // horizontal line from the center of button
3495
+ * // Notice: text1 is not touched!
3496
+ * ...text().leftOf(1, 'element_center_line').button()
3497
+ *
3498
+ * // Returns text3 because it is the third text touched by the
3499
+ * // vertical area leftOf the y-axis of button
3500
+ * // Notice: text2 is not touched!
3501
+ * ...text().leftOf(2, 'element_edge_area').button()
3502
+ *
3503
+ * // Returns text2 because it is the third element leftOf button
3504
+ * ...text().leftOf(2, 'display_edge_area').button()
3505
+ *
3506
+ * // Returns no element because button is rightOf the texts
3507
+ * ...button().leftOf().text()
3197
3508
  * ```
3198
3509
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
3199
3510
  *
@@ -3226,22 +3537,54 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3226
3537
  *
3227
3538
  * **Examples:**
3228
3539
  * ```typescript
3229
- * --------------
3230
- * | text |
3231
- * --------------
3232
- * --------------
3233
- * | button0 |
3234
- * --------------
3235
- * --------------
3236
- * | button1 |
3237
- * --------------
3238
- *
3540
+ * ------------
3541
+ * | text |
3542
+ * ------------
3543
+ * ------------
3544
+ * | button0 |
3545
+ * ------------
3546
+ * -----------
3547
+ * | button1 |
3548
+ * -----------
3549
+ * -----------
3550
+ * | button2 |
3551
+ * -----------
3552
+ * ------------
3553
+ * | button3 |
3554
+ * ------------
3555
+ *
3556
+ * // General explanation for element_center_line
3557
+ * // This will find button0 and button3
3558
+ * ...button().below(..., 'element_center_line').text()
3559
+ *
3560
+ * // General explanation for element_edge_area
3561
+ * // This will find button0, button1 and button3
3562
+ * ...button().below(..., 'element_edge_area').text()
3563
+ *
3564
+ * // General explanation and display_edge_area
3565
+ * // This will find button0, button1, button2 and button3
3566
+ * ...button().below(..., 'display_edge_area').text()
3567
+ *
3568
+ * // More examples:
3239
3569
  * // Returns button0 because button0 is the first button below text
3240
3570
  * ...button().below().text()
3241
3571
  * ...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
3572
+ * ...button().below(0, 'element_edge_area').text()
3573
+ *
3574
+ * // Returns button3 because it is the second button touched by the
3575
+ * // vertical line from the center of text
3576
+ * // Notice: button1 is not touched
3577
+ * ...button().below(1, 'element_center_line').text()
3578
+ *
3579
+ * // Returns button3 because it is the third button touched by the
3580
+ * // vertical area below the x-axis of text
3581
+ * // Notice: button2 is not touched!
3582
+ * ...button().below(2, 'element_edge_area').text()
3583
+ *
3584
+ * // Returns button2 because it is the third element below text
3585
+ * ...button().below(2, 'display_edge_area').text()
3586
+ *
3587
+ * // Returns no element because text is above the buttons
3245
3588
  * ...text().below().button()
3246
3589
  * ```
3247
3590
  * ![](https://docs.askui.com/img/gif/below.gif)
@@ -3274,22 +3617,54 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3274
3617
  *
3275
3618
  * **Examples:**
3276
3619
  * ```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
3620
+ * ------------
3621
+ * | text3 |
3622
+ * ------------
3623
+ * ------------
3624
+ * | text2 |
3625
+ * ------------
3626
+ * ------------
3627
+ * | text1 |
3628
+ * ------------
3629
+ * ------------
3630
+ * | text0 |
3631
+ * ------------
3632
+ * ------------
3633
+ * | button |
3634
+ * ------------
3635
+ *
3636
+ * // General explanation for element_center_line
3637
+ * // This will find text0 and text3
3638
+ * ...text().above(..., 'element_center_line').button()
3639
+ *
3640
+ * // General explanation for element_edge_area
3641
+ * // This will find text0, text1 and text3
3642
+ * ...text().above(..., 'element_edge_area').button()
3643
+ *
3644
+ * // General explanation and display_edge_area
3645
+ * // This will find text0, text1, text2 and text3
3646
+ * ...text().above(..., 'display_edge_area').button()
3647
+ *
3648
+ * // More examples:
3649
+ * // Returns text0 because it is the first element above button
3288
3650
  * ...text().above().button()
3289
3651
  * ...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
3652
+ * ...text().above(0, 'element_edge_area').button()
3653
+ *
3654
+ * // Returns text3 because it is the second text touched by the
3655
+ * // vertical line from the center of button
3656
+ * // Notice: text1 is not touched!
3657
+ * ...text().above(1, 'element_center_line').button()
3658
+ *
3659
+ * // Returns text3 because it is the third text touched by the
3660
+ * // vertical area above the x-axis of button
3661
+ * // Notice: text2 is not touched!
3662
+ * ...text().above(2, 'element_edge_area').button()
3663
+ *
3664
+ * // Returns text2 because it is the third element above button
3665
+ * ...text().above(2, 'display_edge_area').button()
3666
+ *
3667
+ * // Returns no element because button is below the texts
3293
3668
  * ...button().above().text()
3294
3669
  * ```
3295
3670
  * ![](https://docs.askui.com/img/gif/above.gif)