askui 0.18.0 → 0.18.1

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 (256) 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.d.ts +32 -15
  10. package/dist/cjs/core/model/custom-element-json.js.map +1 -0
  11. package/dist/cjs/core/model/custom-element.d.ts +3 -2
  12. package/dist/cjs/core/model/custom-element.js +4 -2
  13. package/dist/cjs/core/model/custom-element.js.map +1 -0
  14. package/dist/cjs/core/reporting/default-step.js.map +1 -0
  15. package/dist/cjs/core/reporting/index.js.map +1 -0
  16. package/dist/cjs/core/reporting/instruction.js.map +1 -0
  17. package/dist/cjs/core/reporting/reporter-config.js.map +1 -0
  18. package/dist/cjs/core/reporting/reporter.js.map +1 -0
  19. package/dist/cjs/core/reporting/snapshot-detail-level.js.map +1 -0
  20. package/dist/cjs/core/reporting/snapshot.js.map +1 -0
  21. package/dist/cjs/core/reporting/step-reporter.js +15 -6
  22. package/dist/cjs/core/reporting/step-reporter.js.map +1 -0
  23. package/dist/cjs/core/reporting/step-run.js.map +1 -0
  24. package/dist/cjs/core/reporting/step-status-end.js.map +1 -0
  25. package/dist/cjs/core/reporting/step-status.js.map +1 -0
  26. package/dist/cjs/core/reporting/step.js.map +1 -0
  27. package/dist/cjs/core/runner-protocol/index.js.map +1 -0
  28. package/dist/cjs/core/runner-protocol/request/capture-screenshot-request.js.map +1 -0
  29. package/dist/cjs/core/runner-protocol/request/control-request.js.map +1 -0
  30. package/dist/cjs/core/runner-protocol/request/get-server-process-pid.js.map +1 -0
  31. package/dist/cjs/core/runner-protocol/request/index.js.map +1 -0
  32. package/dist/cjs/core/runner-protocol/request/interactive-annotation-request.js.map +1 -0
  33. package/dist/cjs/core/runner-protocol/request/read-recording-request.js.map +1 -0
  34. package/dist/cjs/core/runner-protocol/request/runner-protocol-request.js.map +1 -0
  35. package/dist/cjs/core/runner-protocol/request/start-recording-request.js.map +1 -0
  36. package/dist/cjs/core/runner-protocol/request/stop-recording-request.js.map +1 -0
  37. package/dist/cjs/core/runner-protocol/response/index.js.map +1 -0
  38. package/dist/cjs/core/ui-control-commands/action.js.map +1 -0
  39. package/dist/cjs/core/ui-control-commands/control-command-code.js.map +1 -0
  40. package/dist/cjs/core/ui-control-commands/control-command.js.map +1 -0
  41. package/dist/cjs/core/ui-control-commands/index.js.map +1 -0
  42. package/dist/cjs/core/ui-control-commands/input-event.js.map +1 -0
  43. package/dist/cjs/execution/config-error.js.map +1 -0
  44. package/dist/cjs/execution/control-command-error.js.map +1 -0
  45. package/dist/cjs/execution/credentials-args.js.map +1 -0
  46. package/dist/cjs/execution/dsl.d.ts +361 -96
  47. package/dist/cjs/execution/dsl.js +361 -96
  48. package/dist/cjs/execution/dsl.js.map +1 -0
  49. package/dist/cjs/execution/execution-runtime.js.map +1 -0
  50. package/dist/cjs/execution/index.js.map +1 -0
  51. package/dist/cjs/execution/inference-client.js +9 -4
  52. package/dist/cjs/execution/inference-client.js.map +1 -0
  53. package/dist/cjs/execution/inference-response-error.js.map +1 -0
  54. package/dist/cjs/execution/is-image-required-interface.js.map +1 -0
  55. package/dist/cjs/execution/misc.js.map +1 -0
  56. package/dist/cjs/execution/model-composition-branch.js.map +1 -0
  57. package/dist/cjs/execution/read-environment-credentials.js.map +1 -0
  58. package/dist/cjs/execution/read-recording-response-stream-handler.js.map +1 -0
  59. package/dist/cjs/execution/repeat-error.js.map +1 -0
  60. package/dist/cjs/execution/ui-control-client-dependency-builder.js +3 -3
  61. package/dist/cjs/execution/ui-control-client-dependency-builder.js.map +1 -0
  62. package/dist/cjs/execution/ui-control-client.js.map +1 -0
  63. package/dist/cjs/execution/ui-controller-client-connection-state.js.map +1 -0
  64. package/dist/cjs/execution/ui-controller-client-error.js.map +1 -0
  65. package/dist/cjs/execution/ui-controller-client-interface.d.ts +2 -0
  66. package/dist/cjs/execution/ui-controller-client-interface.js.map +1 -0
  67. package/dist/cjs/execution/ui-controller-client.d.ts +1 -0
  68. package/dist/cjs/execution/ui-controller-client.js +11 -1
  69. package/dist/cjs/execution/ui-controller-client.js.map +1 -0
  70. package/dist/cjs/execution/ui-controller-not-connected-error.d.ts +4 -0
  71. package/dist/cjs/execution/ui-controller-not-connected-error.js +12 -0
  72. package/dist/cjs/lib/download-binaries.js.map +1 -0
  73. package/dist/cjs/lib/index.js.map +1 -0
  74. package/dist/cjs/lib/interactive_cli/add-script-package-json.d.ts +1 -0
  75. package/dist/cjs/lib/interactive_cli/add-script-package-json.js +39 -0
  76. package/dist/cjs/lib/interactive_cli/add-script-package-json.js.map +1 -0
  77. package/dist/cjs/lib/interactive_cli/cli-options-interface.js.map +1 -0
  78. package/dist/cjs/lib/interactive_cli/cli.js.map +1 -0
  79. package/dist/cjs/lib/interactive_cli/create-example-project.js.map +1 -0
  80. package/dist/cjs/lib/interactive_cli/index.js.map +1 -0
  81. package/dist/cjs/lib/libfuse-error.js.map +1 -0
  82. package/dist/cjs/lib/logger.js.map +1 -0
  83. package/dist/cjs/lib/timeout-error.js.map +1 -0
  84. package/dist/cjs/lib/ui-controller-args.js.map +1 -0
  85. package/dist/cjs/lib/ui-controller-darwin.js.map +1 -0
  86. package/dist/cjs/lib/ui-controller-facade.js.map +1 -0
  87. package/dist/cjs/lib/ui-controller-linux.js.map +1 -0
  88. package/dist/cjs/lib/ui-controller-win32.js.map +1 -0
  89. package/dist/cjs/lib/ui-controller.js.map +1 -0
  90. package/dist/cjs/lib/unkown-error.js.map +1 -0
  91. package/dist/cjs/lib/wayland-error.js.map +1 -0
  92. package/dist/cjs/main.js.map +1 -0
  93. package/dist/cjs/shared/index.js.map +1 -0
  94. package/dist/cjs/shared/log-levels.js.map +1 -0
  95. package/dist/cjs/shared/proxy-agent-args.js.map +1 -0
  96. package/dist/cjs/utils/analytics/analytics-interface.js.map +1 -0
  97. package/dist/cjs/utils/analytics/analytics.d.ts +2 -0
  98. package/dist/cjs/utils/analytics/analytics.js +5 -0
  99. package/dist/cjs/utils/analytics/analytics.js.map +1 -0
  100. package/dist/cjs/utils/analytics/index.js.map +1 -0
  101. package/dist/cjs/utils/analytics/installation-timestamp-create-error.js.map +1 -0
  102. package/dist/cjs/utils/analytics/installation-timestamp-get-error.js.map +1 -0
  103. package/dist/cjs/utils/analytics/installation-timestamp.js.map +1 -0
  104. package/dist/cjs/utils/analytics/user-identifier-interface.js.map +1 -0
  105. package/dist/cjs/utils/analytics/user-identifier.js.map +1 -0
  106. package/dist/cjs/utils/base_64_image/base-64-image-error.js.map +1 -0
  107. package/dist/cjs/utils/base_64_image/base-64-image-string-error.js.map +1 -0
  108. package/dist/cjs/utils/base_64_image/base-64-image.js.map +1 -0
  109. package/dist/cjs/utils/base_64_image/sharp.js.map +1 -0
  110. package/dist/cjs/utils/http/credentials.js.map +1 -0
  111. package/dist/cjs/utils/http/custom-errors/authentication-http-client-error.js.map +1 -0
  112. package/dist/cjs/utils/http/custom-errors/client-http-client-error.js.map +1 -0
  113. package/dist/cjs/utils/http/custom-errors/general-http-client-error.js.map +1 -0
  114. package/dist/cjs/utils/http/custom-errors/http-client-error.js.map +1 -0
  115. package/dist/cjs/utils/http/custom-errors/index.js +1 -1
  116. package/dist/cjs/utils/http/custom-errors/index.js.map +1 -0
  117. package/dist/cjs/utils/http/custom-errors/server-http-client-error.js.map +1 -0
  118. package/dist/cjs/utils/http/custom-errors/unkown-http-client-error.js.map +1 -0
  119. package/dist/cjs/utils/http/http-client-got.js +46 -20
  120. package/dist/cjs/utils/http/http-client-got.js.map +1 -0
  121. package/dist/cjs/utils/http/index.js.map +1 -0
  122. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js.map +1 -0
  123. package/dist/cjs/utils/image-resize-errors/index.js.map +1 -0
  124. package/dist/cjs/utils/path.js.map +1 -0
  125. package/dist/cjs/utils/proxy/proxy-builder.js.map +1 -0
  126. package/dist/cjs/utils/resized-image-interface.js.map +1 -0
  127. package/dist/cjs/utils/transformations.js.map +1 -0
  128. package/dist/esm/core/annotation/annotation-writer.js.map +1 -0
  129. package/dist/esm/core/annotation/annotation.js.map +1 -0
  130. package/dist/esm/core/inference-response/inference-response.js.map +1 -0
  131. package/dist/esm/core/inference-response/invalid-model-type-error.js.map +1 -0
  132. package/dist/esm/core/inference-response/model-type.js.map +1 -0
  133. package/dist/esm/core/model/annotation-result/annotation-interface.js.map +1 -0
  134. package/dist/esm/core/model/annotation-result/boundary-box.js.map +1 -0
  135. package/dist/esm/core/model/annotation-result/detected-element.js.map +1 -0
  136. package/dist/esm/core/model/custom-element-json.d.ts +32 -15
  137. package/dist/esm/core/model/custom-element-json.js.map +1 -0
  138. package/dist/esm/core/model/custom-element.d.ts +3 -2
  139. package/dist/esm/core/model/custom-element.js +4 -2
  140. package/dist/esm/core/model/custom-element.js.map +1 -0
  141. package/dist/esm/core/reporting/default-step.js.map +1 -0
  142. package/dist/esm/core/reporting/index.js.map +1 -0
  143. package/dist/esm/core/reporting/instruction.js.map +1 -0
  144. package/dist/esm/core/reporting/reporter-config.js.map +1 -0
  145. package/dist/esm/core/reporting/reporter.js.map +1 -0
  146. package/dist/esm/core/reporting/snapshot-detail-level.js.map +1 -0
  147. package/dist/esm/core/reporting/snapshot.js.map +1 -0
  148. package/dist/esm/core/reporting/step-reporter.js +15 -6
  149. package/dist/esm/core/reporting/step-reporter.js.map +1 -0
  150. package/dist/esm/core/reporting/step-run.js.map +1 -0
  151. package/dist/esm/core/reporting/step-status-end.js.map +1 -0
  152. package/dist/esm/core/reporting/step-status.js.map +1 -0
  153. package/dist/esm/core/reporting/step.js.map +1 -0
  154. package/dist/esm/core/runner-protocol/index.js.map +1 -0
  155. package/dist/esm/core/runner-protocol/request/capture-screenshot-request.js.map +1 -0
  156. package/dist/esm/core/runner-protocol/request/control-request.js.map +1 -0
  157. package/dist/esm/core/runner-protocol/request/get-server-process-pid.js.map +1 -0
  158. package/dist/esm/core/runner-protocol/request/index.js.map +1 -0
  159. package/dist/esm/core/runner-protocol/request/interactive-annotation-request.js.map +1 -0
  160. package/dist/esm/core/runner-protocol/request/read-recording-request.js.map +1 -0
  161. package/dist/esm/core/runner-protocol/request/runner-protocol-request.js.map +1 -0
  162. package/dist/esm/core/runner-protocol/request/start-recording-request.js.map +1 -0
  163. package/dist/esm/core/runner-protocol/request/stop-recording-request.js.map +1 -0
  164. package/dist/esm/core/runner-protocol/response/index.js.map +1 -0
  165. package/dist/esm/core/ui-control-commands/action.js.map +1 -0
  166. package/dist/esm/core/ui-control-commands/control-command-code.js.map +1 -0
  167. package/dist/esm/core/ui-control-commands/control-command.js.map +1 -0
  168. package/dist/esm/core/ui-control-commands/index.js.map +1 -0
  169. package/dist/esm/core/ui-control-commands/input-event.js.map +1 -0
  170. package/dist/esm/execution/config-error.js.map +1 -0
  171. package/dist/esm/execution/control-command-error.js.map +1 -0
  172. package/dist/esm/execution/credentials-args.js.map +1 -0
  173. package/dist/esm/execution/dsl.d.ts +361 -96
  174. package/dist/esm/execution/dsl.js +361 -96
  175. package/dist/esm/execution/dsl.js.map +1 -0
  176. package/dist/esm/execution/execution-runtime.js.map +1 -0
  177. package/dist/esm/execution/index.js.map +1 -0
  178. package/dist/esm/execution/inference-client.js +9 -4
  179. package/dist/esm/execution/inference-client.js.map +1 -0
  180. package/dist/esm/execution/inference-response-error.js.map +1 -0
  181. package/dist/esm/execution/is-image-required-interface.js.map +1 -0
  182. package/dist/esm/execution/misc.js.map +1 -0
  183. package/dist/esm/execution/model-composition-branch.js.map +1 -0
  184. package/dist/esm/execution/read-environment-credentials.js.map +1 -0
  185. package/dist/esm/execution/read-recording-response-stream-handler.js.map +1 -0
  186. package/dist/esm/execution/repeat-error.js.map +1 -0
  187. package/dist/esm/execution/ui-control-client-dependency-builder.js +3 -3
  188. package/dist/esm/execution/ui-control-client-dependency-builder.js.map +1 -0
  189. package/dist/esm/execution/ui-control-client.js.map +1 -0
  190. package/dist/esm/execution/ui-controller-client-connection-state.js.map +1 -0
  191. package/dist/esm/execution/ui-controller-client-error.js.map +1 -0
  192. package/dist/esm/execution/ui-controller-client-interface.d.ts +2 -0
  193. package/dist/esm/execution/ui-controller-client-interface.js.map +1 -0
  194. package/dist/esm/execution/ui-controller-client.d.ts +1 -0
  195. package/dist/esm/execution/ui-controller-client.js +11 -1
  196. package/dist/esm/execution/ui-controller-client.js.map +1 -0
  197. package/dist/esm/execution/ui-controller-not-connected-error.d.ts +4 -0
  198. package/dist/esm/execution/ui-controller-not-connected-error.js +8 -0
  199. package/dist/esm/lib/download-binaries.js.map +1 -0
  200. package/dist/esm/lib/index.js.map +1 -0
  201. package/dist/esm/lib/interactive_cli/add-script-package-json.d.ts +1 -0
  202. package/dist/esm/lib/interactive_cli/add-script-package-json.js +32 -0
  203. package/dist/esm/lib/interactive_cli/add-script-package-json.js.map +1 -0
  204. package/dist/esm/lib/interactive_cli/cli-options-interface.js.map +1 -0
  205. package/dist/esm/lib/interactive_cli/cli.js.map +1 -0
  206. package/dist/esm/lib/interactive_cli/create-example-project.js.map +1 -0
  207. package/dist/esm/lib/interactive_cli/index.js.map +1 -0
  208. package/dist/esm/lib/libfuse-error.js.map +1 -0
  209. package/dist/esm/lib/logger.js.map +1 -0
  210. package/dist/esm/lib/timeout-error.js.map +1 -0
  211. package/dist/esm/lib/ui-controller-args.js.map +1 -0
  212. package/dist/esm/lib/ui-controller-darwin.js.map +1 -0
  213. package/dist/esm/lib/ui-controller-facade.js.map +1 -0
  214. package/dist/esm/lib/ui-controller-linux.js.map +1 -0
  215. package/dist/esm/lib/ui-controller-win32.js.map +1 -0
  216. package/dist/esm/lib/ui-controller.js.map +1 -0
  217. package/dist/esm/lib/unkown-error.js.map +1 -0
  218. package/dist/esm/lib/wayland-error.js.map +1 -0
  219. package/dist/esm/main.js.map +1 -0
  220. package/dist/esm/shared/index.js.map +1 -0
  221. package/dist/esm/shared/log-levels.js.map +1 -0
  222. package/dist/esm/shared/proxy-agent-args.js.map +1 -0
  223. package/dist/esm/utils/analytics/analytics-interface.js.map +1 -0
  224. package/dist/esm/utils/analytics/analytics.d.ts +2 -0
  225. package/dist/esm/utils/analytics/analytics.js +5 -0
  226. package/dist/esm/utils/analytics/analytics.js.map +1 -0
  227. package/dist/esm/utils/analytics/index.js.map +1 -0
  228. package/dist/esm/utils/analytics/installation-timestamp-create-error.js.map +1 -0
  229. package/dist/esm/utils/analytics/installation-timestamp-get-error.js.map +1 -0
  230. package/dist/esm/utils/analytics/installation-timestamp.js.map +1 -0
  231. package/dist/esm/utils/analytics/user-identifier-interface.js.map +1 -0
  232. package/dist/esm/utils/analytics/user-identifier.js.map +1 -0
  233. package/dist/esm/utils/base_64_image/base-64-image-error.js.map +1 -0
  234. package/dist/esm/utils/base_64_image/base-64-image-string-error.js.map +1 -0
  235. package/dist/esm/utils/base_64_image/base-64-image.js.map +1 -0
  236. package/dist/esm/utils/base_64_image/sharp.js.map +1 -0
  237. package/dist/esm/utils/http/credentials.js.map +1 -0
  238. package/dist/esm/utils/http/custom-errors/authentication-http-client-error.js.map +1 -0
  239. package/dist/esm/utils/http/custom-errors/client-http-client-error.js.map +1 -0
  240. package/dist/esm/utils/http/custom-errors/general-http-client-error.js.map +1 -0
  241. package/dist/esm/utils/http/custom-errors/http-client-error.js.map +1 -0
  242. package/dist/esm/utils/http/custom-errors/index.js +1 -1
  243. package/dist/esm/utils/http/custom-errors/index.js.map +1 -0
  244. package/dist/esm/utils/http/custom-errors/server-http-client-error.js.map +1 -0
  245. package/dist/esm/utils/http/custom-errors/unkown-http-client-error.js.map +1 -0
  246. package/dist/esm/utils/http/http-client-got.js +46 -20
  247. package/dist/esm/utils/http/http-client-got.js.map +1 -0
  248. package/dist/esm/utils/http/index.js.map +1 -0
  249. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js.map +1 -0
  250. package/dist/esm/utils/image-resize-errors/index.js.map +1 -0
  251. package/dist/esm/utils/path.js.map +1 -0
  252. package/dist/esm/utils/proxy/proxy-builder.js.map +1 -0
  253. package/dist/esm/utils/resized-image-interface.js.map +1 -0
  254. package/dist/esm/utils/transformations.js.map +1 -0
  255. package/dist/example_projects_templates/configs/jasmine.config.json +12 -0
  256. package/package.json +1 -1
@@ -143,9 +143,11 @@ export class FluentFilters extends FluentBase {
143
143
  *
144
144
  * **Examples:**
145
145
  * ```typescript
146
- * await aui.moveMouseTo().button().exec()
146
+ * await aui.click().button().contains().text().withText('Google Search').exec()
147
147
  * ```
148
148
  *
149
+ * ![](https://docs.askui.com/img/gif/button.gif)
150
+ *
149
151
  * @return {FluentFiltersOrRelations}
150
152
  */
151
153
  button() {
@@ -205,13 +207,20 @@ export class FluentFilters extends FluentBase {
205
207
  /**
206
208
  * Filters for an UI element 'text'.
207
209
  *
208
- * Often combined with the filter `withText()` as shown in the below examples.
210
+ * Takes an optional parameter to filter for a specific text.
211
+ * See the examples below.
212
+ *
209
213
  * See also the filters `withTextRegex()` and `withExactText()`
210
214
  *
211
215
  * **Examples:**
212
216
  * ```typescript
213
- * await aui.click().text().withText('Password').exec();
217
+ * await aui.click().text().exec();
218
+ * await aui.click().text('Username').exec();
219
+ *
220
+ * // Matching with an exact text
214
221
  * await aui.click().text().withExactText('Username').exec();
222
+ *
223
+ * // Matching with a regex
215
224
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
216
225
  * ```
217
226
  *
@@ -235,6 +244,8 @@ export class FluentFilters extends FluentBase {
235
244
  * icon().withText('plus')
236
245
  * ```
237
246
  *
247
+ * ![](https://docs.askui.com/img/gif/icon.gif)
248
+ *
238
249
  * **Note:** This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
239
250
  *
240
251
  * @return {FluentFiltersOrRelations}
@@ -245,7 +256,9 @@ export class FluentFilters extends FluentBase {
245
256
  return new FluentFiltersOrRelations(this);
246
257
  }
247
258
  /**
248
- * 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 that is not recognized by our machine learning models by default. It can also be used for pixel assertions of elements using classical [template matching](https://en.wikipedia.org/wiki/Template_matching).
259
+ * 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()`.
260
+ *
261
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
249
262
  *
250
263
  * **Example**
251
264
  * ```typescript
@@ -255,6 +268,7 @@ export class FluentFilters extends FluentBase {
255
268
  * customImage: './logo.png', // required
256
269
  * name: 'myLogo', // optional
257
270
  * threshold: 0.9, // optional, defaults to 0.9
271
+ * stopThreshold: 0.9, // optional, defaults to 0.9
258
272
  * rotationDegreePerStep: 0, // optional, defaults to 0
259
273
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
260
274
  * // mask:{x:0, y:0}[] // optional, a polygon to match only a certain area of the custom element
@@ -269,12 +283,13 @@ export class FluentFilters extends FluentBase {
269
283
  * - **name** (*`string`, optional*):
270
284
  * - 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.
271
285
  * - **threshold** (*`number`, optional*):
272
- * - A threshold for how much a UI element needs to be similar to the custom element as defined. 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`.
286
+ * - 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`.
287
+ * - **stopThreshold** (*`number`, optional*):
288
+ * - 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`.
273
289
  * - **rotationDegreePerStep** (*`number`, optional*):
274
290
  * - 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`.
275
- * - **imageCompareFormat** (*`'RGB' | 'grayscale'`, optional*):
276
- * - The color compare style. 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three color. Defaults to 'grayscale'.
277
- * of the given custom image.
291
+ * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
292
+ * - 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'.
278
293
  *
279
294
  *
280
295
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -297,10 +312,14 @@ export class FluentFilters extends FluentBase {
297
312
  * await aui.click().image().exec();
298
313
  *
299
314
  * // Works if you have an image with
300
- * // a caption text below
301
- * await aui.click().image().above().text().withText('The caption').exec();
315
+ * // a text below
316
+ * await aui.click().image().above().text().withText('Automating WebGL').exec();
302
317
  * ```
303
318
  *
319
+ * ![](https://docs.askui.com/img/gif/image.gif)
320
+ *
321
+ *
322
+ *
304
323
  * @return {FluentFiltersOrRelations}
305
324
  */
306
325
  image() {
@@ -321,6 +340,10 @@ export class FluentFilters extends FluentBase {
321
340
  * await aui.typeIn('Oh yeah').textfield().below().text().withText('E-Mail Address').exec();
322
341
  * ```
323
342
  *
343
+ * ![](https://docs.askui.com/img/gif/textfield.gif)
344
+ *
345
+ *
346
+ *
324
347
  * @return {FluentFiltersOrRelations}
325
348
  */
326
349
  textfield() {
@@ -329,7 +352,13 @@ export class FluentFilters extends FluentBase {
329
352
  return new FluentFiltersOrRelations(this);
330
353
  }
331
354
  /**
332
- * Filters for similar (doesn't need to be a 100% equal) text.
355
+ * Filters for similar -- meaning >70% similar -- text.
356
+ *
357
+ * Takes an optional parameter to specify the similarity. Usually you need the optional parameter for long texts you want to match precisely.
358
+ *
359
+ * _We use [RapidFuzz](https://maxbachmann.github.io/RapidFuzz/Usage/fuzz.html#ratio) which calculates the similarity like this:_
360
+ *
361
+ * `1 - (distance / (lengthString1 + lengthString2))`
333
362
  *
334
363
  * **Examples:**
335
364
  * ```typescript
@@ -344,6 +373,11 @@ export class FluentFilters extends FluentBase {
344
373
  * // usually false
345
374
  * 'atebxtc' === withText('text') => false
346
375
  * 'other' === withText('text') => false
376
+ *
377
+ * // optional parameter: similarity_score
378
+ * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
379
+ * '978-0-201-00650-6' == withText('978-0-201-00', 90) => false with 82.76 < 90 similarity
380
+ * '978-0-201-00650-6' == withText('978-0-201-00', 90) => true with 93.75 < 90 similarity
347
381
  * ```
348
382
  * ![](https://docs.askui.com/img/gif/withText.gif)
349
383
  *
@@ -374,6 +408,10 @@ export class FluentFilters extends FluentBase {
374
408
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
375
409
  * ```
376
410
  *
411
+ * ![](https://docs.askui.com/img/gif/withtextregex.gif)
412
+ *
413
+ *
414
+ *
377
415
  * @param {string} regex_pattern - A regex pattern
378
416
  *
379
417
  * @return {FluentFiltersOrRelations}
@@ -402,6 +440,10 @@ export class FluentFilters extends FluentBase {
402
440
  * await aui.moveMouseTo().text().withExactText('Password').exec()
403
441
  * ```
404
442
  *
443
+ * ![](https://docs.askui.com/img/gif/withexacttext.gif)
444
+ *
445
+ *
446
+ *
405
447
  * @param {string} text - A text to be matched.
406
448
  *
407
449
  * @return {FluentFiltersOrRelations}
@@ -438,12 +480,13 @@ export class FluentFilters extends FluentBase {
438
480
  /**
439
481
  * Filters elements based on a textual description.
440
482
  *
441
- * ## What Should I Write as Matching Text
483
+ * **What Should I Write as Matching Text**
484
+ *
442
485
  * The text description inside the `matching()` should describe the element visually.
443
486
  * It understands color, some famous company/product names, general descriptions.
444
487
  *
445
- * It sometimes requires a bit of playing to find a matching description:
446
- * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
488
+ * It sometimes requires a bit of playing around to find a matching description:
489
+ * E.g. `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
447
490
  * Generally the more detail the better.
448
491
  *
449
492
  * **Examples:**
@@ -606,14 +649,19 @@ export class FluentFiltersOrRelations extends FluentFilters {
606
649
  /**
607
650
  * Filters for an element right of another element.
608
651
  *
652
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
653
+ *
609
654
  * **Examples:**
610
655
  * ```typescript
611
- * -------------- --------------
612
- * | leftEl | | rightEl |
613
- * -------------- --------------
656
+ * -------------- -------------- --------------
657
+ * | leftEl | | rightEl0 | | rightEl1 |
658
+ * -------------- -------------- --------------
614
659
  *
615
- * // Returns rightEl because rightEl is right of leftEl
660
+ * // Returns rightEl0 because rightEl0 is the first element right of leftEl
616
661
  * ...rightEl().rightOf().leftEl()
662
+ * ...rightEl().rightOf(0).leftEl()
663
+ * // Returns rightEl1 because rightEl1 is the second element right of leftEl
664
+ * ...rightEl().rightOf(1).leftEl()
617
665
  * // Returns no element because leftEl is left of rightEl
618
666
  * ...leftEl().rightOf().rightEl()
619
667
  * ```
@@ -633,14 +681,19 @@ export class FluentFiltersOrRelations extends FluentFilters {
633
681
  /**
634
682
  * Filters for an element left of another element.
635
683
  *
684
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
685
+ *
636
686
  * **Examples:**
637
687
  * ```typescript
638
- * -------------- --------------
639
- * | leftEl | | rightEl |
640
- * -------------- --------------
688
+ * -------------- -------------- --------------
689
+ * | leftEl1 | | leftEl0 | | rightEl |
690
+ * -------------- -------------- --------------
641
691
  *
642
- * // Returns leftEl because leftEl is left of rightEl
692
+ * // Returns leftEl0 because leftEl0 is the first element left of rightEl
643
693
  * ...leftEl().leftOf().rightEl()
694
+ * ...leftEl().leftOf(0).rightEl()
695
+ * // Returns leftEl1 because leftEl1 is the second element left of rightEl
696
+ * ...leftEl().leftOf(1).rightEl()
644
697
  * // Returns no element because rightEl is left of leftEl
645
698
  * ...rightEl().leftOf().leftEl()
646
699
  * ```
@@ -660,17 +713,25 @@ export class FluentFiltersOrRelations extends FluentFilters {
660
713
  /**
661
714
  * Filters for an element below another element.
662
715
  *
716
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
717
+ *
663
718
  * **Examples:**
664
719
  * ```typescript
665
720
  * --------------
666
721
  * | text |
667
722
  * --------------
668
723
  * --------------
669
- * | button |
724
+ * | button0 |
725
+ * --------------
726
+ * --------------
727
+ * | button1 |
670
728
  * --------------
671
729
  *
672
- * // Returns button because button is below text
730
+ * // Returns button0 because button0 is the first button below text
673
731
  * ...button().below().text()
732
+ * ...button().below(0).text()
733
+ * // Returns button1 because button1 is the second button below text
734
+ * ...button().below(1).text()
674
735
  * // Returns no element because text is above button
675
736
  * ...text().below().button()
676
737
  * ```
@@ -689,17 +750,25 @@ export class FluentFiltersOrRelations extends FluentFilters {
689
750
  /**
690
751
  * Filters for an element above another element.
691
752
  *
753
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
754
+ *
692
755
  * **Examples:**
693
756
  * ```typescript
694
757
  * --------------
695
- * | text |
758
+ * | text1 |
759
+ * --------------
760
+ * --------------
761
+ * | text0 |
696
762
  * --------------
697
763
  * --------------
698
764
  * | button |
699
765
  * --------------
700
766
  *
701
- * // Returns text because text is above button
767
+ * // Returns text0 because text0 is the first element above button
702
768
  * ...text().above().button()
769
+ * ...text().above(0).button()
770
+ * // Returns text1 because text1 is the second element above button
771
+ * ...text().above(1).button()
703
772
  * // Returns no element because button is below text
704
773
  * ...button().above().text()
705
774
  * ```
@@ -864,9 +933,11 @@ export class FluentFiltersCondition extends FluentBase {
864
933
  *
865
934
  * **Examples:**
866
935
  * ```typescript
867
- * await aui.moveMouseTo().button().exec()
936
+ * await aui.click().button().contains().text().withText('Google Search').exec()
868
937
  * ```
869
938
  *
939
+ * ![](https://docs.askui.com/img/gif/button.gif)
940
+ *
870
941
  * @return {FluentFiltersOrRelationsCondition}
871
942
  */
872
943
  button() {
@@ -926,13 +997,20 @@ export class FluentFiltersCondition extends FluentBase {
926
997
  /**
927
998
  * Filters for an UI element 'text'.
928
999
  *
929
- * Often combined with the filter `withText()` as shown in the below examples.
1000
+ * Takes an optional parameter to filter for a specific text.
1001
+ * See the examples below.
1002
+ *
930
1003
  * See also the filters `withTextRegex()` and `withExactText()`
931
1004
  *
932
1005
  * **Examples:**
933
1006
  * ```typescript
934
- * await aui.click().text().withText('Password').exec();
1007
+ * await aui.click().text().exec();
1008
+ * await aui.click().text('Username').exec();
1009
+ *
1010
+ * // Matching with an exact text
935
1011
  * await aui.click().text().withExactText('Username').exec();
1012
+ *
1013
+ * // Matching with a regex
936
1014
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
937
1015
  * ```
938
1016
  *
@@ -956,6 +1034,8 @@ export class FluentFiltersCondition extends FluentBase {
956
1034
  * icon().withText('plus')
957
1035
  * ```
958
1036
  *
1037
+ * ![](https://docs.askui.com/img/gif/icon.gif)
1038
+ *
959
1039
  * **Note:** This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
960
1040
  *
961
1041
  * @return {FluentFiltersOrRelationsCondition}
@@ -966,7 +1046,9 @@ export class FluentFiltersCondition extends FluentBase {
966
1046
  return new FluentFiltersOrRelationsCondition(this);
967
1047
  }
968
1048
  /**
969
- * 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 that is not recognized by our machine learning models by default. It can also be used for pixel assertions of elements using classical [template matching](https://en.wikipedia.org/wiki/Template_matching).
1049
+ * 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()`.
1050
+ *
1051
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
970
1052
  *
971
1053
  * **Example**
972
1054
  * ```typescript
@@ -976,6 +1058,7 @@ export class FluentFiltersCondition extends FluentBase {
976
1058
  * customImage: './logo.png', // required
977
1059
  * name: 'myLogo', // optional
978
1060
  * threshold: 0.9, // optional, defaults to 0.9
1061
+ * stopThreshold: 0.9, // optional, defaults to 0.9
979
1062
  * rotationDegreePerStep: 0, // optional, defaults to 0
980
1063
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
981
1064
  * // mask:{x:0, y:0}[] // optional, a polygon to match only a certain area of the custom element
@@ -990,12 +1073,13 @@ export class FluentFiltersCondition extends FluentBase {
990
1073
  * - **name** (*`string`, optional*):
991
1074
  * - 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.
992
1075
  * - **threshold** (*`number`, optional*):
993
- * - A threshold for how much a UI element needs to be similar to the custom element as defined. 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`.
1076
+ * - 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`.
1077
+ * - **stopThreshold** (*`number`, optional*):
1078
+ * - 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`.
994
1079
  * - **rotationDegreePerStep** (*`number`, optional*):
995
1080
  * - 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`.
996
- * - **imageCompareFormat** (*`'RGB' | 'grayscale'`, optional*):
997
- * - The color compare style. 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three color. Defaults to 'grayscale'.
998
- * of the given custom image.
1081
+ * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
1082
+ * - 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'.
999
1083
  *
1000
1084
  *
1001
1085
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -1018,10 +1102,14 @@ export class FluentFiltersCondition extends FluentBase {
1018
1102
  * await aui.click().image().exec();
1019
1103
  *
1020
1104
  * // Works if you have an image with
1021
- * // a caption text below
1022
- * await aui.click().image().above().text().withText('The caption').exec();
1105
+ * // a text below
1106
+ * await aui.click().image().above().text().withText('Automating WebGL').exec();
1023
1107
  * ```
1024
1108
  *
1109
+ * ![](https://docs.askui.com/img/gif/image.gif)
1110
+ *
1111
+ *
1112
+ *
1025
1113
  * @return {FluentFiltersOrRelationsCondition}
1026
1114
  */
1027
1115
  image() {
@@ -1042,6 +1130,10 @@ export class FluentFiltersCondition extends FluentBase {
1042
1130
  * await aui.typeIn('Oh yeah').textfield().below().text().withText('E-Mail Address').exec();
1043
1131
  * ```
1044
1132
  *
1133
+ * ![](https://docs.askui.com/img/gif/textfield.gif)
1134
+ *
1135
+ *
1136
+ *
1045
1137
  * @return {FluentFiltersOrRelationsCondition}
1046
1138
  */
1047
1139
  textfield() {
@@ -1050,7 +1142,13 @@ export class FluentFiltersCondition extends FluentBase {
1050
1142
  return new FluentFiltersOrRelationsCondition(this);
1051
1143
  }
1052
1144
  /**
1053
- * Filters for similar (doesn't need to be a 100% equal) text.
1145
+ * Filters for similar -- meaning >70% similar -- text.
1146
+ *
1147
+ * Takes an optional parameter to specify the similarity. Usually you need the optional parameter for long texts you want to match precisely.
1148
+ *
1149
+ * _We use [RapidFuzz](https://maxbachmann.github.io/RapidFuzz/Usage/fuzz.html#ratio) which calculates the similarity like this:_
1150
+ *
1151
+ * `1 - (distance / (lengthString1 + lengthString2))`
1054
1152
  *
1055
1153
  * **Examples:**
1056
1154
  * ```typescript
@@ -1065,6 +1163,11 @@ export class FluentFiltersCondition extends FluentBase {
1065
1163
  * // usually false
1066
1164
  * 'atebxtc' === withText('text') => false
1067
1165
  * 'other' === withText('text') => false
1166
+ *
1167
+ * // optional parameter: similarity_score
1168
+ * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
1169
+ * '978-0-201-00650-6' == withText('978-0-201-00', 90) => false with 82.76 < 90 similarity
1170
+ * '978-0-201-00650-6' == withText('978-0-201-00', 90) => true with 93.75 < 90 similarity
1068
1171
  * ```
1069
1172
  * ![](https://docs.askui.com/img/gif/withText.gif)
1070
1173
  *
@@ -1095,6 +1198,10 @@ export class FluentFiltersCondition extends FluentBase {
1095
1198
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
1096
1199
  * ```
1097
1200
  *
1201
+ * ![](https://docs.askui.com/img/gif/withtextregex.gif)
1202
+ *
1203
+ *
1204
+ *
1098
1205
  * @param {string} regex_pattern - A regex pattern
1099
1206
  *
1100
1207
  * @return {FluentFiltersOrRelationsCondition}
@@ -1123,6 +1230,10 @@ export class FluentFiltersCondition extends FluentBase {
1123
1230
  * await aui.moveMouseTo().text().withExactText('Password').exec()
1124
1231
  * ```
1125
1232
  *
1233
+ * ![](https://docs.askui.com/img/gif/withexacttext.gif)
1234
+ *
1235
+ *
1236
+ *
1126
1237
  * @param {string} text - A text to be matched.
1127
1238
  *
1128
1239
  * @return {FluentFiltersOrRelationsCondition}
@@ -1159,12 +1270,13 @@ export class FluentFiltersCondition extends FluentBase {
1159
1270
  /**
1160
1271
  * Filters elements based on a textual description.
1161
1272
  *
1162
- * ## What Should I Write as Matching Text
1273
+ * **What Should I Write as Matching Text**
1274
+ *
1163
1275
  * The text description inside the `matching()` should describe the element visually.
1164
1276
  * It understands color, some famous company/product names, general descriptions.
1165
1277
  *
1166
- * It sometimes requires a bit of playing to find a matching description:
1167
- * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
1278
+ * It sometimes requires a bit of playing around to find a matching description:
1279
+ * E.g. `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
1168
1280
  * Generally the more detail the better.
1169
1281
  *
1170
1282
  * **Examples:**
@@ -1327,14 +1439,19 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1327
1439
  /**
1328
1440
  * Filters for an element right of another element.
1329
1441
  *
1442
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1443
+ *
1330
1444
  * **Examples:**
1331
1445
  * ```typescript
1332
- * -------------- --------------
1333
- * | leftEl | | rightEl |
1334
- * -------------- --------------
1446
+ * -------------- -------------- --------------
1447
+ * | leftEl | | rightEl0 | | rightEl1 |
1448
+ * -------------- -------------- --------------
1335
1449
  *
1336
- * // Returns rightEl because rightEl is right of leftEl
1450
+ * // Returns rightEl0 because rightEl0 is the first element right of leftEl
1337
1451
  * ...rightEl().rightOf().leftEl()
1452
+ * ...rightEl().rightOf(0).leftEl()
1453
+ * // Returns rightEl1 because rightEl1 is the second element right of leftEl
1454
+ * ...rightEl().rightOf(1).leftEl()
1338
1455
  * // Returns no element because leftEl is left of rightEl
1339
1456
  * ...leftEl().rightOf().rightEl()
1340
1457
  * ```
@@ -1354,14 +1471,19 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1354
1471
  /**
1355
1472
  * Filters for an element left of another element.
1356
1473
  *
1474
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1475
+ *
1357
1476
  * **Examples:**
1358
1477
  * ```typescript
1359
- * -------------- --------------
1360
- * | leftEl | | rightEl |
1361
- * -------------- --------------
1478
+ * -------------- -------------- --------------
1479
+ * | leftEl1 | | leftEl0 | | rightEl |
1480
+ * -------------- -------------- --------------
1362
1481
  *
1363
- * // Returns leftEl because leftEl is left of rightEl
1482
+ * // Returns leftEl0 because leftEl0 is the first element left of rightEl
1364
1483
  * ...leftEl().leftOf().rightEl()
1484
+ * ...leftEl().leftOf(0).rightEl()
1485
+ * // Returns leftEl1 because leftEl1 is the second element left of rightEl
1486
+ * ...leftEl().leftOf(1).rightEl()
1365
1487
  * // Returns no element because rightEl is left of leftEl
1366
1488
  * ...rightEl().leftOf().leftEl()
1367
1489
  * ```
@@ -1381,17 +1503,25 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1381
1503
  /**
1382
1504
  * Filters for an element below another element.
1383
1505
  *
1506
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1507
+ *
1384
1508
  * **Examples:**
1385
1509
  * ```typescript
1386
1510
  * --------------
1387
1511
  * | text |
1388
1512
  * --------------
1389
1513
  * --------------
1390
- * | button |
1514
+ * | button0 |
1515
+ * --------------
1516
+ * --------------
1517
+ * | button1 |
1391
1518
  * --------------
1392
1519
  *
1393
- * // Returns button because button is below text
1520
+ * // Returns button0 because button0 is the first button below text
1394
1521
  * ...button().below().text()
1522
+ * ...button().below(0).text()
1523
+ * // Returns button1 because button1 is the second button below text
1524
+ * ...button().below(1).text()
1395
1525
  * // Returns no element because text is above button
1396
1526
  * ...text().below().button()
1397
1527
  * ```
@@ -1410,17 +1540,25 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1410
1540
  /**
1411
1541
  * Filters for an element above another element.
1412
1542
  *
1543
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1544
+ *
1413
1545
  * **Examples:**
1414
1546
  * ```typescript
1415
1547
  * --------------
1416
- * | text |
1548
+ * | text1 |
1549
+ * --------------
1550
+ * --------------
1551
+ * | text0 |
1417
1552
  * --------------
1418
1553
  * --------------
1419
1554
  * | button |
1420
1555
  * --------------
1421
1556
  *
1422
- * // Returns text because text is above button
1557
+ * // Returns text0 because text0 is the first element above button
1423
1558
  * ...text().above().button()
1559
+ * ...text().above(0).button()
1560
+ * // Returns text1 because text1 is the second element above button
1561
+ * ...text().above(1).button()
1424
1562
  * // Returns no element because button is below text
1425
1563
  * ...button().above().text()
1426
1564
  * ```
@@ -1504,12 +1642,12 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1504
1642
  * **Examples:**
1505
1643
  * ```typescript
1506
1644
  * // Stops execution at this point when the element does not exist.
1507
- * await aui.expect().text().withText('Login').exists().exec()
1645
+ * await aui.expect().text('Login').exists().exec()
1508
1646
  *
1509
1647
  * // This will catch the error and log a message
1510
1648
  * // But the execution will continue afterwards
1511
1649
  * try {
1512
- * await aui.expect().text().withText('Login').exists().exec()
1650
+ * await aui.expect().text('Login').exists().exec()
1513
1651
  * } catch (error) {
1514
1652
  * console.log('Too bad we could not find the element!');
1515
1653
  * }
@@ -1532,12 +1670,12 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1532
1670
  * **Examples:**
1533
1671
  * ```typescript
1534
1672
  * // Stops execution at this point when the element does exist.
1535
- * await aui.expect().text().withText('Login').notExists().exec()
1673
+ * await aui.expect().text('Login').notExists().exec()
1536
1674
  *
1537
1675
  * // This will catch the error and log a message
1538
1676
  * // But the execution will continue afterwards
1539
1677
  * try {
1540
- * await aui.expect().text().withText('Login').notExists().exec()
1678
+ * await aui.expect().text('Login').notExists().exec()
1541
1679
  * } catch (error) {
1542
1680
  * console.log('Too bad we could find the element!');
1543
1681
  * }
@@ -1566,8 +1704,8 @@ export class FluentCommand extends FluentBase {
1566
1704
  *
1567
1705
  * **Examples:**
1568
1706
  * ```typescript
1569
- * await aui.expect().text().withText('Login').exists().exec()
1570
- * await aui.expect().text().withText('Login').notExists().exec()
1707
+ * await aui.expect().text('Login').exists().exec()
1708
+ * await aui.expect().text('Login').notExists().exec()
1571
1709
  * ```
1572
1710
  *
1573
1711
  * @return {FluentFiltersCondition}
@@ -1584,9 +1722,13 @@ export class FluentCommand extends FluentBase {
1584
1722
  *
1585
1723
  * **Example:**
1586
1724
  * ```typescript
1587
- * await aui.click().button().withText('Submit').exec()
1725
+ * await aui.click().button().withText('Google Search').exec();
1588
1726
  * ```
1589
1727
  *
1728
+ * ![](https://docs.askui.com/img/gif/click.gif)
1729
+ *
1730
+ *
1731
+ *
1590
1732
  * @return {FluentFilters}
1591
1733
  */
1592
1734
  click() {
@@ -1600,9 +1742,13 @@ export class FluentCommand extends FluentBase {
1600
1742
  *
1601
1743
  * **Example:**
1602
1744
  * ```typescript
1603
- * await aui.moveMouseTo().button().withText('Submit').exec()
1745
+ * await aui.moveMouseTo().text().withText('Grinning_Face').exec()
1604
1746
  * ```
1605
1747
  *
1748
+ * ![](https://docs.askui.com/img/gif/movemouseto.gif)
1749
+ *
1750
+ *
1751
+ *
1606
1752
  * @return {FluentFilters}
1607
1753
  */
1608
1754
  moveMouseTo() {
@@ -1644,9 +1790,11 @@ export class FluentCommand extends FluentBase {
1644
1790
  *
1645
1791
  * **Example:**
1646
1792
  * ```typescript
1647
- * await aui.scroll(0, 10).textarea().exec()
1793
+ * await aui.scrollInside(0,-500).text().withText('Bottom sheet').exec();
1648
1794
  * ```
1649
1795
  *
1796
+ * ![](https://docs.askui.com/img/gif/scrollinside.gif)
1797
+ *
1650
1798
  * @param {number} x_offset - A (positive/negative) x direction.
1651
1799
  * @param {number} y_offset - A (positive/negative) y direction.
1652
1800
  *
@@ -1723,12 +1871,14 @@ export class FluentCommand extends FluentBase {
1723
1871
  *
1724
1872
  * **Examples:**
1725
1873
  * ```typescript
1726
- * await aui.type('Type some text').exec()
1874
+ * await aui.type('askui@askui.com').exec()
1727
1875
  *
1728
1876
  * // mask the text so it is not send to the askui-inference server
1729
1877
  * await aui.type('Type some text', { isSecret: true, secretMask: '**' }).exec()
1730
1878
  * ```
1731
1879
  *
1880
+ * ![](https://docs.askui.com/img/gif/type.gif)
1881
+ *
1732
1882
  * @param {string} text - A text to type
1733
1883
  *
1734
1884
  * @return {Exec}
@@ -1744,9 +1894,11 @@ export class FluentCommand extends FluentBase {
1744
1894
  *
1745
1895
  * **Example:**
1746
1896
  * ```typescript
1747
- * await aui.moveMouseRelatively(20, 20).exec();
1897
+ * await aui.moveMouseRelatively(0, 50).exec();
1748
1898
  * ```
1749
1899
  *
1900
+ * ![](https://docs.askui.com/img/gif/movemouserelatively.gif)
1901
+ *
1750
1902
  * @param {number} x_offset - A (positive/negative) x direction.
1751
1903
  * @param {number} y_offset - A (positive/negative) y direction.
1752
1904
  *
@@ -1776,6 +1928,8 @@ export class FluentCommand extends FluentBase {
1776
1928
  * await aui.moveMouse(500, 500).exec();
1777
1929
  * ```
1778
1930
  *
1931
+ * ![](https://docs.askui.com/img/gif/moveMouse.gif)
1932
+ *
1779
1933
  * @param {number} x_coordinate - A (positive/negative) x coordinate.
1780
1934
  * @param {number} y_coordinate - A (positive/negative) y coordinate.
1781
1935
  *
@@ -1801,10 +1955,12 @@ export class FluentCommand extends FluentBase {
1801
1955
  *
1802
1956
  * **Example:**
1803
1957
  * ```typescript
1804
- * // Scroll 10 up in y direction
1805
- * await aui.scroll(0, 10).exec()
1958
+ * // Scroll 500 pixels down in y direction
1959
+ * await aui.scroll(0, -500).exec()
1806
1960
  * ```
1807
1961
  *
1962
+ * ![](https://docs.askui.com/img/gif/scroll.gif)
1963
+ *
1808
1964
  * @param {number} x_offset - A (positive/negative) x direction.
1809
1965
  * @param {number} y_offset - A (positive/negative) y direction.
1810
1966
  *
@@ -1922,6 +2078,8 @@ export class FluentCommand extends FluentBase {
1922
2078
  * await aui.mouseDoubleLeftClick().exec();
1923
2079
  * ```
1924
2080
  *
2081
+ * ![](https://docs.askui.com/img/gif/mousedoubleleftclick.gif)
2082
+ *
1925
2083
  * @return {Exec}
1926
2084
  */
1927
2085
  mouseDoubleLeftClick() {
@@ -1972,11 +2130,17 @@ export class FluentCommand extends FluentBase {
1972
2130
  /**
1973
2131
  * Toggles mouse down (Left mouse key/tap).
1974
2132
  *
2133
+ * This is the equivalent to **mouse-left-press-and-hold**. It holds the mouse button until the `mouseToogleUp()` is called. Often combined with `mouseToggleUP` to automate **drag-and-drop**.
2134
+ *
1975
2135
  * **Example:**
1976
2136
  * ```typescript
1977
2137
  * await aui.mouseToggleDown().exec();
2138
+ * await aui.moveMouseRelatively(-400,0).exec();
2139
+ * await aui.mouseToggleUp().exec();
1978
2140
  * ```
1979
2141
  *
2142
+ * ![](https://docs.askui.com/img/gif/mouseToggleDownUp.gif)
2143
+ *
1980
2144
  * @return {Exec}
1981
2145
  */
1982
2146
  mouseToggleDown() {
@@ -1987,11 +2151,17 @@ export class FluentCommand extends FluentBase {
1987
2151
  /**
1988
2152
  * Toggles mouse up (Left mouse key/tap).
1989
2153
  *
2154
+ * This is the equivalent to releasing the pressing mouse left button. Often combined with `mouseToggleDown()` to automate **drag-and-drop**.
2155
+ *
1990
2156
  * **Example:**
1991
2157
  * ```typescript
2158
+ * await aui.mouseToggleDown().exec();
2159
+ * await aui.moveMouseRelatively(-400,0).exec();
1992
2160
  * await aui.mouseToggleUp().exec();
1993
2161
  * ```
1994
2162
  *
2163
+ * ![](https://docs.askui.com/img/gif/mouseToggleDownUp.gif)
2164
+ *
1995
2165
  * @return {Exec}
1996
2166
  */
1997
2167
  mouseToggleUp() {
@@ -2004,8 +2174,13 @@ export class FluentCommand extends FluentBase {
2004
2174
  *
2005
2175
  * **Operating system specific mappings:**
2006
2176
  * 1. Windows: `command`-key maps to `windows`-key
2007
- * ---
2008
2177
  *
2178
+ * **Examples:**
2179
+ * ```typescript
2180
+ * await aui.pressThreeKeys('control', 'command' 'space').exec();
2181
+ * ```
2182
+ *
2183
+ * ![](https://docs.askui.com/img/gif/pressThreeKeys.gif)
2009
2184
  *
2010
2185
  * @param {MODIFIER_KEY} first_key - A modifier key
2011
2186
  * @param {MODIFIER_KEY} second_key - A modifier key
@@ -2048,8 +2223,13 @@ export class FluentCommand extends FluentBase {
2048
2223
  *
2049
2224
  * **Operating system specific mappings:**
2050
2225
  * 1. Windows: `command`-key maps to `windows`-key
2051
- * ---
2052
2226
  *
2227
+ * **Examples:**
2228
+ * ```typescript
2229
+ * await aui.pressKey('tab').exec();
2230
+ * ```
2231
+ *
2232
+ * ![](https://docs.askui.com/img/gif/pressKey.gif)
2053
2233
  *
2054
2234
  * @param {PC_AND_MODIFIER_KEY} key - A key
2055
2235
  *
@@ -2082,7 +2262,15 @@ export class FluentCommand extends FluentBase {
2082
2262
  return new Exec(this);
2083
2263
  }
2084
2264
  /**
2085
- * Press two Android keys like `ALT+F4`
2265
+ * Press two Android keys like `volume_down+power`
2266
+ * See [API docs](https://docs.askui.com/docs/api/Actions/pressandroidtwokey) for available keys.
2267
+ *
2268
+ * **Examples:**
2269
+ * ```typescript
2270
+ * await aui.pressAndroidTwoKey('volume_down', 'power').exec();
2271
+ * ```
2272
+ *
2273
+ * ![](https://docs.askui.com/img/gif/pressAndroidTwoKey.gif)
2086
2274
  *
2087
2275
  * @param {ANDROID_KEY} first_key - A Android key
2088
2276
  * @param {ANDROID_KEY} second_key - A Android key
@@ -2099,7 +2287,15 @@ export class FluentCommand extends FluentBase {
2099
2287
  return new Exec(this);
2100
2288
  }
2101
2289
  /**
2102
- * Press one Android key like `DEL`
2290
+ * Press one Android key like `del`
2291
+ * See [API docs](https://docs.askui.com/docs/api/Actions/pressandroidtwokey) for available keys.
2292
+ *
2293
+ * **Examples:**
2294
+ * ```typescript
2295
+ * await aui.pressAndroidKey('notification').exec();
2296
+ * ```
2297
+ *
2298
+ * ![](https://docs.askui.com/img/gif/pressAndroidKey.gif)
2103
2299
  *
2104
2300
  * @param {ANDROID_KEY} key - A Android key
2105
2301
  *
@@ -2206,9 +2402,11 @@ export class FluentFiltersGetter extends FluentBase {
2206
2402
  *
2207
2403
  * **Examples:**
2208
2404
  * ```typescript
2209
- * await aui.moveMouseTo().button().exec()
2405
+ * await aui.click().button().contains().text().withText('Google Search').exec()
2210
2406
  * ```
2211
2407
  *
2408
+ * ![](https://docs.askui.com/img/gif/button.gif)
2409
+ *
2212
2410
  * @return {FluentFiltersOrRelationsGetter}
2213
2411
  */
2214
2412
  button() {
@@ -2268,13 +2466,20 @@ export class FluentFiltersGetter extends FluentBase {
2268
2466
  /**
2269
2467
  * Filters for an UI element 'text'.
2270
2468
  *
2271
- * Often combined with the filter `withText()` as shown in the below examples.
2469
+ * Takes an optional parameter to filter for a specific text.
2470
+ * See the examples below.
2471
+ *
2272
2472
  * See also the filters `withTextRegex()` and `withExactText()`
2273
2473
  *
2274
2474
  * **Examples:**
2275
2475
  * ```typescript
2276
- * await aui.click().text().withText('Password').exec();
2476
+ * await aui.click().text().exec();
2477
+ * await aui.click().text('Username').exec();
2478
+ *
2479
+ * // Matching with an exact text
2277
2480
  * await aui.click().text().withExactText('Username').exec();
2481
+ *
2482
+ * // Matching with a regex
2278
2483
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
2279
2484
  * ```
2280
2485
  *
@@ -2298,6 +2503,8 @@ export class FluentFiltersGetter extends FluentBase {
2298
2503
  * icon().withText('plus')
2299
2504
  * ```
2300
2505
  *
2506
+ * ![](https://docs.askui.com/img/gif/icon.gif)
2507
+ *
2301
2508
  * **Note:** This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
2302
2509
  *
2303
2510
  * @return {FluentFiltersOrRelationsGetter}
@@ -2308,7 +2515,9 @@ export class FluentFiltersGetter extends FluentBase {
2308
2515
  return new FluentFiltersOrRelationsGetter(this);
2309
2516
  }
2310
2517
  /**
2311
- * 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 that is not recognized by our machine learning models by default. It can also be used for pixel assertions of elements using classical [template matching](https://en.wikipedia.org/wiki/Template_matching).
2518
+ * 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()`.
2519
+ *
2520
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
2312
2521
  *
2313
2522
  * **Example**
2314
2523
  * ```typescript
@@ -2318,6 +2527,7 @@ export class FluentFiltersGetter extends FluentBase {
2318
2527
  * customImage: './logo.png', // required
2319
2528
  * name: 'myLogo', // optional
2320
2529
  * threshold: 0.9, // optional, defaults to 0.9
2530
+ * stopThreshold: 0.9, // optional, defaults to 0.9
2321
2531
  * rotationDegreePerStep: 0, // optional, defaults to 0
2322
2532
  * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
2323
2533
  * // mask:{x:0, y:0}[] // optional, a polygon to match only a certain area of the custom element
@@ -2332,12 +2542,13 @@ export class FluentFiltersGetter extends FluentBase {
2332
2542
  * - **name** (*`string`, optional*):
2333
2543
  * - 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.
2334
2544
  * - **threshold** (*`number`, optional*):
2335
- * - A threshold for how much a UI element needs to be similar to the custom element as defined. 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`.
2545
+ * - 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`.
2546
+ * - **stopThreshold** (*`number`, optional*):
2547
+ * - 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`.
2336
2548
  * - **rotationDegreePerStep** (*`number`, optional*):
2337
2549
  * - 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`.
2338
- * - **imageCompareFormat** (*`'RGB' | 'grayscale'`, optional*):
2339
- * - The color compare style. 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three color. Defaults to 'grayscale'.
2340
- * of the given custom image.
2550
+ * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
2551
+ * - 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'.
2341
2552
  *
2342
2553
  *
2343
2554
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -2360,10 +2571,14 @@ export class FluentFiltersGetter extends FluentBase {
2360
2571
  * await aui.click().image().exec();
2361
2572
  *
2362
2573
  * // Works if you have an image with
2363
- * // a caption text below
2364
- * await aui.click().image().above().text().withText('The caption').exec();
2574
+ * // a text below
2575
+ * await aui.click().image().above().text().withText('Automating WebGL').exec();
2365
2576
  * ```
2366
2577
  *
2578
+ * ![](https://docs.askui.com/img/gif/image.gif)
2579
+ *
2580
+ *
2581
+ *
2367
2582
  * @return {FluentFiltersOrRelationsGetter}
2368
2583
  */
2369
2584
  image() {
@@ -2384,6 +2599,10 @@ export class FluentFiltersGetter extends FluentBase {
2384
2599
  * await aui.typeIn('Oh yeah').textfield().below().text().withText('E-Mail Address').exec();
2385
2600
  * ```
2386
2601
  *
2602
+ * ![](https://docs.askui.com/img/gif/textfield.gif)
2603
+ *
2604
+ *
2605
+ *
2387
2606
  * @return {FluentFiltersOrRelationsGetter}
2388
2607
  */
2389
2608
  textfield() {
@@ -2392,7 +2611,13 @@ export class FluentFiltersGetter extends FluentBase {
2392
2611
  return new FluentFiltersOrRelationsGetter(this);
2393
2612
  }
2394
2613
  /**
2395
- * Filters for similar (doesn't need to be a 100% equal) text.
2614
+ * Filters for similar -- meaning >70% similar -- text.
2615
+ *
2616
+ * Takes an optional parameter to specify the similarity. Usually you need the optional parameter for long texts you want to match precisely.
2617
+ *
2618
+ * _We use [RapidFuzz](https://maxbachmann.github.io/RapidFuzz/Usage/fuzz.html#ratio) which calculates the similarity like this:_
2619
+ *
2620
+ * `1 - (distance / (lengthString1 + lengthString2))`
2396
2621
  *
2397
2622
  * **Examples:**
2398
2623
  * ```typescript
@@ -2407,6 +2632,11 @@ export class FluentFiltersGetter extends FluentBase {
2407
2632
  * // usually false
2408
2633
  * 'atebxtc' === withText('text') => false
2409
2634
  * 'other' === withText('text') => false
2635
+ *
2636
+ * // optional parameter: similarity_score
2637
+ * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
2638
+ * '978-0-201-00650-6' == withText('978-0-201-00', 90) => false with 82.76 < 90 similarity
2639
+ * '978-0-201-00650-6' == withText('978-0-201-00', 90) => true with 93.75 < 90 similarity
2410
2640
  * ```
2411
2641
  * ![](https://docs.askui.com/img/gif/withText.gif)
2412
2642
  *
@@ -2437,6 +2667,10 @@ export class FluentFiltersGetter extends FluentBase {
2437
2667
  * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
2438
2668
  * ```
2439
2669
  *
2670
+ * ![](https://docs.askui.com/img/gif/withtextregex.gif)
2671
+ *
2672
+ *
2673
+ *
2440
2674
  * @param {string} regex_pattern - A regex pattern
2441
2675
  *
2442
2676
  * @return {FluentFiltersOrRelationsGetter}
@@ -2465,6 +2699,10 @@ export class FluentFiltersGetter extends FluentBase {
2465
2699
  * await aui.moveMouseTo().text().withExactText('Password').exec()
2466
2700
  * ```
2467
2701
  *
2702
+ * ![](https://docs.askui.com/img/gif/withexacttext.gif)
2703
+ *
2704
+ *
2705
+ *
2468
2706
  * @param {string} text - A text to be matched.
2469
2707
  *
2470
2708
  * @return {FluentFiltersOrRelationsGetter}
@@ -2501,12 +2739,13 @@ export class FluentFiltersGetter extends FluentBase {
2501
2739
  /**
2502
2740
  * Filters elements based on a textual description.
2503
2741
  *
2504
- * ## What Should I Write as Matching Text
2742
+ * **What Should I Write as Matching Text**
2743
+ *
2505
2744
  * The text description inside the `matching()` should describe the element visually.
2506
2745
  * It understands color, some famous company/product names, general descriptions.
2507
2746
  *
2508
- * It sometimes requires a bit of playing to find a matching description:
2509
- * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
2747
+ * It sometimes requires a bit of playing around to find a matching description:
2748
+ * E.g. `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
2510
2749
  * Generally the more detail the better.
2511
2750
  *
2512
2751
  * **Examples:**
@@ -2669,14 +2908,19 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2669
2908
  /**
2670
2909
  * Filters for an element right of another element.
2671
2910
  *
2911
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
2912
+ *
2672
2913
  * **Examples:**
2673
2914
  * ```typescript
2674
- * -------------- --------------
2675
- * | leftEl | | rightEl |
2676
- * -------------- --------------
2915
+ * -------------- -------------- --------------
2916
+ * | leftEl | | rightEl0 | | rightEl1 |
2917
+ * -------------- -------------- --------------
2677
2918
  *
2678
- * // Returns rightEl because rightEl is right of leftEl
2919
+ * // Returns rightEl0 because rightEl0 is the first element right of leftEl
2679
2920
  * ...rightEl().rightOf().leftEl()
2921
+ * ...rightEl().rightOf(0).leftEl()
2922
+ * // Returns rightEl1 because rightEl1 is the second element right of leftEl
2923
+ * ...rightEl().rightOf(1).leftEl()
2680
2924
  * // Returns no element because leftEl is left of rightEl
2681
2925
  * ...leftEl().rightOf().rightEl()
2682
2926
  * ```
@@ -2696,14 +2940,19 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2696
2940
  /**
2697
2941
  * Filters for an element left of another element.
2698
2942
  *
2943
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
2944
+ *
2699
2945
  * **Examples:**
2700
2946
  * ```typescript
2701
- * -------------- --------------
2702
- * | leftEl | | rightEl |
2703
- * -------------- --------------
2947
+ * -------------- -------------- --------------
2948
+ * | leftEl1 | | leftEl0 | | rightEl |
2949
+ * -------------- -------------- --------------
2704
2950
  *
2705
- * // Returns leftEl because leftEl is left of rightEl
2951
+ * // Returns leftEl0 because leftEl0 is the first element left of rightEl
2706
2952
  * ...leftEl().leftOf().rightEl()
2953
+ * ...leftEl().leftOf(0).rightEl()
2954
+ * // Returns leftEl1 because leftEl1 is the second element left of rightEl
2955
+ * ...leftEl().leftOf(1).rightEl()
2707
2956
  * // Returns no element because rightEl is left of leftEl
2708
2957
  * ...rightEl().leftOf().leftEl()
2709
2958
  * ```
@@ -2723,17 +2972,25 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2723
2972
  /**
2724
2973
  * Filters for an element below another element.
2725
2974
  *
2975
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
2976
+ *
2726
2977
  * **Examples:**
2727
2978
  * ```typescript
2728
2979
  * --------------
2729
2980
  * | text |
2730
2981
  * --------------
2731
2982
  * --------------
2732
- * | button |
2983
+ * | button0 |
2984
+ * --------------
2985
+ * --------------
2986
+ * | button1 |
2733
2987
  * --------------
2734
2988
  *
2735
- * // Returns button because button is below text
2989
+ * // Returns button0 because button0 is the first button below text
2736
2990
  * ...button().below().text()
2991
+ * ...button().below(0).text()
2992
+ * // Returns button1 because button1 is the second button below text
2993
+ * ...button().below(1).text()
2737
2994
  * // Returns no element because text is above button
2738
2995
  * ...text().below().button()
2739
2996
  * ```
@@ -2752,17 +3009,25 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2752
3009
  /**
2753
3010
  * Filters for an element above another element.
2754
3011
  *
3012
+ * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3013
+ *
2755
3014
  * **Examples:**
2756
3015
  * ```typescript
2757
3016
  * --------------
2758
- * | text |
3017
+ * | text1 |
3018
+ * --------------
3019
+ * --------------
3020
+ * | text0 |
2759
3021
  * --------------
2760
3022
  * --------------
2761
3023
  * | button |
2762
3024
  * --------------
2763
3025
  *
2764
- * // Returns text because text is above button
3026
+ * // Returns text0 because text0 is the first element above button
2765
3027
  * ...text().above().button()
3028
+ * ...text().above(0).button()
3029
+ * // Returns text1 because text1 is the second element above button
3030
+ * ...text().above(1).button()
2766
3031
  * // Returns no element because button is below text
2767
3032
  * ...button().above().text()
2768
3033
  * ```
@@ -2856,7 +3121,7 @@ export class Getter extends FluentCommand {
2856
3121
  *
2857
3122
  * **Examples:**
2858
3123
  * ```typescript
2859
- * const text = await aui.get().text().withText('Sign').exec();
3124
+ * const text = await aui.get().text('Sign').exec();
2860
3125
  * console.log(text);
2861
3126
  * ```
2862
3127
  * ```text