askui 0.20.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/cjs/core/annotation/annotation-writer.js.map +1 -0
  2. package/dist/cjs/core/annotation/annotation.js.map +1 -0
  3. package/dist/cjs/core/inference-response/inference-response.js.map +1 -0
  4. package/dist/cjs/core/inference-response/invalid-model-type-error.js.map +1 -0
  5. package/dist/cjs/core/inference-response/model-type.js.map +1 -0
  6. package/dist/cjs/core/model/annotation-result/annotation-interface.js.map +1 -0
  7. package/dist/cjs/core/model/annotation-result/boundary-box.js.map +1 -0
  8. package/dist/cjs/core/model/annotation-result/detected-element.js.map +1 -0
  9. package/dist/cjs/core/model/custom-element-json.js.map +1 -0
  10. package/dist/cjs/core/model/custom-element.js.map +1 -0
  11. package/dist/cjs/core/reporting/default-step.js.map +1 -0
  12. package/dist/cjs/core/reporting/index.js.map +1 -0
  13. package/dist/cjs/core/reporting/instruction.js.map +1 -0
  14. package/dist/cjs/core/reporting/reporter-config.js.map +1 -0
  15. package/dist/cjs/core/reporting/reporter.js.map +1 -0
  16. package/dist/cjs/core/reporting/snapshot-detail-level.js.map +1 -0
  17. package/dist/cjs/core/reporting/snapshot.js.map +1 -0
  18. package/dist/cjs/core/reporting/step-reporter.js.map +1 -0
  19. package/dist/cjs/core/reporting/step-run.js.map +1 -0
  20. package/dist/cjs/core/reporting/step-status-end.js.map +1 -0
  21. package/dist/cjs/core/reporting/step-status.js.map +1 -0
  22. package/dist/cjs/core/reporting/step.js.map +1 -0
  23. package/dist/cjs/core/runner-protocol/index.js.map +1 -0
  24. package/dist/cjs/core/runner-protocol/request/capture-screenshot-request.js.map +1 -0
  25. package/dist/cjs/core/runner-protocol/request/control-request.js.map +1 -0
  26. package/dist/cjs/core/runner-protocol/request/get-server-process-pid.js.map +1 -0
  27. package/dist/cjs/core/runner-protocol/request/index.js.map +1 -0
  28. package/dist/cjs/core/runner-protocol/request/interactive-annotation-request.js.map +1 -0
  29. package/dist/cjs/core/runner-protocol/request/read-recording-request.js.map +1 -0
  30. package/dist/cjs/core/runner-protocol/request/runner-protocol-request.js.map +1 -0
  31. package/dist/cjs/core/runner-protocol/request/start-recording-request.js.map +1 -0
  32. package/dist/cjs/core/runner-protocol/request/stop-recording-request.js.map +1 -0
  33. package/dist/cjs/core/runner-protocol/response/index.js.map +1 -0
  34. package/dist/cjs/core/ui-control-commands/action.js.map +1 -0
  35. package/dist/cjs/core/ui-control-commands/control-command-code.js.map +1 -0
  36. package/dist/cjs/core/ui-control-commands/control-command.js.map +1 -0
  37. package/dist/cjs/core/ui-control-commands/index.js.map +1 -0
  38. package/dist/cjs/core/ui-control-commands/input-event.js.map +1 -0
  39. package/dist/cjs/execution/config-error.js.map +1 -0
  40. package/dist/cjs/execution/control-command-error.js.map +1 -0
  41. package/dist/cjs/execution/credentials-args.js.map +1 -0
  42. package/dist/cjs/execution/dsl.d.ts +202 -61
  43. package/dist/cjs/execution/dsl.js +279 -96
  44. package/dist/cjs/execution/dsl.js.map +1 -0
  45. package/dist/cjs/execution/execution-runtime.js.map +1 -0
  46. package/dist/cjs/execution/index.js.map +1 -0
  47. package/dist/cjs/execution/inference-client.js.map +1 -0
  48. package/dist/cjs/execution/inference-response-error.js.map +1 -0
  49. package/dist/cjs/execution/is-image-required-interface.js.map +1 -0
  50. package/dist/cjs/execution/misc.js.map +1 -0
  51. package/dist/cjs/execution/model-composition-branch.js.map +1 -0
  52. package/dist/cjs/execution/read-environment-credentials.js.map +1 -0
  53. package/dist/cjs/execution/read-recording-response-stream-handler.js.map +1 -0
  54. package/dist/cjs/execution/repeat-error.js.map +1 -0
  55. package/dist/cjs/execution/ui-control-client-dependency-builder.js.map +1 -0
  56. package/dist/cjs/execution/ui-control-client.js.map +1 -0
  57. package/dist/cjs/execution/ui-controller-client-connection-state.js.map +1 -0
  58. package/dist/cjs/execution/ui-controller-client-error.js.map +1 -0
  59. package/dist/cjs/execution/ui-controller-client-interface.js.map +1 -0
  60. package/dist/cjs/execution/ui-controller-client.js.map +1 -0
  61. package/dist/cjs/lib/download-binaries.js.map +1 -0
  62. package/dist/cjs/lib/index.js.map +1 -0
  63. package/dist/cjs/lib/interactive_cli/add-script-package-json.d.ts +1 -0
  64. package/dist/cjs/lib/interactive_cli/add-script-package-json.js +39 -0
  65. package/dist/cjs/lib/interactive_cli/add-script-package-json.js.map +1 -0
  66. package/dist/cjs/lib/interactive_cli/cli-options-interface.js.map +1 -0
  67. package/dist/cjs/lib/interactive_cli/cli.js.map +1 -0
  68. package/dist/cjs/lib/interactive_cli/create-example-project.js.map +1 -0
  69. package/dist/cjs/lib/interactive_cli/index.js.map +1 -0
  70. package/dist/cjs/lib/libfuse-error.js.map +1 -0
  71. package/dist/cjs/lib/logger.js.map +1 -0
  72. package/dist/cjs/lib/timeout-error.js.map +1 -0
  73. package/dist/cjs/lib/ui-controller-args.js.map +1 -0
  74. package/dist/cjs/lib/ui-controller-darwin.js.map +1 -0
  75. package/dist/cjs/lib/ui-controller-facade.js.map +1 -0
  76. package/dist/cjs/lib/ui-controller-linux.js.map +1 -0
  77. package/dist/cjs/lib/ui-controller-win32.js.map +1 -0
  78. package/dist/cjs/lib/ui-controller.js.map +1 -0
  79. package/dist/cjs/lib/unkown-error.js.map +1 -0
  80. package/dist/cjs/lib/wayland-error.js.map +1 -0
  81. package/dist/cjs/main.js.map +1 -0
  82. package/dist/cjs/shared/index.js.map +1 -0
  83. package/dist/cjs/shared/log-levels.js.map +1 -0
  84. package/dist/cjs/shared/proxy-agent-args.js.map +1 -0
  85. package/dist/cjs/utils/analytics/analytics-interface.js.map +1 -0
  86. package/dist/cjs/utils/analytics/analytics.js.map +1 -0
  87. package/dist/cjs/utils/analytics/index.js.map +1 -0
  88. package/dist/cjs/utils/analytics/installation-timestamp-create-error.js.map +1 -0
  89. package/dist/cjs/utils/analytics/installation-timestamp-get-error.js.map +1 -0
  90. package/dist/cjs/utils/analytics/installation-timestamp.js.map +1 -0
  91. package/dist/cjs/utils/analytics/user-identifier-interface.js.map +1 -0
  92. package/dist/cjs/utils/analytics/user-identifier.js.map +1 -0
  93. package/dist/cjs/utils/base_64_image/base-64-image-error.js.map +1 -0
  94. package/dist/cjs/utils/base_64_image/base-64-image-string-error.js.map +1 -0
  95. package/dist/cjs/utils/base_64_image/base-64-image.js.map +1 -0
  96. package/dist/cjs/utils/base_64_image/sharp.js.map +1 -0
  97. package/dist/cjs/utils/http/credentials.js.map +1 -0
  98. package/dist/cjs/utils/http/custom-errors/authentication-http-client-error.js.map +1 -0
  99. package/dist/cjs/utils/http/custom-errors/client-http-client-error.js.map +1 -0
  100. package/dist/cjs/utils/http/custom-errors/general-http-client-error.js.map +1 -0
  101. package/dist/cjs/utils/http/custom-errors/http-client-error.js.map +1 -0
  102. package/dist/cjs/utils/http/custom-errors/index.js.map +1 -0
  103. package/dist/cjs/utils/http/custom-errors/server-http-client-error.js.map +1 -0
  104. package/dist/cjs/utils/http/custom-errors/unkown-http-client-error.js.map +1 -0
  105. package/dist/cjs/utils/http/http-client-got.js.map +1 -0
  106. package/dist/cjs/utils/http/index.js.map +1 -0
  107. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js.map +1 -0
  108. package/dist/cjs/utils/image-resize-errors/index.js.map +1 -0
  109. package/dist/cjs/utils/path.js.map +1 -0
  110. package/dist/cjs/utils/proxy/proxy-builder.js.map +1 -0
  111. package/dist/cjs/utils/resized-image-interface.js.map +1 -0
  112. package/dist/cjs/utils/transformations.js.map +1 -0
  113. package/dist/esm/core/annotation/annotation-writer.js.map +1 -0
  114. package/dist/esm/core/annotation/annotation.js.map +1 -0
  115. package/dist/esm/core/inference-response/inference-response.js.map +1 -0
  116. package/dist/esm/core/inference-response/invalid-model-type-error.js.map +1 -0
  117. package/dist/esm/core/inference-response/model-type.js.map +1 -0
  118. package/dist/esm/core/model/annotation-result/annotation-interface.js.map +1 -0
  119. package/dist/esm/core/model/annotation-result/boundary-box.js.map +1 -0
  120. package/dist/esm/core/model/annotation-result/detected-element.js.map +1 -0
  121. package/dist/esm/core/model/custom-element-json.js.map +1 -0
  122. package/dist/esm/core/model/custom-element.js.map +1 -0
  123. package/dist/esm/core/reporting/default-step.js.map +1 -0
  124. package/dist/esm/core/reporting/index.js.map +1 -0
  125. package/dist/esm/core/reporting/instruction.js.map +1 -0
  126. package/dist/esm/core/reporting/reporter-config.js.map +1 -0
  127. package/dist/esm/core/reporting/reporter.js.map +1 -0
  128. package/dist/esm/core/reporting/snapshot-detail-level.js.map +1 -0
  129. package/dist/esm/core/reporting/snapshot.js.map +1 -0
  130. package/dist/esm/core/reporting/step-reporter.js.map +1 -0
  131. package/dist/esm/core/reporting/step-run.js.map +1 -0
  132. package/dist/esm/core/reporting/step-status-end.js.map +1 -0
  133. package/dist/esm/core/reporting/step-status.js.map +1 -0
  134. package/dist/esm/core/reporting/step.js.map +1 -0
  135. package/dist/esm/core/runner-protocol/index.js.map +1 -0
  136. package/dist/esm/core/runner-protocol/request/capture-screenshot-request.js.map +1 -0
  137. package/dist/esm/core/runner-protocol/request/control-request.js.map +1 -0
  138. package/dist/esm/core/runner-protocol/request/get-server-process-pid.js.map +1 -0
  139. package/dist/esm/core/runner-protocol/request/index.js.map +1 -0
  140. package/dist/esm/core/runner-protocol/request/interactive-annotation-request.js.map +1 -0
  141. package/dist/esm/core/runner-protocol/request/read-recording-request.js.map +1 -0
  142. package/dist/esm/core/runner-protocol/request/runner-protocol-request.js.map +1 -0
  143. package/dist/esm/core/runner-protocol/request/start-recording-request.js.map +1 -0
  144. package/dist/esm/core/runner-protocol/request/stop-recording-request.js.map +1 -0
  145. package/dist/esm/core/runner-protocol/response/index.js.map +1 -0
  146. package/dist/esm/core/ui-control-commands/action.js.map +1 -0
  147. package/dist/esm/core/ui-control-commands/control-command-code.js.map +1 -0
  148. package/dist/esm/core/ui-control-commands/control-command.js.map +1 -0
  149. package/dist/esm/core/ui-control-commands/index.js.map +1 -0
  150. package/dist/esm/core/ui-control-commands/input-event.js.map +1 -0
  151. package/dist/esm/execution/config-error.js.map +1 -0
  152. package/dist/esm/execution/control-command-error.js.map +1 -0
  153. package/dist/esm/execution/credentials-args.js.map +1 -0
  154. package/dist/esm/execution/dsl.d.ts +202 -61
  155. package/dist/esm/execution/dsl.js +279 -96
  156. package/dist/esm/execution/dsl.js.map +1 -0
  157. package/dist/esm/execution/execution-runtime.js.map +1 -0
  158. package/dist/esm/execution/index.js.map +1 -0
  159. package/dist/esm/execution/inference-client.js.map +1 -0
  160. package/dist/esm/execution/inference-response-error.js.map +1 -0
  161. package/dist/esm/execution/is-image-required-interface.js.map +1 -0
  162. package/dist/esm/execution/misc.js.map +1 -0
  163. package/dist/esm/execution/model-composition-branch.js.map +1 -0
  164. package/dist/esm/execution/read-environment-credentials.js.map +1 -0
  165. package/dist/esm/execution/read-recording-response-stream-handler.js.map +1 -0
  166. package/dist/esm/execution/repeat-error.js.map +1 -0
  167. package/dist/esm/execution/ui-control-client-dependency-builder.js.map +1 -0
  168. package/dist/esm/execution/ui-control-client.js.map +1 -0
  169. package/dist/esm/execution/ui-controller-client-connection-state.js.map +1 -0
  170. package/dist/esm/execution/ui-controller-client-error.js.map +1 -0
  171. package/dist/esm/execution/ui-controller-client-interface.js.map +1 -0
  172. package/dist/esm/execution/ui-controller-client.js.map +1 -0
  173. package/dist/esm/lib/download-binaries.js.map +1 -0
  174. package/dist/esm/lib/index.js.map +1 -0
  175. package/dist/esm/lib/interactive_cli/add-script-package-json.d.ts +1 -0
  176. package/dist/esm/lib/interactive_cli/add-script-package-json.js +32 -0
  177. package/dist/esm/lib/interactive_cli/add-script-package-json.js.map +1 -0
  178. package/dist/esm/lib/interactive_cli/cli-options-interface.js.map +1 -0
  179. package/dist/esm/lib/interactive_cli/cli.js.map +1 -0
  180. package/dist/esm/lib/interactive_cli/create-example-project.js.map +1 -0
  181. package/dist/esm/lib/interactive_cli/index.js.map +1 -0
  182. package/dist/esm/lib/libfuse-error.js.map +1 -0
  183. package/dist/esm/lib/logger.js.map +1 -0
  184. package/dist/esm/lib/timeout-error.js.map +1 -0
  185. package/dist/esm/lib/ui-controller-args.js.map +1 -0
  186. package/dist/esm/lib/ui-controller-darwin.js.map +1 -0
  187. package/dist/esm/lib/ui-controller-facade.js.map +1 -0
  188. package/dist/esm/lib/ui-controller-linux.js.map +1 -0
  189. package/dist/esm/lib/ui-controller-win32.js.map +1 -0
  190. package/dist/esm/lib/ui-controller.js.map +1 -0
  191. package/dist/esm/lib/unkown-error.js.map +1 -0
  192. package/dist/esm/lib/wayland-error.js.map +1 -0
  193. package/dist/esm/main.js.map +1 -0
  194. package/dist/esm/shared/index.js.map +1 -0
  195. package/dist/esm/shared/log-levels.js.map +1 -0
  196. package/dist/esm/shared/proxy-agent-args.js.map +1 -0
  197. package/dist/esm/utils/analytics/analytics-interface.js.map +1 -0
  198. package/dist/esm/utils/analytics/analytics.js.map +1 -0
  199. package/dist/esm/utils/analytics/index.js.map +1 -0
  200. package/dist/esm/utils/analytics/installation-timestamp-create-error.js.map +1 -0
  201. package/dist/esm/utils/analytics/installation-timestamp-get-error.js.map +1 -0
  202. package/dist/esm/utils/analytics/installation-timestamp.js.map +1 -0
  203. package/dist/esm/utils/analytics/user-identifier-interface.js.map +1 -0
  204. package/dist/esm/utils/analytics/user-identifier.js.map +1 -0
  205. package/dist/esm/utils/base_64_image/base-64-image-error.js.map +1 -0
  206. package/dist/esm/utils/base_64_image/base-64-image-string-error.js.map +1 -0
  207. package/dist/esm/utils/base_64_image/base-64-image.js.map +1 -0
  208. package/dist/esm/utils/base_64_image/sharp.js.map +1 -0
  209. package/dist/esm/utils/http/credentials.js.map +1 -0
  210. package/dist/esm/utils/http/custom-errors/authentication-http-client-error.js.map +1 -0
  211. package/dist/esm/utils/http/custom-errors/client-http-client-error.js.map +1 -0
  212. package/dist/esm/utils/http/custom-errors/general-http-client-error.js.map +1 -0
  213. package/dist/esm/utils/http/custom-errors/http-client-error.js.map +1 -0
  214. package/dist/esm/utils/http/custom-errors/index.js.map +1 -0
  215. package/dist/esm/utils/http/custom-errors/server-http-client-error.js.map +1 -0
  216. package/dist/esm/utils/http/custom-errors/unkown-http-client-error.js.map +1 -0
  217. package/dist/esm/utils/http/http-client-got.js.map +1 -0
  218. package/dist/esm/utils/http/index.js.map +1 -0
  219. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js.map +1 -0
  220. package/dist/esm/utils/image-resize-errors/index.js.map +1 -0
  221. package/dist/esm/utils/path.js.map +1 -0
  222. package/dist/esm/utils/proxy/proxy-builder.js.map +1 -0
  223. package/dist/esm/utils/resized-image-interface.js.map +1 -0
  224. package/dist/esm/utils/transformations.js.map +1 -0
  225. package/dist/example_projects_templates/configs/jasmine.config.json +12 -0
  226. package/package.json +3 -3
@@ -1,9 +1,4 @@
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
7
2
  Object.defineProperty(exports, "__esModule", { value: true });
8
3
  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;
9
4
  var Separators;
@@ -30,8 +25,12 @@ class FluentBase {
30
25
  const newParamsList = FluentBase.addParams(paramsList, this._params);
31
26
  if (this instanceof FluentCommand) {
32
27
  const fluentCommand = this;
33
- const customElements = newParamsList.has('customElement') ? newParamsList.get('customElement') : [];
34
- const aiElementNames = newParamsList.has('aiElementName') ? newParamsList.get('aiElementName') : [];
28
+ const customElements = newParamsList.has('customElement')
29
+ ? newParamsList.get('customElement')
30
+ : [];
31
+ const aiElementNames = newParamsList.has('aiElementName')
32
+ ? newParamsList.get('aiElementName')
33
+ : [];
35
34
  return fluentCommand.fluentCommandExecutor(newCurrentInstruction.trim(), {
36
35
  customElementsJson: customElements,
37
36
  aiElementNames,
@@ -47,8 +46,12 @@ class FluentBase {
47
46
  const newParamsList = FluentBase.addParams(paramsList, this._params);
48
47
  if (this instanceof Getter) {
49
48
  const getter = this;
50
- const customElements = newParamsList.has('customElement') ? newParamsList.get('customElement') : [];
51
- const aiElementNames = newParamsList.has('aiElementName') ? newParamsList.get('aiElementName') : [];
49
+ const customElements = newParamsList.has('customElement')
50
+ ? newParamsList.get('customElement')
51
+ : [];
52
+ const aiElementNames = newParamsList.has('aiElementName')
53
+ ? newParamsList.get('aiElementName')
54
+ : [];
52
55
  return getter.getterExecutor(newCurrentInstruction.trim(), {
53
56
  customElementsJson: customElements,
54
57
  aiElementNames,
@@ -59,8 +62,12 @@ class FluentBase {
59
62
  }
60
63
  return this.prev.getterStringBuilder(newCurrentInstruction, newParamsList);
61
64
  }
62
- get textStr() { return this._textStr; }
63
- get params() { return this._params; }
65
+ get textStr() {
66
+ return this._textStr;
67
+ }
68
+ get params() {
69
+ return this._params;
70
+ }
64
71
  }
65
72
  class Exec extends FluentBase {
66
73
  exec() {
@@ -208,6 +215,7 @@ class FluentFilters extends FluentBase {
208
215
  return new FluentFiltersOrRelations(this);
209
216
  }
210
217
  /**
218
+ * Filters for a UI element 'table'.
211
219
  *
212
220
  * @return {FluentFiltersOrRelations}
213
221
  */
@@ -236,6 +244,8 @@ class FluentFilters extends FluentBase {
236
244
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
237
245
  * ```
238
246
  *
247
+ * @param {string} [text] - A text to be matched.
248
+ *
239
249
  * @return {FluentFiltersOrRelations}
240
250
  */
241
251
  text(text) {
@@ -268,9 +278,9 @@ class FluentFilters extends FluentBase {
268
278
  return new FluentFiltersOrRelations(this);
269
279
  }
270
280
  /**
271
- * Filters for a 'custom element', that is a UI element which is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
281
+ * Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
272
282
  *
273
- * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
283
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
274
284
  *
275
285
  * **Example**
276
286
  * ```typescript
@@ -301,7 +311,7 @@ class FluentFilters extends FluentBase {
301
311
  * - **rotationDegreePerStep** (*`number`, optional*):
302
312
  * - Step size in rotation degree. Rotates the custom image by this step size until 360° is exceeded. The range is from `0` to `360`. Defaults to `0`.
303
313
  * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
304
- * - The color compare style. 'edges' compares only edges, 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three colors (red, green, blue). Defaults to 'grayscale'.
314
+ * - The color compare style. `'edges'` compares only edges, `'greyscale'` compares the brightness of each pixel whereas `'RGB'` compares all three colors (red, green, blue). Defaults to `'grayscale'`.
305
315
  *
306
316
  *
307
317
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -316,7 +326,13 @@ class FluentFilters extends FluentBase {
316
326
  return new FluentFiltersOrRelations(this);
317
327
  }
318
328
  /**
319
- * Detects an AI Element created with the workflow creator.
329
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
330
+ *
331
+ * **Examples:**
332
+ *
333
+ * ```typescript
334
+ * await aui.click().aiElement('askui-logo').exec();
335
+ * ```
320
336
  *
321
337
  * @param {string} aiElementName - Name of the AI Element.
322
338
  *
@@ -404,13 +420,13 @@ class FluentFilters extends FluentBase {
404
420
  * 'other' === withText('text') => false
405
421
  *
406
422
  * // optional parameter: similarity_score
407
- * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
408
- * '978-0-201-00650-6' == withText('978-0-201-00', 90) => false with 82.76 < 90 similarity
409
- * '978-0-201-00650-6' == withText('978-0-201-00', 90) => true with 93.75 < 90 similarity
423
+ * '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
424
+ * '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
410
425
  * ```
411
426
  * ![](https://docs.askui.com/img/gif/withText.gif)
412
427
  *
413
428
  * @param {string} text - A text to be matched.
429
+ * @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
414
430
  *
415
431
  * @return {FluentFiltersOrRelations}
416
432
  */
@@ -514,9 +530,13 @@ class FluentFilters extends FluentBase {
514
530
  * The text description inside the `matching()` should describe the element visually.
515
531
  * It understands color, some famous company/product names, general descriptions.
516
532
  *
517
- * It sometimes requires a bit of playing around to find a matching description:
518
- * E.g. `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
519
- * Generally the more detail the better.
533
+ * **Important: _Matching only returns the best matching element when you use it with `get()`_**
534
+ *
535
+ * 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.
537
+ * Generally, the more detail the better.
538
+ *
539
+ * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
520
540
  *
521
541
  * **Examples:**
522
542
  * ```typescript
@@ -689,7 +709,12 @@ class FluentFiltersOrRelations extends FluentFilters {
689
709
  /**
690
710
  * Filters for an element right of another element.
691
711
  *
692
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
712
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
713
+ *
714
+ * Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
715
+ * - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
716
+ * - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
717
+ * - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
693
718
  *
694
719
  * **Examples:**
695
720
  * ```typescript
@@ -707,21 +732,32 @@ class FluentFiltersOrRelations extends FluentFilters {
707
732
  * ```
708
733
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
709
734
  *
735
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
736
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
737
+ *
710
738
  * @return {FluentFilters}
711
739
  */
712
- rightOf(optionalIndex = 0) {
740
+ rightOf(index = 0, intersection_area = 'element_edge_area') {
713
741
  this._textStr = '';
714
- if (optionalIndex !== undefined) {
715
- this._textStr += `index ${optionalIndex}`;
742
+ if (index !== undefined) {
743
+ this._textStr += `index ${index}`;
716
744
  }
717
745
  this._textStr += ' right';
718
746
  this._textStr += ' of';
747
+ if (intersection_area !== undefined) {
748
+ this._textStr += ` intersection_area ${intersection_area}`;
749
+ }
719
750
  return new FluentFilters(this);
720
751
  }
721
752
  /**
722
753
  * Filters for an element left of another element.
723
754
  *
724
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
755
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
756
+ *
757
+ * Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
758
+ * - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
759
+ * - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
760
+ * - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
725
761
  *
726
762
  * **Examples:**
727
763
  * ```typescript
@@ -739,21 +775,32 @@ class FluentFiltersOrRelations extends FluentFilters {
739
775
  * ```
740
776
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
741
777
  *
778
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
779
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
780
+ *
742
781
  * @return {FluentFilters}
743
782
  */
744
- leftOf(optionalIndex = 0) {
783
+ leftOf(index = 0, intersection_area = 'element_edge_area') {
745
784
  this._textStr = '';
746
- if (optionalIndex !== undefined) {
747
- this._textStr += `index ${optionalIndex}`;
785
+ if (index !== undefined) {
786
+ this._textStr += `index ${index}`;
748
787
  }
749
788
  this._textStr += ' left';
750
789
  this._textStr += ' of';
790
+ if (intersection_area !== undefined) {
791
+ this._textStr += ` intersection_area ${intersection_area}`;
792
+ }
751
793
  return new FluentFilters(this);
752
794
  }
753
795
  /**
754
796
  * Filters for an element below another element.
755
797
  *
756
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
798
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
799
+ *
800
+ * Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
801
+ * - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
802
+ * - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
803
+ * - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
757
804
  *
758
805
  * **Examples:**
759
806
  * ```typescript
@@ -777,20 +824,31 @@ class FluentFiltersOrRelations extends FluentFilters {
777
824
  * ```
778
825
  * ![](https://docs.askui.com/img/gif/below.gif)
779
826
  *
827
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
828
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
829
+ *
780
830
  * @return {FluentFilters}
781
831
  */
782
- below(optionalIndex = 0) {
832
+ below(index = 0, intersection_area = 'element_edge_area') {
783
833
  this._textStr = '';
784
- if (optionalIndex !== undefined) {
785
- this._textStr += `index ${optionalIndex}`;
834
+ if (index !== undefined) {
835
+ this._textStr += `index ${index}`;
786
836
  }
787
837
  this._textStr += ' below';
838
+ if (intersection_area !== undefined) {
839
+ this._textStr += ` intersection_area ${intersection_area}`;
840
+ }
788
841
  return new FluentFilters(this);
789
842
  }
790
843
  /**
791
844
  * Filters for an element above another element.
792
845
  *
793
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
846
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
847
+ *
848
+ * Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
849
+ * - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
850
+ * - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
851
+ * - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
794
852
  *
795
853
  * **Examples:**
796
854
  * ```typescript
@@ -814,14 +872,20 @@ class FluentFiltersOrRelations extends FluentFilters {
814
872
  * ```
815
873
  * ![](https://docs.askui.com/img/gif/above.gif)
816
874
  *
875
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
876
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
877
+ *
817
878
  * @return {FluentFilters}
818
879
  */
819
- above(optionalIndex = 0) {
880
+ above(index = 0, intersection_area = 'element_edge_area') {
820
881
  this._textStr = '';
821
- if (optionalIndex !== undefined) {
822
- this._textStr += `index ${optionalIndex}`;
882
+ if (index !== undefined) {
883
+ this._textStr += `index ${index}`;
823
884
  }
824
885
  this._textStr += ' above';
886
+ if (intersection_area !== undefined) {
887
+ this._textStr += ` intersection_area ${intersection_area}`;
888
+ }
825
889
  return new FluentFilters(this);
826
890
  }
827
891
  /**
@@ -1027,6 +1091,7 @@ class FluentFiltersCondition extends FluentBase {
1027
1091
  return new FluentFiltersOrRelationsCondition(this);
1028
1092
  }
1029
1093
  /**
1094
+ * Filters for a UI element 'table'.
1030
1095
  *
1031
1096
  * @return {FluentFiltersOrRelationsCondition}
1032
1097
  */
@@ -1055,6 +1120,8 @@ class FluentFiltersCondition extends FluentBase {
1055
1120
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
1056
1121
  * ```
1057
1122
  *
1123
+ * @param {string} [text] - A text to be matched.
1124
+ *
1058
1125
  * @return {FluentFiltersOrRelationsCondition}
1059
1126
  */
1060
1127
  text(text) {
@@ -1087,9 +1154,9 @@ class FluentFiltersCondition extends FluentBase {
1087
1154
  return new FluentFiltersOrRelationsCondition(this);
1088
1155
  }
1089
1156
  /**
1090
- * Filters for a 'custom element', that is a UI element which is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
1157
+ * Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
1091
1158
  *
1092
- * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
1159
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
1093
1160
  *
1094
1161
  * **Example**
1095
1162
  * ```typescript
@@ -1120,7 +1187,7 @@ class FluentFiltersCondition extends FluentBase {
1120
1187
  * - **rotationDegreePerStep** (*`number`, optional*):
1121
1188
  * - Step size in rotation degree. Rotates the custom image by this step size until 360° is exceeded. The range is from `0` to `360`. Defaults to `0`.
1122
1189
  * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
1123
- * - The color compare style. 'edges' compares only edges, 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three colors (red, green, blue). Defaults to 'grayscale'.
1190
+ * - The color compare style. `'edges'` compares only edges, `'greyscale'` compares the brightness of each pixel whereas `'RGB'` compares all three colors (red, green, blue). Defaults to `'grayscale'`.
1124
1191
  *
1125
1192
  *
1126
1193
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -1135,7 +1202,13 @@ class FluentFiltersCondition extends FluentBase {
1135
1202
  return new FluentFiltersOrRelationsCondition(this);
1136
1203
  }
1137
1204
  /**
1138
- * Detects an AI Element created with the workflow creator.
1205
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
1206
+ *
1207
+ * **Examples:**
1208
+ *
1209
+ * ```typescript
1210
+ * await aui.click().aiElement('askui-logo').exec();
1211
+ * ```
1139
1212
  *
1140
1213
  * @param {string} aiElementName - Name of the AI Element.
1141
1214
  *
@@ -1223,13 +1296,13 @@ class FluentFiltersCondition extends FluentBase {
1223
1296
  * 'other' === withText('text') => false
1224
1297
  *
1225
1298
  * // optional parameter: similarity_score
1226
- * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
1227
- * '978-0-201-00650-6' == withText('978-0-201-00', 90) => false with 82.76 < 90 similarity
1228
- * '978-0-201-00650-6' == withText('978-0-201-00', 90) => true with 93.75 < 90 similarity
1299
+ * '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
1300
+ * '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
1229
1301
  * ```
1230
1302
  * ![](https://docs.askui.com/img/gif/withText.gif)
1231
1303
  *
1232
1304
  * @param {string} text - A text to be matched.
1305
+ * @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
1233
1306
  *
1234
1307
  * @return {FluentFiltersOrRelationsCondition}
1235
1308
  */
@@ -1333,9 +1406,13 @@ class FluentFiltersCondition extends FluentBase {
1333
1406
  * The text description inside the `matching()` should describe the element visually.
1334
1407
  * It understands color, some famous company/product names, general descriptions.
1335
1408
  *
1336
- * It sometimes requires a bit of playing around to find a matching description:
1337
- * E.g. `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
1338
- * Generally the more detail the better.
1409
+ * **Important: _Matching only returns the best matching element when you use it with `get()`_**
1410
+ *
1411
+ * 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.
1413
+ * Generally, the more detail the better.
1414
+ *
1415
+ * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
1339
1416
  *
1340
1417
  * **Examples:**
1341
1418
  * ```typescript
@@ -1508,7 +1585,12 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1508
1585
  /**
1509
1586
  * Filters for an element right of another element.
1510
1587
  *
1511
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1588
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1589
+ *
1590
+ * Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
1591
+ * - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
1592
+ * - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
1593
+ * - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
1512
1594
  *
1513
1595
  * **Examples:**
1514
1596
  * ```typescript
@@ -1526,21 +1608,32 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1526
1608
  * ```
1527
1609
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
1528
1610
  *
1611
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1612
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1613
+ *
1529
1614
  * @return {FluentFiltersCondition}
1530
1615
  */
1531
- rightOf(optionalIndex = 0) {
1616
+ rightOf(index = 0, intersection_area = 'element_edge_area') {
1532
1617
  this._textStr = '';
1533
- if (optionalIndex !== undefined) {
1534
- this._textStr += `index ${optionalIndex}`;
1618
+ if (index !== undefined) {
1619
+ this._textStr += `index ${index}`;
1535
1620
  }
1536
1621
  this._textStr += ' right';
1537
1622
  this._textStr += ' of';
1623
+ if (intersection_area !== undefined) {
1624
+ this._textStr += ` intersection_area ${intersection_area}`;
1625
+ }
1538
1626
  return new FluentFiltersCondition(this);
1539
1627
  }
1540
1628
  /**
1541
1629
  * Filters for an element left of another element.
1542
1630
  *
1543
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1631
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1632
+ *
1633
+ * Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
1634
+ * - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
1635
+ * - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
1636
+ * - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
1544
1637
  *
1545
1638
  * **Examples:**
1546
1639
  * ```typescript
@@ -1558,21 +1651,32 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1558
1651
  * ```
1559
1652
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
1560
1653
  *
1654
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1655
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1656
+ *
1561
1657
  * @return {FluentFiltersCondition}
1562
1658
  */
1563
- leftOf(optionalIndex = 0) {
1659
+ leftOf(index = 0, intersection_area = 'element_edge_area') {
1564
1660
  this._textStr = '';
1565
- if (optionalIndex !== undefined) {
1566
- this._textStr += `index ${optionalIndex}`;
1661
+ if (index !== undefined) {
1662
+ this._textStr += `index ${index}`;
1567
1663
  }
1568
1664
  this._textStr += ' left';
1569
1665
  this._textStr += ' of';
1666
+ if (intersection_area !== undefined) {
1667
+ this._textStr += ` intersection_area ${intersection_area}`;
1668
+ }
1570
1669
  return new FluentFiltersCondition(this);
1571
1670
  }
1572
1671
  /**
1573
1672
  * Filters for an element below another element.
1574
1673
  *
1575
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1674
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1675
+ *
1676
+ * Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
1677
+ * - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
1678
+ * - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
1679
+ * - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
1576
1680
  *
1577
1681
  * **Examples:**
1578
1682
  * ```typescript
@@ -1596,20 +1700,31 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1596
1700
  * ```
1597
1701
  * ![](https://docs.askui.com/img/gif/below.gif)
1598
1702
  *
1703
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1704
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1705
+ *
1599
1706
  * @return {FluentFiltersCondition}
1600
1707
  */
1601
- below(optionalIndex = 0) {
1708
+ below(index = 0, intersection_area = 'element_edge_area') {
1602
1709
  this._textStr = '';
1603
- if (optionalIndex !== undefined) {
1604
- this._textStr += `index ${optionalIndex}`;
1710
+ if (index !== undefined) {
1711
+ this._textStr += `index ${index}`;
1605
1712
  }
1606
1713
  this._textStr += ' below';
1714
+ if (intersection_area !== undefined) {
1715
+ this._textStr += ` intersection_area ${intersection_area}`;
1716
+ }
1607
1717
  return new FluentFiltersCondition(this);
1608
1718
  }
1609
1719
  /**
1610
1720
  * Filters for an element above another element.
1611
1721
  *
1612
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1722
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1723
+ *
1724
+ * Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
1725
+ * - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
1726
+ * - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
1727
+ * - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
1613
1728
  *
1614
1729
  * **Examples:**
1615
1730
  * ```typescript
@@ -1633,14 +1748,20 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1633
1748
  * ```
1634
1749
  * ![](https://docs.askui.com/img/gif/above.gif)
1635
1750
  *
1751
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1752
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1753
+ *
1636
1754
  * @return {FluentFiltersCondition}
1637
1755
  */
1638
- above(optionalIndex = 0) {
1756
+ above(index = 0, intersection_area = 'element_edge_area') {
1639
1757
  this._textStr = '';
1640
- if (optionalIndex !== undefined) {
1641
- this._textStr += `index ${optionalIndex}`;
1758
+ if (index !== undefined) {
1759
+ this._textStr += `index ${index}`;
1642
1760
  }
1643
1761
  this._textStr += ' above';
1762
+ if (intersection_area !== undefined) {
1763
+ this._textStr += ` intersection_area ${intersection_area}`;
1764
+ }
1644
1765
  return new FluentFiltersCondition(this);
1645
1766
  }
1646
1767
  /**
@@ -2046,7 +2167,7 @@ class FluentCommand extends FluentBase {
2046
2167
  return new Exec(this);
2047
2168
  }
2048
2169
  /**
2049
- * Executes a shell command on the device your UiController is connected to.
2170
+ * Executes a shell command on the device your AskUI Controller is connected to.
2050
2171
  *
2051
2172
  * **Example:**
2052
2173
  * ```typescript
@@ -2527,6 +2648,7 @@ class FluentFiltersGetter extends FluentBase {
2527
2648
  return new FluentFiltersOrRelationsGetter(this);
2528
2649
  }
2529
2650
  /**
2651
+ * Filters for a UI element 'table'.
2530
2652
  *
2531
2653
  * @return {FluentFiltersOrRelationsGetter}
2532
2654
  */
@@ -2555,6 +2677,8 @@ class FluentFiltersGetter extends FluentBase {
2555
2677
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
2556
2678
  * ```
2557
2679
  *
2680
+ * @param {string} [text] - A text to be matched.
2681
+ *
2558
2682
  * @return {FluentFiltersOrRelationsGetter}
2559
2683
  */
2560
2684
  text(text) {
@@ -2587,9 +2711,9 @@ class FluentFiltersGetter extends FluentBase {
2587
2711
  return new FluentFiltersOrRelationsGetter(this);
2588
2712
  }
2589
2713
  /**
2590
- * Filters for a 'custom element', that is a UI element which is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
2714
+ * Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
2591
2715
  *
2592
- * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
2716
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
2593
2717
  *
2594
2718
  * **Example**
2595
2719
  * ```typescript
@@ -2620,7 +2744,7 @@ class FluentFiltersGetter extends FluentBase {
2620
2744
  * - **rotationDegreePerStep** (*`number`, optional*):
2621
2745
  * - Step size in rotation degree. Rotates the custom image by this step size until 360° is exceeded. The range is from `0` to `360`. Defaults to `0`.
2622
2746
  * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
2623
- * - The color compare style. 'edges' compares only edges, 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three colors (red, green, blue). Defaults to 'grayscale'.
2747
+ * - The color compare style. `'edges'` compares only edges, `'greyscale'` compares the brightness of each pixel whereas `'RGB'` compares all three colors (red, green, blue). Defaults to `'grayscale'`.
2624
2748
  *
2625
2749
  *
2626
2750
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -2635,7 +2759,13 @@ class FluentFiltersGetter extends FluentBase {
2635
2759
  return new FluentFiltersOrRelationsGetter(this);
2636
2760
  }
2637
2761
  /**
2638
- * Detects an AI Element created with the workflow creator.
2762
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
2763
+ *
2764
+ * **Examples:**
2765
+ *
2766
+ * ```typescript
2767
+ * await aui.click().aiElement('askui-logo').exec();
2768
+ * ```
2639
2769
  *
2640
2770
  * @param {string} aiElementName - Name of the AI Element.
2641
2771
  *
@@ -2723,13 +2853,13 @@ class FluentFiltersGetter extends FluentBase {
2723
2853
  * 'other' === withText('text') => false
2724
2854
  *
2725
2855
  * // optional parameter: similarity_score
2726
- * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
2727
- * '978-0-201-00650-6' == withText('978-0-201-00', 90) => false with 82.76 < 90 similarity
2728
- * '978-0-201-00650-6' == withText('978-0-201-00', 90) => true with 93.75 < 90 similarity
2856
+ * '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
2857
+ * '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
2729
2858
  * ```
2730
2859
  * ![](https://docs.askui.com/img/gif/withText.gif)
2731
2860
  *
2732
2861
  * @param {string} text - A text to be matched.
2862
+ * @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
2733
2863
  *
2734
2864
  * @return {FluentFiltersOrRelationsGetter}
2735
2865
  */
@@ -2833,9 +2963,13 @@ class FluentFiltersGetter extends FluentBase {
2833
2963
  * The text description inside the `matching()` should describe the element visually.
2834
2964
  * It understands color, some famous company/product names, general descriptions.
2835
2965
  *
2836
- * It sometimes requires a bit of playing around to find a matching description:
2837
- * E.g. `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
2838
- * Generally the more detail the better.
2966
+ * **Important: _Matching only returns the best matching element when you use it with `get()`_**
2967
+ *
2968
+ * 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.
2970
+ * Generally, the more detail the better.
2971
+ *
2972
+ * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
2839
2973
  *
2840
2974
  * **Examples:**
2841
2975
  * ```typescript
@@ -3008,7 +3142,12 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3008
3142
  /**
3009
3143
  * Filters for an element right of another element.
3010
3144
  *
3011
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3145
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3146
+ *
3147
+ * Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
3148
+ * - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
3149
+ * - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
3150
+ * - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
3012
3151
  *
3013
3152
  * **Examples:**
3014
3153
  * ```typescript
@@ -3026,21 +3165,32 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3026
3165
  * ```
3027
3166
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
3028
3167
  *
3168
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3169
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3170
+ *
3029
3171
  * @return {FluentFiltersGetter}
3030
3172
  */
3031
- rightOf(optionalIndex = 0) {
3173
+ rightOf(index = 0, intersection_area = 'element_edge_area') {
3032
3174
  this._textStr = '';
3033
- if (optionalIndex !== undefined) {
3034
- this._textStr += `index ${optionalIndex}`;
3175
+ if (index !== undefined) {
3176
+ this._textStr += `index ${index}`;
3035
3177
  }
3036
3178
  this._textStr += ' right';
3037
3179
  this._textStr += ' of';
3180
+ if (intersection_area !== undefined) {
3181
+ this._textStr += ` intersection_area ${intersection_area}`;
3182
+ }
3038
3183
  return new FluentFiltersGetter(this);
3039
3184
  }
3040
3185
  /**
3041
3186
  * Filters for an element left of another element.
3042
3187
  *
3043
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3188
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3189
+ *
3190
+ * Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
3191
+ * - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
3192
+ * - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
3193
+ * - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
3044
3194
  *
3045
3195
  * **Examples:**
3046
3196
  * ```typescript
@@ -3058,21 +3208,32 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3058
3208
  * ```
3059
3209
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
3060
3210
  *
3211
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3212
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3213
+ *
3061
3214
  * @return {FluentFiltersGetter}
3062
3215
  */
3063
- leftOf(optionalIndex = 0) {
3216
+ leftOf(index = 0, intersection_area = 'element_edge_area') {
3064
3217
  this._textStr = '';
3065
- if (optionalIndex !== undefined) {
3066
- this._textStr += `index ${optionalIndex}`;
3218
+ if (index !== undefined) {
3219
+ this._textStr += `index ${index}`;
3067
3220
  }
3068
3221
  this._textStr += ' left';
3069
3222
  this._textStr += ' of';
3223
+ if (intersection_area !== undefined) {
3224
+ this._textStr += ` intersection_area ${intersection_area}`;
3225
+ }
3070
3226
  return new FluentFiltersGetter(this);
3071
3227
  }
3072
3228
  /**
3073
3229
  * Filters for an element below another element.
3074
3230
  *
3075
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3231
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3232
+ *
3233
+ * Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
3234
+ * - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
3235
+ * - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
3236
+ * - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
3076
3237
  *
3077
3238
  * **Examples:**
3078
3239
  * ```typescript
@@ -3096,20 +3257,31 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3096
3257
  * ```
3097
3258
  * ![](https://docs.askui.com/img/gif/below.gif)
3098
3259
  *
3260
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3261
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3262
+ *
3099
3263
  * @return {FluentFiltersGetter}
3100
3264
  */
3101
- below(optionalIndex = 0) {
3265
+ below(index = 0, intersection_area = 'element_edge_area') {
3102
3266
  this._textStr = '';
3103
- if (optionalIndex !== undefined) {
3104
- this._textStr += `index ${optionalIndex}`;
3267
+ if (index !== undefined) {
3268
+ this._textStr += `index ${index}`;
3105
3269
  }
3106
3270
  this._textStr += ' below';
3271
+ if (intersection_area !== undefined) {
3272
+ this._textStr += ` intersection_area ${intersection_area}`;
3273
+ }
3107
3274
  return new FluentFiltersGetter(this);
3108
3275
  }
3109
3276
  /**
3110
3277
  * Filters for an element above another element.
3111
3278
  *
3112
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3279
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3280
+ *
3281
+ * Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
3282
+ * - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
3283
+ * - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
3284
+ * - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
3113
3285
  *
3114
3286
  * **Examples:**
3115
3287
  * ```typescript
@@ -3133,14 +3305,20 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3133
3305
  * ```
3134
3306
  * ![](https://docs.askui.com/img/gif/above.gif)
3135
3307
  *
3308
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3309
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3310
+ *
3136
3311
  * @return {FluentFiltersGetter}
3137
3312
  */
3138
- above(optionalIndex = 0) {
3313
+ above(index = 0, intersection_area = 'element_edge_area') {
3139
3314
  this._textStr = '';
3140
- if (optionalIndex !== undefined) {
3141
- this._textStr += `index ${optionalIndex}`;
3315
+ if (index !== undefined) {
3316
+ this._textStr += `index ${index}`;
3142
3317
  }
3143
3318
  this._textStr += ' above';
3319
+ if (intersection_area !== undefined) {
3320
+ this._textStr += ` intersection_area ${intersection_area}`;
3321
+ }
3144
3322
  return new FluentFiltersGetter(this);
3145
3323
  }
3146
3324
  /**
@@ -3202,10 +3380,10 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3202
3380
  return new FluentFiltersGetter(this);
3203
3381
  }
3204
3382
  /**
3205
- * Returns a list of detected elements
3206
- *
3207
- * @return {DetectedElement[]}
3208
- */
3383
+ * Returns a list of detected elements
3384
+ *
3385
+ * @return {DetectedElement[]}
3386
+ */
3209
3387
  exec() {
3210
3388
  return this.getterStringBuilder();
3211
3389
  }
@@ -3222,6 +3400,9 @@ class Getter extends FluentCommand {
3222
3400
  *
3223
3401
  * **Examples:**
3224
3402
  * ```typescript
3403
+ * // ************************************ //
3404
+ * // Log the DetectedElements completely //
3405
+ * // ************************************ //
3225
3406
  * const text = await aui.get().text('Sign').exec();
3226
3407
  * console.log(text);
3227
3408
  *
@@ -3240,6 +3421,7 @@ class Getter extends FluentCommand {
3240
3421
  * ]
3241
3422
  * ```
3242
3423
  *
3424
+ * ```typescript
3243
3425
  * // *************************************************** //
3244
3426
  * // Examples on how to work with the returned elements //
3245
3427
  * // *************************************************** //
@@ -3323,6 +3505,7 @@ class Getter extends FluentCommand {
3323
3505
  * xmax: 1178.8204241071428,
3324
3506
  * ymax: 180.83512834821428
3325
3507
  * },
3508
+ * },
3326
3509
  * DetectedElement {
3327
3510
  * name: 'ICON',
3328
3511
  * text: 'search',
@@ -3332,8 +3515,8 @@ class Getter extends FluentCommand {
3332
3515
  * xmax: 450.6304241071428,
3333
3516
  * ymax: 950.47812834821428
3334
3517
  * },
3335
- * ... 381 more items
3336
- * }
3518
+ * },
3519
+ * ... 381 more items
3337
3520
  * ]
3338
3521
  * ```
3339
3522
  *