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,4 +1,9 @@
1
1
  "use strict";
2
+ /* eslint-disable @typescript-eslint/no-use-before-define */
3
+ /* eslint-disable @typescript-eslint/naming-convention */
4
+ /* eslint-disable max-classes-per-file */
5
+ /* eslint-disable max-len */
6
+ // Autogenerated from typescript.template file
2
7
  Object.defineProperty(exports, "__esModule", { value: true });
3
8
  exports.ApiCommands = exports.Getter = exports.FluentFiltersOrRelationsGetter = exports.FluentFiltersGetter = exports.ExecGetter = exports.FluentCommand = exports.FluentFiltersOrRelationsCondition = exports.FluentFiltersCondition = exports.FluentFiltersOrRelations = exports.FluentFilters = exports.Exec = exports.Separators = void 0;
4
9
  var Separators;
@@ -289,7 +294,7 @@ class FluentFilters extends FluentBase {
289
294
  * .customElement({
290
295
  * customImage: './logo.png', // required
291
296
  * name: 'myLogo', // optional
292
- * threshold: 0.9, // optional, defaults to 0.9
297
+ * threshold: 0.5, // optional, defaults to 0.5
293
298
  * stopThreshold: 0.9, // optional, defaults to 0.9
294
299
  * rotationDegreePerStep: 0, // optional, defaults to 0
295
300
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
@@ -305,7 +310,7 @@ class FluentFilters extends FluentBase {
305
310
  * - **name** (*`string`, optional*):
306
311
  * - 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.
307
312
  * - **threshold** (*`number`, optional*):
308
- * - 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`.
313
+ * - 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`.
309
314
  * - **stopThreshold** (*`number`, optional*):
310
315
  * - 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`.
311
316
  * - **rotationDegreePerStep** (*`number`, optional*):
@@ -453,7 +458,7 @@ class FluentFilters extends FluentBase {
453
458
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
454
459
  * ```
455
460
  *
456
- * ![](https://docs.askui.com/img/gif/withtextregex.gif)
461
+ * ![](https://docs.askui.com/img/gif/withTextRegex.gif)
457
462
  *
458
463
  *
459
464
  *
@@ -485,7 +490,7 @@ class FluentFilters extends FluentBase {
485
490
  * await aui.moveMouseTo().text().withExactText('Password').exec()
486
491
  * ```
487
492
  *
488
- * ![](https://docs.askui.com/img/gif/withexacttext.gif)
493
+ * ![](https://docs.askui.com/img/gif/withExactText.gif)
489
494
  *
490
495
  *
491
496
  *
@@ -533,7 +538,7 @@ class FluentFilters extends FluentBase {
533
538
  * **Important: _Matching only returns the best matching element when you use it with `get()`_**
534
539
  *
535
540
  * A bit of playing around to find a matching description is sometimes needed:
536
- * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
541
+ * For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
537
542
  * Generally, the more detail the better.
538
543
  *
539
544
  * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
@@ -718,17 +723,46 @@ class FluentFiltersOrRelations extends FluentFilters {
718
723
  *
719
724
  * **Examples:**
720
725
  * ```typescript
721
- * -------------- -------------- --------------
722
- * | leftEl | | rightEl0 | | rightEl1 |
723
- * -------------- -------------- --------------
726
+ * ---------- --------- ---------
727
+ * | button | | text0 | | text3 |
728
+ * ---------- --------- --------- ---------
729
+ * | text1 | ---------
730
+ * --------- | text2 |
731
+ * ---------
724
732
  *
725
- * // Returns rightEl0 because rightEl0 is the first element right of leftEl
726
- * ...rightEl().rightOf().leftEl()
727
- * ...rightEl().rightOf(0).leftEl()
728
- * // Returns rightEl1 because rightEl1 is the second element right of leftEl
729
- * ...rightEl().rightOf(1).leftEl()
730
- * // Returns no element because leftEl is left of rightEl
731
- * ...leftEl().rightOf().rightEl()
733
+ * // General explanation for element_center_line
734
+ * // This will find text0 and text3
735
+ * ...text().rightOf(..., 'element_center_line').button()
736
+ *
737
+ * // General explanation for element_edge_area
738
+ * // This will find text0, text1 and text3
739
+ * ...text().rightOf(..., 'element_edge_area').button()
740
+ *
741
+ * // General explanation and display_edge_area
742
+ * // This will find text0, text1, text2 and text3
743
+ * ...text().rightOf(..., 'display_edge_area').button()
744
+ *
745
+ * // More examples:
746
+ * // Returns text0 because it is the first element rightOf button
747
+ * ...text().rightOf().button()
748
+ * ...text().rightOf(0).button()
749
+ * ...text().rightOf(0, 'element_edge_area').button()
750
+ *
751
+ * // Returns text3 because it is the second text touched by the
752
+ * // horizontal line from the center of button
753
+ * // Notice: text1 is not touched!
754
+ * ...text().rightOf(1, 'element_center_line').button()
755
+ *
756
+ * // Returns text3 because it is the third text touched by the
757
+ * // vertical area rightOf the y-axis of button
758
+ * // Notice: text2 is not touched!
759
+ * ...text().rightOf(2, 'element_edge_area').button()
760
+ *
761
+ * // Returns text2 because it is the third element rightOf button
762
+ * ...text().rightOf(2, 'display_edge_area').button()
763
+ *
764
+ * // Returns no element because button is rightOf the texts
765
+ * ...button().rightOf().text()
732
766
  * ```
733
767
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
734
768
  *
@@ -761,17 +795,46 @@ class FluentFiltersOrRelations extends FluentFilters {
761
795
  *
762
796
  * **Examples:**
763
797
  * ```typescript
764
- * -------------- -------------- --------------
765
- * | leftEl1 | | leftEl0 | | rightEl |
766
- * -------------- -------------- --------------
798
+ * --------- --------- ----------
799
+ * | text3 | | text0 | | button |
800
+ * --------- --------- --------- ----------
801
+ * --------- | text1 |
802
+ * | text2 | ---------
803
+ * ---------
804
+ *
805
+ * // General explanation for element_center_line
806
+ * // This will find text0 and text3
807
+ * ...text().leftOf(..., 'element_center_line').button()
808
+ *
809
+ * // General explanation for element_edge_area
810
+ * // This will find text0, text1 and text3
811
+ * ...text().leftOf(..., 'element_edge_area').button()
812
+ *
813
+ * // General explanation and display_edge_area
814
+ * // This will find text0, text1, text2 and text3
815
+ * ...text().leftOf(..., 'display_edge_area').button()
816
+ *
817
+ * // More examples:
818
+ * // Returns text0 because it is the first element leftOf button
819
+ * ...text().leftOf().button()
820
+ * ...text().leftOf(0).button()
821
+ * ...text().leftOf(0, 'element_edge_area').button()
822
+ *
823
+ * // Returns text3 because it is the second text touched by the
824
+ * // horizontal line from the center of button
825
+ * // Notice: text1 is not touched!
826
+ * ...text().leftOf(1, 'element_center_line').button()
827
+ *
828
+ * // Returns text3 because it is the third text touched by the
829
+ * // vertical area leftOf the y-axis of button
830
+ * // Notice: text2 is not touched!
831
+ * ...text().leftOf(2, 'element_edge_area').button()
832
+ *
833
+ * // Returns text2 because it is the third element leftOf button
834
+ * ...text().leftOf(2, 'display_edge_area').button()
767
835
  *
768
- * // Returns leftEl0 because leftEl0 is the first element left of rightEl
769
- * ...leftEl().leftOf().rightEl()
770
- * ...leftEl().leftOf(0).rightEl()
771
- * // Returns leftEl1 because leftEl1 is the second element left of rightEl
772
- * ...leftEl().leftOf(1).rightEl()
773
- * // Returns no element because rightEl is left of leftEl
774
- * ...rightEl().leftOf().leftEl()
836
+ * // Returns no element because button is rightOf the texts
837
+ * ...button().leftOf().text()
775
838
  * ```
776
839
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
777
840
  *
@@ -804,22 +867,54 @@ class FluentFiltersOrRelations extends FluentFilters {
804
867
  *
805
868
  * **Examples:**
806
869
  * ```typescript
807
- * --------------
808
- * | text |
809
- * --------------
810
- * --------------
811
- * | button0 |
812
- * --------------
813
- * --------------
814
- * | button1 |
815
- * --------------
816
- *
870
+ * ------------
871
+ * | text |
872
+ * ------------
873
+ * ------------
874
+ * | button0 |
875
+ * ------------
876
+ * -----------
877
+ * | button1 |
878
+ * -----------
879
+ * -----------
880
+ * | button2 |
881
+ * -----------
882
+ * ------------
883
+ * | button3 |
884
+ * ------------
885
+ *
886
+ * // General explanation for element_center_line
887
+ * // This will find button0 and button3
888
+ * ...button().below(..., 'element_center_line').text()
889
+ *
890
+ * // General explanation for element_edge_area
891
+ * // This will find button0, button1 and button3
892
+ * ...button().below(..., 'element_edge_area').text()
893
+ *
894
+ * // General explanation and display_edge_area
895
+ * // This will find button0, button1, button2 and button3
896
+ * ...button().below(..., 'display_edge_area').text()
897
+ *
898
+ * // More examples:
817
899
  * // Returns button0 because button0 is the first button below text
818
900
  * ...button().below().text()
819
901
  * ...button().below(0).text()
820
- * // Returns button1 because button1 is the second button below text
821
- * ...button().below(1).text()
822
- * // Returns no element because text is above button
902
+ * ...button().below(0, 'element_edge_area').text()
903
+ *
904
+ * // Returns button3 because it is the second button touched by the
905
+ * // vertical line from the center of text
906
+ * // Notice: button1 is not touched
907
+ * ...button().below(1, 'element_center_line').text()
908
+ *
909
+ * // Returns button3 because it is the third button touched by the
910
+ * // vertical area below the x-axis of text
911
+ * // Notice: button2 is not touched!
912
+ * ...button().below(2, 'element_edge_area').text()
913
+ *
914
+ * // Returns button2 because it is the third element below text
915
+ * ...button().below(2, 'display_edge_area').text()
916
+ *
917
+ * // Returns no element because text is above the buttons
823
918
  * ...text().below().button()
824
919
  * ```
825
920
  * ![](https://docs.askui.com/img/gif/below.gif)
@@ -852,22 +947,54 @@ class FluentFiltersOrRelations extends FluentFilters {
852
947
  *
853
948
  * **Examples:**
854
949
  * ```typescript
855
- * --------------
856
- * | text1 |
857
- * --------------
858
- * --------------
859
- * | text0 |
860
- * --------------
861
- * --------------
862
- * | button |
863
- * --------------
864
- *
865
- * // Returns text0 because text0 is the first element above button
950
+ * ------------
951
+ * | text3 |
952
+ * ------------
953
+ * ------------
954
+ * | text2 |
955
+ * ------------
956
+ * ------------
957
+ * | text1 |
958
+ * ------------
959
+ * ------------
960
+ * | text0 |
961
+ * ------------
962
+ * ------------
963
+ * | button |
964
+ * ------------
965
+ *
966
+ * // General explanation for element_center_line
967
+ * // This will find text0 and text3
968
+ * ...text().above(..., 'element_center_line').button()
969
+ *
970
+ * // General explanation for element_edge_area
971
+ * // This will find text0, text1 and text3
972
+ * ...text().above(..., 'element_edge_area').button()
973
+ *
974
+ * // General explanation and display_edge_area
975
+ * // This will find text0, text1, text2 and text3
976
+ * ...text().above(..., 'display_edge_area').button()
977
+ *
978
+ * // More examples:
979
+ * // Returns text0 because it is the first element above button
866
980
  * ...text().above().button()
867
981
  * ...text().above(0).button()
868
- * // Returns text1 because text1 is the second element above button
869
- * ...text().above(1).button()
870
- * // Returns no element because button is below text
982
+ * ...text().above(0, 'element_edge_area').button()
983
+ *
984
+ * // Returns text3 because it is the second text touched by the
985
+ * // vertical line from the center of button
986
+ * // Notice: text1 is not touched!
987
+ * ...text().above(1, 'element_center_line').button()
988
+ *
989
+ * // Returns text3 because it is the third text touched by the
990
+ * // vertical area above the x-axis of button
991
+ * // Notice: text2 is not touched!
992
+ * ...text().above(2, 'element_edge_area').button()
993
+ *
994
+ * // Returns text2 because it is the third element above button
995
+ * ...text().above(2, 'display_edge_area').button()
996
+ *
997
+ * // Returns no element because button is below the texts
871
998
  * ...button().above().text()
872
999
  * ```
873
1000
  * ![](https://docs.askui.com/img/gif/above.gif)
@@ -1165,7 +1292,7 @@ class FluentFiltersCondition extends FluentBase {
1165
1292
  * .customElement({
1166
1293
  * customImage: './logo.png', // required
1167
1294
  * name: 'myLogo', // optional
1168
- * threshold: 0.9, // optional, defaults to 0.9
1295
+ * threshold: 0.5, // optional, defaults to 0.5
1169
1296
  * stopThreshold: 0.9, // optional, defaults to 0.9
1170
1297
  * rotationDegreePerStep: 0, // optional, defaults to 0
1171
1298
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
@@ -1181,7 +1308,7 @@ class FluentFiltersCondition extends FluentBase {
1181
1308
  * - **name** (*`string`, optional*):
1182
1309
  * - 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.
1183
1310
  * - **threshold** (*`number`, optional*):
1184
- * - 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`.
1311
+ * - 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`.
1185
1312
  * - **stopThreshold** (*`number`, optional*):
1186
1313
  * - 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`.
1187
1314
  * - **rotationDegreePerStep** (*`number`, optional*):
@@ -1329,7 +1456,7 @@ class FluentFiltersCondition extends FluentBase {
1329
1456
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
1330
1457
  * ```
1331
1458
  *
1332
- * ![](https://docs.askui.com/img/gif/withtextregex.gif)
1459
+ * ![](https://docs.askui.com/img/gif/withTextRegex.gif)
1333
1460
  *
1334
1461
  *
1335
1462
  *
@@ -1361,7 +1488,7 @@ class FluentFiltersCondition extends FluentBase {
1361
1488
  * await aui.moveMouseTo().text().withExactText('Password').exec()
1362
1489
  * ```
1363
1490
  *
1364
- * ![](https://docs.askui.com/img/gif/withexacttext.gif)
1491
+ * ![](https://docs.askui.com/img/gif/withExactText.gif)
1365
1492
  *
1366
1493
  *
1367
1494
  *
@@ -1409,7 +1536,7 @@ class FluentFiltersCondition extends FluentBase {
1409
1536
  * **Important: _Matching only returns the best matching element when you use it with `get()`_**
1410
1537
  *
1411
1538
  * A bit of playing around to find a matching description is sometimes needed:
1412
- * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
1539
+ * For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
1413
1540
  * Generally, the more detail the better.
1414
1541
  *
1415
1542
  * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
@@ -1594,17 +1721,46 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1594
1721
  *
1595
1722
  * **Examples:**
1596
1723
  * ```typescript
1597
- * -------------- -------------- --------------
1598
- * | leftEl | | rightEl0 | | rightEl1 |
1599
- * -------------- -------------- --------------
1724
+ * ---------- --------- ---------
1725
+ * | button | | text0 | | text3 |
1726
+ * ---------- --------- --------- ---------
1727
+ * | text1 | ---------
1728
+ * --------- | text2 |
1729
+ * ---------
1730
+ *
1731
+ * // General explanation for element_center_line
1732
+ * // This will find text0 and text3
1733
+ * ...text().rightOf(..., 'element_center_line').button()
1734
+ *
1735
+ * // General explanation for element_edge_area
1736
+ * // This will find text0, text1 and text3
1737
+ * ...text().rightOf(..., 'element_edge_area').button()
1738
+ *
1739
+ * // General explanation and display_edge_area
1740
+ * // This will find text0, text1, text2 and text3
1741
+ * ...text().rightOf(..., 'display_edge_area').button()
1742
+ *
1743
+ * // More examples:
1744
+ * // Returns text0 because it is the first element rightOf button
1745
+ * ...text().rightOf().button()
1746
+ * ...text().rightOf(0).button()
1747
+ * ...text().rightOf(0, 'element_edge_area').button()
1748
+ *
1749
+ * // Returns text3 because it is the second text touched by the
1750
+ * // horizontal line from the center of button
1751
+ * // Notice: text1 is not touched!
1752
+ * ...text().rightOf(1, 'element_center_line').button()
1753
+ *
1754
+ * // Returns text3 because it is the third text touched by the
1755
+ * // vertical area rightOf the y-axis of button
1756
+ * // Notice: text2 is not touched!
1757
+ * ...text().rightOf(2, 'element_edge_area').button()
1600
1758
  *
1601
- * // Returns rightEl0 because rightEl0 is the first element right of leftEl
1602
- * ...rightEl().rightOf().leftEl()
1603
- * ...rightEl().rightOf(0).leftEl()
1604
- * // Returns rightEl1 because rightEl1 is the second element right of leftEl
1605
- * ...rightEl().rightOf(1).leftEl()
1606
- * // Returns no element because leftEl is left of rightEl
1607
- * ...leftEl().rightOf().rightEl()
1759
+ * // Returns text2 because it is the third element rightOf button
1760
+ * ...text().rightOf(2, 'display_edge_area').button()
1761
+ *
1762
+ * // Returns no element because button is rightOf the texts
1763
+ * ...button().rightOf().text()
1608
1764
  * ```
1609
1765
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
1610
1766
  *
@@ -1637,17 +1793,46 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1637
1793
  *
1638
1794
  * **Examples:**
1639
1795
  * ```typescript
1640
- * -------------- -------------- --------------
1641
- * | leftEl1 | | leftEl0 | | rightEl |
1642
- * -------------- -------------- --------------
1796
+ * --------- --------- ----------
1797
+ * | text3 | | text0 | | button |
1798
+ * --------- --------- --------- ----------
1799
+ * --------- | text1 |
1800
+ * | text2 | ---------
1801
+ * ---------
1802
+ *
1803
+ * // General explanation for element_center_line
1804
+ * // This will find text0 and text3
1805
+ * ...text().leftOf(..., 'element_center_line').button()
1806
+ *
1807
+ * // General explanation for element_edge_area
1808
+ * // This will find text0, text1 and text3
1809
+ * ...text().leftOf(..., 'element_edge_area').button()
1810
+ *
1811
+ * // General explanation and display_edge_area
1812
+ * // This will find text0, text1, text2 and text3
1813
+ * ...text().leftOf(..., 'display_edge_area').button()
1814
+ *
1815
+ * // More examples:
1816
+ * // Returns text0 because it is the first element leftOf button
1817
+ * ...text().leftOf().button()
1818
+ * ...text().leftOf(0).button()
1819
+ * ...text().leftOf(0, 'element_edge_area').button()
1820
+ *
1821
+ * // Returns text3 because it is the second text touched by the
1822
+ * // horizontal line from the center of button
1823
+ * // Notice: text1 is not touched!
1824
+ * ...text().leftOf(1, 'element_center_line').button()
1825
+ *
1826
+ * // Returns text3 because it is the third text touched by the
1827
+ * // vertical area leftOf the y-axis of button
1828
+ * // Notice: text2 is not touched!
1829
+ * ...text().leftOf(2, 'element_edge_area').button()
1643
1830
  *
1644
- * // Returns leftEl0 because leftEl0 is the first element left of rightEl
1645
- * ...leftEl().leftOf().rightEl()
1646
- * ...leftEl().leftOf(0).rightEl()
1647
- * // Returns leftEl1 because leftEl1 is the second element left of rightEl
1648
- * ...leftEl().leftOf(1).rightEl()
1649
- * // Returns no element because rightEl is left of leftEl
1650
- * ...rightEl().leftOf().leftEl()
1831
+ * // Returns text2 because it is the third element leftOf button
1832
+ * ...text().leftOf(2, 'display_edge_area').button()
1833
+ *
1834
+ * // Returns no element because button is rightOf the texts
1835
+ * ...button().leftOf().text()
1651
1836
  * ```
1652
1837
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
1653
1838
  *
@@ -1680,22 +1865,54 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1680
1865
  *
1681
1866
  * **Examples:**
1682
1867
  * ```typescript
1683
- * --------------
1684
- * | text |
1685
- * --------------
1686
- * --------------
1687
- * | button0 |
1688
- * --------------
1689
- * --------------
1690
- * | button1 |
1691
- * --------------
1692
- *
1868
+ * ------------
1869
+ * | text |
1870
+ * ------------
1871
+ * ------------
1872
+ * | button0 |
1873
+ * ------------
1874
+ * -----------
1875
+ * | button1 |
1876
+ * -----------
1877
+ * -----------
1878
+ * | button2 |
1879
+ * -----------
1880
+ * ------------
1881
+ * | button3 |
1882
+ * ------------
1883
+ *
1884
+ * // General explanation for element_center_line
1885
+ * // This will find button0 and button3
1886
+ * ...button().below(..., 'element_center_line').text()
1887
+ *
1888
+ * // General explanation for element_edge_area
1889
+ * // This will find button0, button1 and button3
1890
+ * ...button().below(..., 'element_edge_area').text()
1891
+ *
1892
+ * // General explanation and display_edge_area
1893
+ * // This will find button0, button1, button2 and button3
1894
+ * ...button().below(..., 'display_edge_area').text()
1895
+ *
1896
+ * // More examples:
1693
1897
  * // Returns button0 because button0 is the first button below text
1694
1898
  * ...button().below().text()
1695
1899
  * ...button().below(0).text()
1696
- * // Returns button1 because button1 is the second button below text
1697
- * ...button().below(1).text()
1698
- * // Returns no element because text is above button
1900
+ * ...button().below(0, 'element_edge_area').text()
1901
+ *
1902
+ * // Returns button3 because it is the second button touched by the
1903
+ * // vertical line from the center of text
1904
+ * // Notice: button1 is not touched
1905
+ * ...button().below(1, 'element_center_line').text()
1906
+ *
1907
+ * // Returns button3 because it is the third button touched by the
1908
+ * // vertical area below the x-axis of text
1909
+ * // Notice: button2 is not touched!
1910
+ * ...button().below(2, 'element_edge_area').text()
1911
+ *
1912
+ * // Returns button2 because it is the third element below text
1913
+ * ...button().below(2, 'display_edge_area').text()
1914
+ *
1915
+ * // Returns no element because text is above the buttons
1699
1916
  * ...text().below().button()
1700
1917
  * ```
1701
1918
  * ![](https://docs.askui.com/img/gif/below.gif)
@@ -1728,22 +1945,54 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1728
1945
  *
1729
1946
  * **Examples:**
1730
1947
  * ```typescript
1731
- * --------------
1732
- * | text1 |
1733
- * --------------
1734
- * --------------
1735
- * | text0 |
1736
- * --------------
1737
- * --------------
1738
- * | button |
1739
- * --------------
1740
- *
1741
- * // Returns text0 because text0 is the first element above button
1948
+ * ------------
1949
+ * | text3 |
1950
+ * ------------
1951
+ * ------------
1952
+ * | text2 |
1953
+ * ------------
1954
+ * ------------
1955
+ * | text1 |
1956
+ * ------------
1957
+ * ------------
1958
+ * | text0 |
1959
+ * ------------
1960
+ * ------------
1961
+ * | button |
1962
+ * ------------
1963
+ *
1964
+ * // General explanation for element_center_line
1965
+ * // This will find text0 and text3
1966
+ * ...text().above(..., 'element_center_line').button()
1967
+ *
1968
+ * // General explanation for element_edge_area
1969
+ * // This will find text0, text1 and text3
1970
+ * ...text().above(..., 'element_edge_area').button()
1971
+ *
1972
+ * // General explanation and display_edge_area
1973
+ * // This will find text0, text1, text2 and text3
1974
+ * ...text().above(..., 'display_edge_area').button()
1975
+ *
1976
+ * // More examples:
1977
+ * // Returns text0 because it is the first element above button
1742
1978
  * ...text().above().button()
1743
1979
  * ...text().above(0).button()
1744
- * // Returns text1 because text1 is the second element above button
1745
- * ...text().above(1).button()
1746
- * // Returns no element because button is below text
1980
+ * ...text().above(0, 'element_edge_area').button()
1981
+ *
1982
+ * // Returns text3 because it is the second text touched by the
1983
+ * // vertical line from the center of button
1984
+ * // Notice: text1 is not touched!
1985
+ * ...text().above(1, 'element_center_line').button()
1986
+ *
1987
+ * // Returns text3 because it is the third text touched by the
1988
+ * // vertical area above the x-axis of button
1989
+ * // Notice: text2 is not touched!
1990
+ * ...text().above(2, 'element_edge_area').button()
1991
+ *
1992
+ * // Returns text2 because it is the third element above button
1993
+ * ...text().above(2, 'display_edge_area').button()
1994
+ *
1995
+ * // Returns no element because button is below the texts
1747
1996
  * ...button().above().text()
1748
1997
  * ```
1749
1998
  * ![](https://docs.askui.com/img/gif/above.gif)
@@ -1889,7 +2138,7 @@ class FluentCommand extends FluentBase {
1889
2138
  super(undefined);
1890
2139
  }
1891
2140
  /**
1892
- * Expects a condition, e.g., `exists()` or `notExits()`.
2141
+ * Expects a condition, for example, `exists()` or `notExits()`.
1893
2142
  *
1894
2143
  * Use the structure `expect().<your filter>.(exists()|notExists())` as shown in the examples below.
1895
2144
  *
@@ -1936,7 +2185,7 @@ class FluentCommand extends FluentBase {
1936
2185
  * await aui.moveMouseTo().text().withText('Grinning_Face').exec()
1937
2186
  * ```
1938
2187
  *
1939
- * ![](https://docs.askui.com/img/gif/movemouseto.gif)
2188
+ * ![](https://docs.askui.com/img/gif/moveMouseTo.gif)
1940
2189
  *
1941
2190
  *
1942
2191
  *
@@ -1984,7 +2233,7 @@ class FluentCommand extends FluentBase {
1984
2233
  * await aui.scrollInside(0,-500).text().withText('Bottom sheet').exec();
1985
2234
  * ```
1986
2235
  *
1987
- * ![](https://docs.askui.com/img/gif/scrollinside.gif)
2236
+ * ![](https://docs.askui.com/img/gif/scrollInside.gif)
1988
2237
  *
1989
2238
  * @param {number} x_offset - A (positive/negative) x direction.
1990
2239
  * @param {number} y_offset - A (positive/negative) y direction.
@@ -2088,7 +2337,7 @@ class FluentCommand extends FluentBase {
2088
2337
  * await aui.moveMouseRelatively(0, 50).exec();
2089
2338
  * ```
2090
2339
  *
2091
- * ![](https://docs.askui.com/img/gif/movemouserelatively.gif)
2340
+ * ![](https://docs.askui.com/img/gif/moveMouseRelatively.gif)
2092
2341
  *
2093
2342
  * @param {number} x_offset - A (positive/negative) x direction.
2094
2343
  * @param {number} y_offset - A (positive/negative) y direction.
@@ -2184,16 +2433,20 @@ class FluentCommand extends FluentBase {
2184
2433
  * await aui.execOnShell("chrome").exec();
2185
2434
  * ```
2186
2435
  *
2187
- * @param {string} shell_command - A shell command which is executed.
2436
+ * @param {string} shellCommand - A shell command which is executed.
2437
+ * @param {number} [timeoutInMilliseconds=1] - A timeout in milliseconds.
2188
2438
  *
2189
2439
  * @return {Exec}
2190
2440
  */
2191
- execOnShell(shell_command) {
2441
+ execOnShell(shellCommand, timeoutInMilliseconds = 1) {
2192
2442
  this._textStr = '';
2193
2443
  this._textStr += 'Execute';
2194
2444
  this._textStr += ' shell';
2195
2445
  this._textStr += ' command';
2196
- this._textStr += ` ${Separators.STRING}${shell_command}${Separators.STRING}`;
2446
+ this._textStr += ` ${Separators.STRING}${shellCommand}${Separators.STRING}`;
2447
+ if (timeoutInMilliseconds !== undefined) {
2448
+ this._textStr += ` with ${timeoutInMilliseconds} milliseconds timeout`;
2449
+ }
2197
2450
  return new Exec(this);
2198
2451
  }
2199
2452
  /**
@@ -2269,7 +2522,7 @@ class FluentCommand extends FluentBase {
2269
2522
  * await aui.mouseDoubleLeftClick().exec();
2270
2523
  * ```
2271
2524
  *
2272
- * ![](https://docs.askui.com/img/gif/mousedoubleleftclick.gif)
2525
+ * ![](https://docs.askui.com/img/gif/mouseDoubleLeftClick.gif)
2273
2526
  *
2274
2527
  * @return {Exec}
2275
2528
  */
@@ -2461,7 +2714,7 @@ class FluentCommand extends FluentBase {
2461
2714
  * await aui.pressAndroidTwoKey('volume_down', 'power').exec();
2462
2715
  * ```
2463
2716
  *
2464
- * ![](https://docs.askui.com/img/gif/pressAndroidTwoKey.gif)
2717
+ * ![](https://docs.askui.com/img/gif/pressAndroidTwoKeys.gif)
2465
2718
  *
2466
2719
  * @param {ANDROID_KEY} first_key - A Android key
2467
2720
  * @param {ANDROID_KEY} second_key - A Android key
@@ -2722,7 +2975,7 @@ class FluentFiltersGetter extends FluentBase {
2722
2975
  * .customElement({
2723
2976
  * customImage: './logo.png', // required
2724
2977
  * name: 'myLogo', // optional
2725
- * threshold: 0.9, // optional, defaults to 0.9
2978
+ * threshold: 0.5, // optional, defaults to 0.5
2726
2979
  * stopThreshold: 0.9, // optional, defaults to 0.9
2727
2980
  * rotationDegreePerStep: 0, // optional, defaults to 0
2728
2981
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
@@ -2738,7 +2991,7 @@ class FluentFiltersGetter extends FluentBase {
2738
2991
  * - **name** (*`string`, optional*):
2739
2992
  * - 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.
2740
2993
  * - **threshold** (*`number`, optional*):
2741
- * - 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`.
2994
+ * - 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`.
2742
2995
  * - **stopThreshold** (*`number`, optional*):
2743
2996
  * - 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`.
2744
2997
  * - **rotationDegreePerStep** (*`number`, optional*):
@@ -2886,7 +3139,7 @@ class FluentFiltersGetter extends FluentBase {
2886
3139
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
2887
3140
  * ```
2888
3141
  *
2889
- * ![](https://docs.askui.com/img/gif/withtextregex.gif)
3142
+ * ![](https://docs.askui.com/img/gif/withTextRegex.gif)
2890
3143
  *
2891
3144
  *
2892
3145
  *
@@ -2918,7 +3171,7 @@ class FluentFiltersGetter extends FluentBase {
2918
3171
  * await aui.moveMouseTo().text().withExactText('Password').exec()
2919
3172
  * ```
2920
3173
  *
2921
- * ![](https://docs.askui.com/img/gif/withexacttext.gif)
3174
+ * ![](https://docs.askui.com/img/gif/withExactText.gif)
2922
3175
  *
2923
3176
  *
2924
3177
  *
@@ -2966,7 +3219,7 @@ class FluentFiltersGetter extends FluentBase {
2966
3219
  * **Important: _Matching only returns the best matching element when you use it with `get()`_**
2967
3220
  *
2968
3221
  * A bit of playing around to find a matching description is sometimes needed:
2969
- * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
3222
+ * For example, `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
2970
3223
  * Generally, the more detail the better.
2971
3224
  *
2972
3225
  * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
@@ -3151,17 +3404,46 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3151
3404
  *
3152
3405
  * **Examples:**
3153
3406
  * ```typescript
3154
- * -------------- -------------- --------------
3155
- * | leftEl | | rightEl0 | | rightEl1 |
3156
- * -------------- -------------- --------------
3407
+ * ---------- --------- ---------
3408
+ * | button | | text0 | | text3 |
3409
+ * ---------- --------- --------- ---------
3410
+ * | text1 | ---------
3411
+ * --------- | text2 |
3412
+ * ---------
3413
+ *
3414
+ * // General explanation for element_center_line
3415
+ * // This will find text0 and text3
3416
+ * ...text().rightOf(..., 'element_center_line').button()
3417
+ *
3418
+ * // General explanation for element_edge_area
3419
+ * // This will find text0, text1 and text3
3420
+ * ...text().rightOf(..., 'element_edge_area').button()
3421
+ *
3422
+ * // General explanation and display_edge_area
3423
+ * // This will find text0, text1, text2 and text3
3424
+ * ...text().rightOf(..., 'display_edge_area').button()
3157
3425
  *
3158
- * // Returns rightEl0 because rightEl0 is the first element right of leftEl
3159
- * ...rightEl().rightOf().leftEl()
3160
- * ...rightEl().rightOf(0).leftEl()
3161
- * // Returns rightEl1 because rightEl1 is the second element right of leftEl
3162
- * ...rightEl().rightOf(1).leftEl()
3163
- * // Returns no element because leftEl is left of rightEl
3164
- * ...leftEl().rightOf().rightEl()
3426
+ * // More examples:
3427
+ * // Returns text0 because it is the first element rightOf button
3428
+ * ...text().rightOf().button()
3429
+ * ...text().rightOf(0).button()
3430
+ * ...text().rightOf(0, 'element_edge_area').button()
3431
+ *
3432
+ * // Returns text3 because it is the second text touched by the
3433
+ * // horizontal line from the center of button
3434
+ * // Notice: text1 is not touched!
3435
+ * ...text().rightOf(1, 'element_center_line').button()
3436
+ *
3437
+ * // Returns text3 because it is the third text touched by the
3438
+ * // vertical area rightOf the y-axis of button
3439
+ * // Notice: text2 is not touched!
3440
+ * ...text().rightOf(2, 'element_edge_area').button()
3441
+ *
3442
+ * // Returns text2 because it is the third element rightOf button
3443
+ * ...text().rightOf(2, 'display_edge_area').button()
3444
+ *
3445
+ * // Returns no element because button is rightOf the texts
3446
+ * ...button().rightOf().text()
3165
3447
  * ```
3166
3448
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
3167
3449
  *
@@ -3194,17 +3476,46 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3194
3476
  *
3195
3477
  * **Examples:**
3196
3478
  * ```typescript
3197
- * -------------- -------------- --------------
3198
- * | leftEl1 | | leftEl0 | | rightEl |
3199
- * -------------- -------------- --------------
3479
+ * --------- --------- ----------
3480
+ * | text3 | | text0 | | button |
3481
+ * --------- --------- --------- ----------
3482
+ * --------- | text1 |
3483
+ * | text2 | ---------
3484
+ * ---------
3485
+ *
3486
+ * // General explanation for element_center_line
3487
+ * // This will find text0 and text3
3488
+ * ...text().leftOf(..., 'element_center_line').button()
3489
+ *
3490
+ * // General explanation for element_edge_area
3491
+ * // This will find text0, text1 and text3
3492
+ * ...text().leftOf(..., 'element_edge_area').button()
3200
3493
  *
3201
- * // Returns leftEl0 because leftEl0 is the first element left of rightEl
3202
- * ...leftEl().leftOf().rightEl()
3203
- * ...leftEl().leftOf(0).rightEl()
3204
- * // Returns leftEl1 because leftEl1 is the second element left of rightEl
3205
- * ...leftEl().leftOf(1).rightEl()
3206
- * // Returns no element because rightEl is left of leftEl
3207
- * ...rightEl().leftOf().leftEl()
3494
+ * // General explanation and display_edge_area
3495
+ * // This will find text0, text1, text2 and text3
3496
+ * ...text().leftOf(..., 'display_edge_area').button()
3497
+ *
3498
+ * // More examples:
3499
+ * // Returns text0 because it is the first element leftOf button
3500
+ * ...text().leftOf().button()
3501
+ * ...text().leftOf(0).button()
3502
+ * ...text().leftOf(0, 'element_edge_area').button()
3503
+ *
3504
+ * // Returns text3 because it is the second text touched by the
3505
+ * // horizontal line from the center of button
3506
+ * // Notice: text1 is not touched!
3507
+ * ...text().leftOf(1, 'element_center_line').button()
3508
+ *
3509
+ * // Returns text3 because it is the third text touched by the
3510
+ * // vertical area leftOf the y-axis of button
3511
+ * // Notice: text2 is not touched!
3512
+ * ...text().leftOf(2, 'element_edge_area').button()
3513
+ *
3514
+ * // Returns text2 because it is the third element leftOf button
3515
+ * ...text().leftOf(2, 'display_edge_area').button()
3516
+ *
3517
+ * // Returns no element because button is rightOf the texts
3518
+ * ...button().leftOf().text()
3208
3519
  * ```
3209
3520
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
3210
3521
  *
@@ -3237,22 +3548,54 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3237
3548
  *
3238
3549
  * **Examples:**
3239
3550
  * ```typescript
3240
- * --------------
3241
- * | text |
3242
- * --------------
3243
- * --------------
3244
- * | button0 |
3245
- * --------------
3246
- * --------------
3247
- * | button1 |
3248
- * --------------
3249
- *
3551
+ * ------------
3552
+ * | text |
3553
+ * ------------
3554
+ * ------------
3555
+ * | button0 |
3556
+ * ------------
3557
+ * -----------
3558
+ * | button1 |
3559
+ * -----------
3560
+ * -----------
3561
+ * | button2 |
3562
+ * -----------
3563
+ * ------------
3564
+ * | button3 |
3565
+ * ------------
3566
+ *
3567
+ * // General explanation for element_center_line
3568
+ * // This will find button0 and button3
3569
+ * ...button().below(..., 'element_center_line').text()
3570
+ *
3571
+ * // General explanation for element_edge_area
3572
+ * // This will find button0, button1 and button3
3573
+ * ...button().below(..., 'element_edge_area').text()
3574
+ *
3575
+ * // General explanation and display_edge_area
3576
+ * // This will find button0, button1, button2 and button3
3577
+ * ...button().below(..., 'display_edge_area').text()
3578
+ *
3579
+ * // More examples:
3250
3580
  * // Returns button0 because button0 is the first button below text
3251
3581
  * ...button().below().text()
3252
3582
  * ...button().below(0).text()
3253
- * // Returns button1 because button1 is the second button below text
3254
- * ...button().below(1).text()
3255
- * // Returns no element because text is above button
3583
+ * ...button().below(0, 'element_edge_area').text()
3584
+ *
3585
+ * // Returns button3 because it is the second button touched by the
3586
+ * // vertical line from the center of text
3587
+ * // Notice: button1 is not touched
3588
+ * ...button().below(1, 'element_center_line').text()
3589
+ *
3590
+ * // Returns button3 because it is the third button touched by the
3591
+ * // vertical area below the x-axis of text
3592
+ * // Notice: button2 is not touched!
3593
+ * ...button().below(2, 'element_edge_area').text()
3594
+ *
3595
+ * // Returns button2 because it is the third element below text
3596
+ * ...button().below(2, 'display_edge_area').text()
3597
+ *
3598
+ * // Returns no element because text is above the buttons
3256
3599
  * ...text().below().button()
3257
3600
  * ```
3258
3601
  * ![](https://docs.askui.com/img/gif/below.gif)
@@ -3285,22 +3628,54 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3285
3628
  *
3286
3629
  * **Examples:**
3287
3630
  * ```typescript
3288
- * --------------
3289
- * | text1 |
3290
- * --------------
3291
- * --------------
3292
- * | text0 |
3293
- * --------------
3294
- * --------------
3295
- * | button |
3296
- * --------------
3297
- *
3298
- * // Returns text0 because text0 is the first element above button
3631
+ * ------------
3632
+ * | text3 |
3633
+ * ------------
3634
+ * ------------
3635
+ * | text2 |
3636
+ * ------------
3637
+ * ------------
3638
+ * | text1 |
3639
+ * ------------
3640
+ * ------------
3641
+ * | text0 |
3642
+ * ------------
3643
+ * ------------
3644
+ * | button |
3645
+ * ------------
3646
+ *
3647
+ * // General explanation for element_center_line
3648
+ * // This will find text0 and text3
3649
+ * ...text().above(..., 'element_center_line').button()
3650
+ *
3651
+ * // General explanation for element_edge_area
3652
+ * // This will find text0, text1 and text3
3653
+ * ...text().above(..., 'element_edge_area').button()
3654
+ *
3655
+ * // General explanation and display_edge_area
3656
+ * // This will find text0, text1, text2 and text3
3657
+ * ...text().above(..., 'display_edge_area').button()
3658
+ *
3659
+ * // More examples:
3660
+ * // Returns text0 because it is the first element above button
3299
3661
  * ...text().above().button()
3300
3662
  * ...text().above(0).button()
3301
- * // Returns text1 because text1 is the second element above button
3302
- * ...text().above(1).button()
3303
- * // Returns no element because button is below text
3663
+ * ...text().above(0, 'element_edge_area').button()
3664
+ *
3665
+ * // Returns text3 because it is the second text touched by the
3666
+ * // vertical line from the center of button
3667
+ * // Notice: text1 is not touched!
3668
+ * ...text().above(1, 'element_center_line').button()
3669
+ *
3670
+ * // Returns text3 because it is the third text touched by the
3671
+ * // vertical area above the x-axis of button
3672
+ * // Notice: text2 is not touched!
3673
+ * ...text().above(2, 'element_edge_area').button()
3674
+ *
3675
+ * // Returns text2 because it is the third element above button
3676
+ * ...text().above(2, 'display_edge_area').button()
3677
+ *
3678
+ * // Returns no element because button is below the texts
3304
3679
  * ...button().above().text()
3305
3680
  * ```
3306
3681
  * ![](https://docs.askui.com/img/gif/above.gif)