askui 0.7.1 → 0.8.0

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 (27) hide show
  1. package/dist/cjs/core/inference-response/inference-response.d.ts +7 -11
  2. package/dist/cjs/core/inference-response/inference-response.js +8 -13
  3. package/dist/cjs/core/inference-response/invalid-model-type-error.d.ts +4 -0
  4. package/dist/cjs/core/inference-response/invalid-model-type-error.js +9 -0
  5. package/dist/cjs/core/inference-response/model-type.d.ts +1 -0
  6. package/dist/cjs/core/inference-response/model-type.js +2 -0
  7. package/dist/cjs/execution/dsl.d.ts +592 -1333
  8. package/dist/cjs/execution/dsl.js +1111 -2383
  9. package/dist/cjs/execution/inference-client.d.ts +1 -0
  10. package/dist/cjs/execution/inference-client.js +17 -8
  11. package/dist/cjs/execution/ui-control-client.js +1 -0
  12. package/dist/cjs/utils/http/http-client-got.d.ts +5 -1
  13. package/dist/cjs/utils/http/http-client-got.js +12 -4
  14. package/dist/esm/core/inference-response/inference-response.d.ts +7 -11
  15. package/dist/esm/core/inference-response/inference-response.js +8 -13
  16. package/dist/esm/core/inference-response/invalid-model-type-error.d.ts +4 -0
  17. package/dist/esm/core/inference-response/invalid-model-type-error.js +5 -0
  18. package/dist/esm/core/inference-response/model-type.d.ts +1 -0
  19. package/dist/esm/core/inference-response/model-type.js +1 -0
  20. package/dist/esm/execution/dsl.d.ts +592 -1333
  21. package/dist/esm/execution/dsl.js +1119 -2391
  22. package/dist/esm/execution/inference-client.d.ts +1 -0
  23. package/dist/esm/execution/inference-client.js +17 -8
  24. package/dist/esm/execution/ui-control-client.js +1 -0
  25. package/dist/esm/utils/http/http-client-got.d.ts +5 -1
  26. package/dist/esm/utils/http/http-client-got.js +12 -4
  27. package/package.json +1 -1
@@ -26,84 +26,6 @@ export declare class Exec extends FluentBase implements Executable {
26
26
  exec(): Promise<void>;
27
27
  }
28
28
  export declare class FluentFilters extends FluentBase {
29
- /**
30
- * Filters for a UI element 'wizard item active'.
31
- *
32
- * @return {FluentFiltersOrRelations}
33
- */
34
- wizardItemActive(): FluentFiltersOrRelations;
35
- /**
36
- * Filters for a UI element 'wizard item'.
37
- *
38
- * @return {FluentFiltersOrRelations}
39
- */
40
- wizardItem(): FluentFiltersOrRelations;
41
- /**
42
- * Filters for a UI element 'wizard'.
43
- *
44
- * @return {FluentFiltersOrRelations}
45
- */
46
- wizard(): FluentFiltersOrRelations;
47
- /**
48
- * Filters for a UI element 'windows bar'.
49
- *
50
- * @return {FluentFiltersOrRelations}
51
- */
52
- windowsBar(): FluentFiltersOrRelations;
53
- /**
54
- * Filters for a UI element 'window'.
55
- *
56
- * @return {FluentFiltersOrRelations}
57
- */
58
- window(): FluentFiltersOrRelations;
59
- /**
60
- * Filters for a UI element 'video'.
61
- *
62
- * @return {FluentFiltersOrRelations}
63
- */
64
- video(): FluentFiltersOrRelations;
65
- /**
66
- * Filters for a UI element 'url'.
67
- *
68
- * @return {FluentFiltersOrRelations}
69
- */
70
- url(): FluentFiltersOrRelations;
71
- /**
72
- * Filters for a UI element 'tooltip'.
73
- *
74
- * @return {FluentFiltersOrRelations}
75
- */
76
- tooltip(): FluentFiltersOrRelations;
77
- /**
78
- * Filters for a UI element 'textfield'.
79
- *
80
- * @return {FluentFiltersOrRelations}
81
- */
82
- textfield(): FluentFiltersOrRelations;
83
- /**
84
- * Filters for a UI element 'textarea'.
85
- *
86
- * @return {FluentFiltersOrRelations}
87
- */
88
- textarea(): FluentFiltersOrRelations;
89
- /**
90
- * Filters for a UI element 'table row'.
91
- *
92
- * @return {FluentFiltersOrRelations}
93
- */
94
- tableRow(): FluentFiltersOrRelations;
95
- /**
96
- * Filters for a UI element 'table header'.
97
- *
98
- * @return {FluentFiltersOrRelations}
99
- */
100
- tableHeader(): FluentFiltersOrRelations;
101
- /**
102
- * Filters for a UI element 'table column'.
103
- *
104
- * @return {FluentFiltersOrRelations}
105
- */
106
- tableColumn(): FluentFiltersOrRelations;
107
29
  /**
108
30
  * Filters for a UI element 'table'.
109
31
  *
@@ -111,496 +33,280 @@ export declare class FluentFilters extends FluentBase {
111
33
  */
112
34
  table(): FluentFiltersOrRelations;
113
35
  /**
114
- * Filters for a UI element 'tab selected'.
36
+ * Filters for a UI element 'switch'.
115
37
  *
116
38
  * @return {FluentFiltersOrRelations}
117
39
  */
118
- tabSelected(): FluentFiltersOrRelations;
40
+ switch(): FluentFiltersOrRelations;
119
41
  /**
120
- * Filters for a UI element 'tab bar'.
42
+ * Filters for a UI element 'container'.
121
43
  *
122
44
  * @return {FluentFiltersOrRelations}
123
45
  */
124
- tabBar(): FluentFiltersOrRelations;
46
+ container(): FluentFiltersOrRelations;
125
47
  /**
126
- * Filters for a UI element 'tab active'.
48
+ * Filters for a UI element 'checkbox'.
127
49
  *
128
50
  * @return {FluentFiltersOrRelations}
129
51
  */
130
- tabActive(): FluentFiltersOrRelations;
52
+ checkbox(): FluentFiltersOrRelations;
131
53
  /**
132
- * Filters for a UI element 'tab'.
54
+ * Filters for a UI element 'button'.
133
55
  *
134
- * @return {FluentFiltersOrRelations}
135
- */
136
- tab(): FluentFiltersOrRelations;
137
- /**
138
- * Filters for a UI element 'switch enabled'.
56
+ * **Examples:**
57
+ * ```typescript
58
+ * await aui.moveMouseTo().button().exec()
59
+ * ```
139
60
  *
140
61
  * @return {FluentFiltersOrRelations}
141
62
  */
142
- switchEnabled(): FluentFiltersOrRelations;
63
+ button(): FluentFiltersOrRelations;
143
64
  /**
144
- * Filters for a UI element 'switch disabled'.
65
+ * Filters for an UI element 'text'.
145
66
  *
146
- * @return {FluentFiltersOrRelations}
147
- */
148
- switchDisabled(): FluentFiltersOrRelations;
149
- /**
150
- * Filters for a UI element 'status bar'.
67
+ * Often combined with the filter `withText()` as shown in the below examples.
68
+ * See also the filters `withTextRegex()` and `withExactText()`
151
69
  *
152
- * @return {FluentFiltersOrRelations}
153
- */
154
- statusBar(): FluentFiltersOrRelations;
155
- /**
156
- * Filters for a UI element 'slider indicator'.
70
+ * **Examples:**
71
+ * ```typescript
72
+ * await aui.click().text().withText('Password').exec();
73
+ * await aui.click().text().withExactText('Username').exec();
74
+ * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
75
+ * ```
157
76
  *
158
77
  * @return {FluentFiltersOrRelations}
159
78
  */
160
- sliderIndicator(): FluentFiltersOrRelations;
79
+ text(): FluentFiltersOrRelations;
161
80
  /**
162
- * Filters for a UI element 'slider'.
81
+ * Filters for a UI element 'icon'.
163
82
  *
164
- * @return {FluentFiltersOrRelations}
165
- */
166
- slider(): FluentFiltersOrRelations;
167
- /**
168
- * Filters for a UI element 'sidebar'.
83
+ * You can combine it with the element-description 'withText()' to look for a specific icon.
169
84
  *
170
- * @return {FluentFiltersOrRelations}
171
- */
172
- sidebar(): FluentFiltersOrRelations;
173
- /**
174
- * Filters for a UI element 'scroll bar'.
85
+ * **Examples:**
86
+ * ```typescript
87
+ * icon().withText('plus')
88
+ * ```
175
89
  *
176
- * @return {FluentFiltersOrRelations}
177
- */
178
- scrollBar(): FluentFiltersOrRelations;
179
- /**
180
- * Filters for a UI element 'rect'.
90
+ * **Note:** This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
181
91
  *
182
92
  * @return {FluentFiltersOrRelations}
183
93
  */
184
- rect(): FluentFiltersOrRelations;
94
+ icon(): FluentFiltersOrRelations;
185
95
  /**
186
- * Filters for a UI element 'recaptcha'.
96
+ * 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).
187
97
  *
188
- * @return {FluentFiltersOrRelations}
189
- */
190
- recaptcha(): FluentFiltersOrRelations;
191
- /**
192
- * Filters for a UI element 'rate'.
98
+ * **Example**
99
+ * ```typescript
100
+ * await aui
101
+ * .click()
102
+ * .customElement({
103
+ * customImage: './logo.png', // required
104
+ * name: 'myLogo', // optional
105
+ * threshold: 0.9, // optional, defaults to 0.9
106
+ * rotationDegreePerStep: 0, // optional, defaults to 0
107
+ * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
108
+ * // mask:{x:0, y:0}[] // optional, a polygon to match only a certain area of the custom element
109
+ * })
110
+ * .exec();
111
+ * ```
112
+ *
113
+ * **Arguments**
114
+ *
115
+ * - **customImage** (*`string`, required*):
116
+ * - A cropped image in the form of a base64 string or file path.
117
+ * - **name** (*`string`, optional*):
118
+ * - 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.
119
+ * - **threshold** (*`number`, optional*):
120
+ * - 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`.
121
+ * - **rotationDegreePerStep** (*`number`, optional*):
122
+ * - 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`.
123
+ * - **imageCompareFormat** (*`'RGB' | 'grayscale'`, optional*):
124
+ * - The color compare style. 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three color. Defaults to 'grayscale'.
125
+ * of the given custom image.
193
126
  *
194
- * @return {FluentFiltersOrRelations}
195
- */
196
- rate(): FluentFiltersOrRelations;
197
- /**
198
- * Filters for a UI element 'radio button unselected'.
199
127
  *
200
- * @return {FluentFiltersOrRelations}
201
- */
202
- radioButtonUnselected(): FluentFiltersOrRelations;
203
- /**
204
- * Filters for a UI element 'radio button selected'.
128
+ * @param {CustomElementJson} customElement - The custom element to filter for.
205
129
  *
206
130
  * @return {FluentFiltersOrRelations}
207
131
  */
208
- radioButtonSelected(): FluentFiltersOrRelations;
132
+ customElement(customElement: CustomElementJson): FluentFiltersOrRelations;
209
133
  /**
210
- * Filters for a UI element 'progressbar'.
134
+ * Filters for a UI element 'image'.
211
135
  *
212
- * @return {FluentFiltersOrRelations}
213
- */
214
- progressbar(): FluentFiltersOrRelations;
215
- /**
216
- * Filters for a UI element 'progress bar'.
136
+ * **Examples:**
137
+ * ```typescript
138
+ * // Works if there is only one image visible on the screen
139
+ * await aui.click().image().exec();
217
140
  *
218
- * @return {FluentFiltersOrRelations}
219
- */
220
- progressBar(): FluentFiltersOrRelations;
221
- /**
222
- * Filters for a UI element 'popover'.
141
+ * // Works if you have an image with
142
+ * // a caption text below
143
+ * await aui.click().image().above().text().withText('The caption').exec();
144
+ * ```
223
145
  *
224
146
  * @return {FluentFiltersOrRelations}
225
147
  */
226
- popover(): FluentFiltersOrRelations;
148
+ image(): FluentFiltersOrRelations;
227
149
  /**
228
- * Filters for a UI element 'pil'.
150
+ * Filters for a UI element 'textfield'.
229
151
  *
230
- * @return {FluentFiltersOrRelations}
231
- */
232
- pil(): FluentFiltersOrRelations;
233
- /**
234
- * Filters for a UI element 'password'.
152
+ * **Examples:**
153
+ * ```typescript
154
+ * // Works if there is only one textfield visible on the screen
155
+ * await aui.typeIn('Oh yeah').textfield().exec();
235
156
  *
236
- * @return {FluentFiltersOrRelations}
237
- */
238
- password(): FluentFiltersOrRelations;
239
- /**
240
- * Filters for a UI element 'pager'.
157
+ * // Works if you have a labeled textfield
158
+ * // Label is above the textfield
159
+ * await aui.typeIn('Oh yeah').textfield().below().text().withText('E-Mail Address').exec();
160
+ * ```
241
161
  *
242
162
  * @return {FluentFiltersOrRelations}
243
163
  */
244
- pager(): FluentFiltersOrRelations;
164
+ textfield(): FluentFiltersOrRelations;
245
165
  /**
246
- * Filters for a UI element 'navigation bar'.
166
+ * Filters for similar (doesn't need to be a 100% equal) text.
247
167
  *
248
- * @return {FluentFiltersOrRelations}
249
- */
250
- navigationBar(): FluentFiltersOrRelations;
251
- /**
252
- * Filters for a UI element 'mouse text'.
168
+ * **Examples:**
169
+ * ```typescript
170
+ * 'text' === withText('text') => true
171
+ * 'test' === withText('text') => true
172
+ * 'Test' === withText('text') => true
173
+ * 'Text' === withText('text') => true
174
+ * 'TEXT' === withText('text') => true
175
+ * 'texst' === withText('text') => true
176
+ * 'texts' === withText('text') => true
253
177
  *
254
- * @return {FluentFiltersOrRelations}
255
- */
256
- mouseText(): FluentFiltersOrRelations;
257
- /**
258
- * Filters for a UI element 'mouse pointer'.
178
+ * // usually false
179
+ * 'atebxtc' === withText('text') => false
180
+ * 'other' === withText('text') => false
181
+ * ```
182
+ * ![](https://docs.askui.com/img/gif/withText.gif)
259
183
  *
260
- * @return {FluentFiltersOrRelations}
261
- */
262
- mousePointer(): FluentFiltersOrRelations;
263
- /**
264
- * Filters for a UI element 'mouse cursor'.
184
+ * @param {string} text - A text to be matched.
265
185
  *
266
186
  * @return {FluentFiltersOrRelations}
267
187
  */
268
- mouseCursor(): FluentFiltersOrRelations;
188
+ withText(text: string): FluentFiltersOrRelations;
269
189
  /**
270
- * Filters for a UI element 'modal'.
190
+ * Filters for texts, which match the regex pattern.
271
191
  *
272
- * @return {FluentFiltersOrRelations}
273
- */
274
- modal(): FluentFiltersOrRelations;
275
- /**
276
- * Filters for a UI element 'message box'.
192
+ * **Examples:**
277
193
  *
278
- * @return {FluentFiltersOrRelations}
279
- */
280
- messageBox(): FluentFiltersOrRelations;
281
- /**
282
- * Filters for a UI element 'map'.
194
+ * ```typescript
195
+ * 'The rain in Spain' === withTextRegex('\b[Ss]\w+') => true
196
+ * 'The rain in Portugal' === withTextRegex('\b[Ss]\w+') => false
197
+ * 'The rain in switzerland' === withTextRegex('\b[Ss]\w+') => true
283
198
  *
284
- * @return {FluentFiltersOrRelations}
285
- */
286
- map(): FluentFiltersOrRelations;
287
- /**
288
- * Filters for a UI element 'logo'.
199
+ * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
200
+ * ```
289
201
  *
290
- * @return {FluentFiltersOrRelations}
291
- */
292
- logo(): FluentFiltersOrRelations;
293
- /**
294
- * Filters for a UI element 'link'.
202
+ * @param {string} regex_pattern - A regex pattern
295
203
  *
296
204
  * @return {FluentFiltersOrRelations}
297
205
  */
298
- link(): FluentFiltersOrRelations;
206
+ withTextRegex(regex_pattern: string): FluentFiltersOrRelations;
299
207
  /**
300
- * Filters for a UI element 'keyboard'.
208
+ * Filters for equal text.
301
209
  *
302
- * @return {FluentFiltersOrRelations}
303
- */
304
- keyboard(): FluentFiltersOrRelations;
305
- /**
306
- * Filters for a UI element 'image'.
210
+ * **Note:** This should be only used in cases where the similarity
211
+ * comparison of {@link FluentFilters.withText()} allows not for
212
+ * specific enough filtering (too many elements).
307
213
  *
308
- * @return {FluentFiltersOrRelations}
309
- */
310
- image(): FluentFiltersOrRelations;
311
- /**
312
- * Filters for a UI element 'header'.
214
+ * **Examples:**
215
+ * ```typescript
216
+ * 'text' === withExactText('text') => true
217
+ * 'test' === withExactText('text') => false
218
+ * 'other' === withExactText('text') => false
313
219
  *
314
- * @return {FluentFiltersOrRelations}
315
- */
316
- header(): FluentFiltersOrRelations;
317
- /**
318
- * Filters for a UI element 'footer'.
220
+ * await aui.moveMouseTo().text().withExactText('Password').exec()
221
+ * ```
319
222
  *
320
- * @return {FluentFiltersOrRelations}
321
- */
322
- footer(): FluentFiltersOrRelations;
323
- /**
324
- * Filters for a UI element 'flag'.
223
+ * @param {string} text - A text to be matched.
325
224
  *
326
225
  * @return {FluentFiltersOrRelations}
327
226
  */
328
- flag(): FluentFiltersOrRelations;
227
+ withExactText(text: string): FluentFiltersOrRelations;
329
228
  /**
330
- * Filters for a UI element 'dropdown menu'.
229
+ * Filters for text containing the text provided as an argument.
331
230
  *
332
- * @return {FluentFiltersOrRelations}
333
- */
334
- dropdownMenu(): FluentFiltersOrRelations;
335
- /**
336
- * Filters for a UI element 'divider'.
231
+ * **Examples:**
232
+ * ```typescript
233
+ * 'This is a text' === containsText('text') => true
234
+ * 'This is a text' === containsText('other text') => false
235
+ * 'This is a text' === containsText('other') => false
236
+ * ```
237
+ * ![](https://docs.askui.com/img/gif/containsText.gif)
337
238
  *
338
- * @return {FluentFiltersOrRelations}
339
- */
340
- divider(): FluentFiltersOrRelations;
341
- /**
342
- * Filters for a UI element 'circle'.
239
+ * @param {string} text - A text to be matched.
343
240
  *
344
241
  * @return {FluentFiltersOrRelations}
345
242
  */
346
- circle(): FluentFiltersOrRelations;
243
+ containsText(text: string): FluentFiltersOrRelations;
347
244
  /**
348
- * Filters for a UI element 'checkbox unchecked'.
245
+ * Filters elements based on a textual description.
349
246
  *
350
- * @return {FluentFiltersOrRelations}
351
- */
352
- checkboxUnchecked(): FluentFiltersOrRelations;
353
- /**
354
- * Filters for a UI element 'checkbox checked'.
247
+ * @param {string} text - A description of the target element.
355
248
  *
356
249
  * @return {FluentFiltersOrRelations}
357
250
  */
358
- checkboxChecked(): FluentFiltersOrRelations;
251
+ matching(text: string): FluentFiltersOrRelations;
252
+ }
253
+ export declare class FluentFiltersOrRelations extends FluentFilters {
359
254
  /**
360
- * Filters for a UI element 'chart pie'.
255
+ * Logic or operator
361
256
  *
362
- * @return {FluentFiltersOrRelations}
363
- */
364
- chartPie(): FluentFiltersOrRelations;
365
- /**
366
- * Filters for a UI element 'chart'.
257
+ * **Examples:**
258
+ * ```text
259
+ * scene 1
260
+ * -------------- ---------------
261
+ * | button | | icon |
262
+ * -------------- ---------------
367
263
  *
368
- * @return {FluentFiltersOrRelations}
264
+ * scene 2
265
+ * -------------- ---------------
266
+ * | button | | text |
267
+ * -------------- ---------------
268
+ *
269
+ * ```
270
+ * In case, that your reference element can have multiple values, in the following example, the element right of the button can be either icon or text.
271
+ * You can use **the `or()` relation**, so your instruction is valid for both scenes
272
+ * ```typescript
273
+ * const button = await aui.get().button().rightOf().icon().or().text().exec();
274
+ * console.log(button);
275
+ * ```
276
+ * Returns the same button for both cases
277
+ * ```text
278
+ * console output: [
279
+ * DetectedElement {
280
+ * name: 'BUTTON',
281
+ * text: 'button',
282
+ * bndbox: BoundingBox {
283
+ * xmin: 900,
284
+ * ymin: 910,
285
+ * xmax: 920,
286
+ * ymax: 930
287
+ * }
288
+ * }
289
+ * ]
290
+ * ```
291
+ *
292
+ * @return {FluentFilters}
369
293
  */
370
- chart(): FluentFiltersOrRelations;
294
+ or(): FluentFilters;
371
295
  /**
372
- * Filters for a UI element 'card'.
373
- *
374
- * @return {FluentFiltersOrRelations}
375
- */
376
- card(): FluentFiltersOrRelations;
377
- /**
378
- * Filters for a UI element 'browser bar'.
379
- *
380
- * @return {FluentFiltersOrRelations}
381
- */
382
- browserBar(): FluentFiltersOrRelations;
383
- /**
384
- * Filters for a UI element 'breadcrumb'.
385
- *
386
- * @return {FluentFiltersOrRelations}
387
- */
388
- breadcrumb(): FluentFiltersOrRelations;
389
- /**
390
- * Filters for a UI element 'banner'.
391
- *
392
- * @return {FluentFiltersOrRelations}
393
- */
394
- banner(): FluentFiltersOrRelations;
395
- /**
396
- * Filters for a UI element 'badge'.
397
- *
398
- * @return {FluentFiltersOrRelations}
399
- */
400
- badge(): FluentFiltersOrRelations;
401
- /**
402
- * Filters for a UI element 'alert'.
403
- *
404
- * @return {FluentFiltersOrRelations}
405
- */
406
- alert(): FluentFiltersOrRelations;
407
- /**
408
- * Filters for a UI element 'unknown'.
409
- *
410
- * @return {FluentFiltersOrRelations}
411
- */
412
- unknown(): FluentFiltersOrRelations;
413
- /**
414
- * Filters for an UI element 'button'.
415
- *
416
- * **Examples:**
417
- * ```typescript
418
- * await aui.moveMouseTo().button().exec()
419
- * ```
420
- *
421
- * @return {FluentFiltersOrRelations}
422
- */
423
- button(): FluentFiltersOrRelations;
424
- /**
425
- * Filters for an UI element 'text'.
426
- *
427
- * @return {FluentFiltersOrRelations}
428
- */
429
- text(): FluentFiltersOrRelations;
430
- /**
431
- * Filters for an UI element 'dropdown'.
432
- *
433
- * @return {FluentFiltersOrRelations}
434
- */
435
- dropdown(): FluentFiltersOrRelations;
436
- /**
437
- * Filters for an UI element 'icon'.
438
- *
439
- * You can combine it with the 'withText' command to look for a specific icon.
440
- *
441
- * **Examples:**
442
- * ```typescript
443
- * icon().withText('plus')
444
- * ```
445
- *
446
- * Note: This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
447
- *
448
- * @return {FluentFiltersOrRelations}
449
- */
450
- icon(): FluentFiltersOrRelations;
451
- /**
452
- * Filters for a custom UI element (see {@link CustomElementJson}).
453
- *
454
- * **Important**: This increases the runtime quite a bit. So
455
- * only use it when absolutely necessary.
456
- *
457
- * @param {CustomElementJson} customElement - The custom element to filter for.
458
- *
459
- * @return {FluentFiltersOrRelations}
460
- */
461
- customElement(customElement: CustomElementJson): FluentFiltersOrRelations;
462
- /**
463
- * Filters for a UI element 'checkbox' checked or unchecked.
464
- *
465
- * @return {FluentFiltersOrRelations}
466
- */
467
- checkbox(): FluentFiltersOrRelations;
468
- /**
469
- * Filters for similar (doesn't need to be a 100% equal) text.
470
- *
471
- * **Examples:**
472
- * ```typescript
473
- * 'text' === withText('text') => true
474
- * 'test' === withText('text') => true
475
- * 'Test' === withText('text') => true
476
- * 'Text' === withText('text') => true
477
- * 'TEXT' === withText('text') => true
478
- * 'texst' === withText('text') => true
479
- * 'texts' === withText('text') => true
480
- *
481
- * // usually false
482
- * 'atebxtc' === withText('text') => false
483
- * 'other' === withText('text') => false
484
- * ```
485
- * ![](https://docs.askui.com/img/gif/withText.gif)
486
- *
487
- * @param {string} text - A text to be matched.
488
- *
489
- * @return {FluentFiltersOrRelations}
490
- */
491
- withText(text: string): FluentFiltersOrRelations;
492
- /**
493
- * Filters for texts, which match the regex pattern.
494
- *
495
- * **Examples:**
496
- *
497
- * ```typescript
498
- * 'The rain in Spain' === withTextRegex('\b[Ss]\w+') => true
499
- * 'The rain in Portugal' === withTextRegex('\b[Ss]\w+') => false
500
- * 'The rain in switzerland' === withTextRegex('\b[Ss]\w+') => true
501
- *
502
- * await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
503
- * ```
504
- *
505
- * @param {string} regex_pattern - A regex pattern
506
- *
507
- * @return {FluentFiltersOrRelations}
508
- */
509
- withTextRegex(regex_pattern: string): FluentFiltersOrRelations;
510
- /**
511
- * Filters for equal text.
512
- *
513
- * **Note:** This should be only used in cases where the similarity
514
- * comparison of {@link FluentFilters.withText()} allows not for
515
- * specific enough filtering (too many elements).
516
- *
517
- * **Examples:**
518
- * ```typescript
519
- * 'text' === withExactText('text') => true
520
- * 'test' === withExactText('text') => false
521
- * 'other' === withExactText('text') => false
522
- *
523
- * await aui.moveMouseTo().text().withExactText('Password').exec()
524
- * ```
525
- *
526
- * @param {string} text - A text to be matched.
527
- *
528
- * @return {FluentFiltersOrRelations}
529
- */
530
- withExactText(text: string): FluentFiltersOrRelations;
531
- /**
532
- * Filters for text containing the text provided as an argument.
533
- *
534
- * **Examples:**
535
- * ```typescript
536
- * 'This is an text' === containsText('text') => true
537
- * 'This is an text' === containsText('other text') => false
538
- * 'This is an text' === containsText('other') => false
539
- * ```
540
- * ![](https://docs.askui.com/img/gif/containsText.gif)
541
- *
542
- * @param {string} text - A text to be matched.
543
- *
544
- * @return {FluentFiltersOrRelations}
545
- */
546
- containsText(text: string): FluentFiltersOrRelations;
547
- }
548
- export declare class FluentFiltersOrRelations extends FluentFilters {
549
- /**
550
- * Logic or operator
551
- *
552
- * **Examples:**
553
- * ```text
554
- * scene 1
555
- * -------------- ---------------
556
- * | button | | icon |
557
- * -------------- ---------------
558
- *
559
- * scene 2
560
- * -------------- ---------------
561
- * | button | | text |
562
- * -------------- ---------------
563
- *
564
- * ```
565
- * In case, that your reference element can have multiple values, in the following example, the element right of the button can be either icon or text.
566
- * You can use **the `or()` relation**, so your teststep is valid for both scenes
567
- * ```typescript
568
- * const button = await aui.get().button().rightOf().icon().or().text().exec();
569
- * console.log(button);
570
- * ```
571
- * Returns the same button for both cases
572
- * ```text
573
- * console output: [
574
- * DetectedElement {
575
- * name: 'BUTTON',
576
- * text: 'button',
577
- * bndbox: BoundingBox {
578
- * xmin: 900,
579
- * ymin: 910,
580
- * xmax: 920,
581
- * ymax: 930
582
- * }
583
- * }
584
- * ]
585
- * ```
586
- *
587
- * @return {FluentFilters}
588
- */
589
- or(): FluentFilters;
590
- /**
591
- * Logic and operator
296
+ * Logic and operator
592
297
  *
593
298
  * **Examples:**
594
299
  * ```text
595
300
  * example scene:
596
301
  * --------------- ----------------
597
302
  * | icon user | | icon search |
598
- * --------------- ---------------n```
303
+ * --------------- ----------------
304
+ * ```
599
305
  * ```typescript
600
306
  * const icons = await aui.get().icon().exec();
601
307
  * console.log(icons);
602
308
  * ```
603
- * Using only the filter icon, the get command will return both icons
309
+ * Using only the element-description icon, the get will return both icons
604
310
  * ```text
605
311
  * console output: [
606
312
  * DetectedElement {
@@ -625,12 +331,12 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
625
331
  * }
626
332
  * ]
627
333
  * ```
628
- * You can combine filters with **the `and()` relation** and specify exactly which icon you want
334
+ * You can combine element-descriptions with **the `and()` relation** and specify exactly which icon you want.
629
335
  * ```typescript
630
336
  * const icons = await aui.get().icon().and().withText('user').exec()
631
337
  * console.log(icons)
632
338
  * ```
633
- * The get command returns only the user icon although both elements are icons
339
+ * The get returns only the user icon although both elements are icons.
634
340
  * ```text
635
341
  * console output: [
636
342
  * DetectedElement {
@@ -779,419 +485,59 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
779
485
  *
780
486
  * @return {FluentFilters}
781
487
  */
782
- nearestTo(): FluentFilters;
783
- /**
784
- * Filters for an element containing another element.
785
- *
786
- * **Example:**
787
- * ```typescript
788
- * --------------------
789
- * | outerEl |
790
- * | -------------- |
791
- * | | innerEl | |
792
- * | -------------- |
793
- * | |
794
- * --------------------
795
- *
796
- * // Returns outerEl because outerEl contains innerEl
797
- * ...outerEl().contains().innerEl()
798
- * // Returns no element because innerEl contains no outerEl
799
- * ...innerEl().contains().outerEl()
800
- * ```
801
- * ![](https://docs.askui.com/img/gif/contains.gif)
802
- *
803
- * @return {FluentFilters}
804
- */
805
- contains(): FluentFilters;
806
- exec(): Promise<void>;
807
- }
808
- export declare class FluentFiltersCondition extends FluentBase {
809
- /**
810
- * Filters for a UI element 'wizard item active'.
811
- *
812
- * @return {FluentFiltersOrRelationsCondition}
813
- */
814
- wizardItemActive(): FluentFiltersOrRelationsCondition;
815
- /**
816
- * Filters for a UI element 'wizard item'.
817
- *
818
- * @return {FluentFiltersOrRelationsCondition}
819
- */
820
- wizardItem(): FluentFiltersOrRelationsCondition;
821
- /**
822
- * Filters for a UI element 'wizard'.
823
- *
824
- * @return {FluentFiltersOrRelationsCondition}
825
- */
826
- wizard(): FluentFiltersOrRelationsCondition;
827
- /**
828
- * Filters for a UI element 'windows bar'.
829
- *
830
- * @return {FluentFiltersOrRelationsCondition}
831
- */
832
- windowsBar(): FluentFiltersOrRelationsCondition;
833
- /**
834
- * Filters for a UI element 'window'.
835
- *
836
- * @return {FluentFiltersOrRelationsCondition}
837
- */
838
- window(): FluentFiltersOrRelationsCondition;
839
- /**
840
- * Filters for a UI element 'video'.
841
- *
842
- * @return {FluentFiltersOrRelationsCondition}
843
- */
844
- video(): FluentFiltersOrRelationsCondition;
845
- /**
846
- * Filters for a UI element 'url'.
847
- *
848
- * @return {FluentFiltersOrRelationsCondition}
849
- */
850
- url(): FluentFiltersOrRelationsCondition;
851
- /**
852
- * Filters for a UI element 'tooltip'.
853
- *
854
- * @return {FluentFiltersOrRelationsCondition}
855
- */
856
- tooltip(): FluentFiltersOrRelationsCondition;
857
- /**
858
- * Filters for a UI element 'textfield'.
859
- *
860
- * @return {FluentFiltersOrRelationsCondition}
861
- */
862
- textfield(): FluentFiltersOrRelationsCondition;
863
- /**
864
- * Filters for a UI element 'textarea'.
865
- *
866
- * @return {FluentFiltersOrRelationsCondition}
867
- */
868
- textarea(): FluentFiltersOrRelationsCondition;
869
- /**
870
- * Filters for a UI element 'table row'.
871
- *
872
- * @return {FluentFiltersOrRelationsCondition}
873
- */
874
- tableRow(): FluentFiltersOrRelationsCondition;
875
- /**
876
- * Filters for a UI element 'table header'.
877
- *
878
- * @return {FluentFiltersOrRelationsCondition}
879
- */
880
- tableHeader(): FluentFiltersOrRelationsCondition;
881
- /**
882
- * Filters for a UI element 'table column'.
883
- *
884
- * @return {FluentFiltersOrRelationsCondition}
885
- */
886
- tableColumn(): FluentFiltersOrRelationsCondition;
887
- /**
888
- * Filters for a UI element 'table'.
889
- *
890
- * @return {FluentFiltersOrRelationsCondition}
891
- */
892
- table(): FluentFiltersOrRelationsCondition;
893
- /**
894
- * Filters for a UI element 'tab selected'.
895
- *
896
- * @return {FluentFiltersOrRelationsCondition}
897
- */
898
- tabSelected(): FluentFiltersOrRelationsCondition;
899
- /**
900
- * Filters for a UI element 'tab bar'.
901
- *
902
- * @return {FluentFiltersOrRelationsCondition}
903
- */
904
- tabBar(): FluentFiltersOrRelationsCondition;
905
- /**
906
- * Filters for a UI element 'tab active'.
907
- *
908
- * @return {FluentFiltersOrRelationsCondition}
909
- */
910
- tabActive(): FluentFiltersOrRelationsCondition;
911
- /**
912
- * Filters for a UI element 'tab'.
913
- *
914
- * @return {FluentFiltersOrRelationsCondition}
915
- */
916
- tab(): FluentFiltersOrRelationsCondition;
917
- /**
918
- * Filters for a UI element 'switch enabled'.
919
- *
920
- * @return {FluentFiltersOrRelationsCondition}
921
- */
922
- switchEnabled(): FluentFiltersOrRelationsCondition;
923
- /**
924
- * Filters for a UI element 'switch disabled'.
925
- *
926
- * @return {FluentFiltersOrRelationsCondition}
927
- */
928
- switchDisabled(): FluentFiltersOrRelationsCondition;
929
- /**
930
- * Filters for a UI element 'status bar'.
931
- *
932
- * @return {FluentFiltersOrRelationsCondition}
933
- */
934
- statusBar(): FluentFiltersOrRelationsCondition;
935
- /**
936
- * Filters for a UI element 'slider indicator'.
937
- *
938
- * @return {FluentFiltersOrRelationsCondition}
939
- */
940
- sliderIndicator(): FluentFiltersOrRelationsCondition;
941
- /**
942
- * Filters for a UI element 'slider'.
943
- *
944
- * @return {FluentFiltersOrRelationsCondition}
945
- */
946
- slider(): FluentFiltersOrRelationsCondition;
947
- /**
948
- * Filters for a UI element 'sidebar'.
949
- *
950
- * @return {FluentFiltersOrRelationsCondition}
951
- */
952
- sidebar(): FluentFiltersOrRelationsCondition;
953
- /**
954
- * Filters for a UI element 'scroll bar'.
955
- *
956
- * @return {FluentFiltersOrRelationsCondition}
957
- */
958
- scrollBar(): FluentFiltersOrRelationsCondition;
959
- /**
960
- * Filters for a UI element 'rect'.
961
- *
962
- * @return {FluentFiltersOrRelationsCondition}
963
- */
964
- rect(): FluentFiltersOrRelationsCondition;
965
- /**
966
- * Filters for a UI element 'recaptcha'.
967
- *
968
- * @return {FluentFiltersOrRelationsCondition}
969
- */
970
- recaptcha(): FluentFiltersOrRelationsCondition;
971
- /**
972
- * Filters for a UI element 'rate'.
973
- *
974
- * @return {FluentFiltersOrRelationsCondition}
975
- */
976
- rate(): FluentFiltersOrRelationsCondition;
977
- /**
978
- * Filters for a UI element 'radio button unselected'.
979
- *
980
- * @return {FluentFiltersOrRelationsCondition}
981
- */
982
- radioButtonUnselected(): FluentFiltersOrRelationsCondition;
983
- /**
984
- * Filters for a UI element 'radio button selected'.
985
- *
986
- * @return {FluentFiltersOrRelationsCondition}
987
- */
988
- radioButtonSelected(): FluentFiltersOrRelationsCondition;
989
- /**
990
- * Filters for a UI element 'progressbar'.
991
- *
992
- * @return {FluentFiltersOrRelationsCondition}
993
- */
994
- progressbar(): FluentFiltersOrRelationsCondition;
995
- /**
996
- * Filters for a UI element 'progress bar'.
997
- *
998
- * @return {FluentFiltersOrRelationsCondition}
999
- */
1000
- progressBar(): FluentFiltersOrRelationsCondition;
1001
- /**
1002
- * Filters for a UI element 'popover'.
1003
- *
1004
- * @return {FluentFiltersOrRelationsCondition}
1005
- */
1006
- popover(): FluentFiltersOrRelationsCondition;
1007
- /**
1008
- * Filters for a UI element 'pil'.
1009
- *
1010
- * @return {FluentFiltersOrRelationsCondition}
1011
- */
1012
- pil(): FluentFiltersOrRelationsCondition;
1013
- /**
1014
- * Filters for a UI element 'password'.
1015
- *
1016
- * @return {FluentFiltersOrRelationsCondition}
1017
- */
1018
- password(): FluentFiltersOrRelationsCondition;
1019
- /**
1020
- * Filters for a UI element 'pager'.
1021
- *
1022
- * @return {FluentFiltersOrRelationsCondition}
1023
- */
1024
- pager(): FluentFiltersOrRelationsCondition;
1025
- /**
1026
- * Filters for a UI element 'navigation bar'.
1027
- *
1028
- * @return {FluentFiltersOrRelationsCondition}
1029
- */
1030
- navigationBar(): FluentFiltersOrRelationsCondition;
1031
- /**
1032
- * Filters for a UI element 'mouse text'.
1033
- *
1034
- * @return {FluentFiltersOrRelationsCondition}
1035
- */
1036
- mouseText(): FluentFiltersOrRelationsCondition;
1037
- /**
1038
- * Filters for a UI element 'mouse pointer'.
1039
- *
1040
- * @return {FluentFiltersOrRelationsCondition}
1041
- */
1042
- mousePointer(): FluentFiltersOrRelationsCondition;
1043
- /**
1044
- * Filters for a UI element 'mouse cursor'.
1045
- *
1046
- * @return {FluentFiltersOrRelationsCondition}
1047
- */
1048
- mouseCursor(): FluentFiltersOrRelationsCondition;
1049
- /**
1050
- * Filters for a UI element 'modal'.
1051
- *
1052
- * @return {FluentFiltersOrRelationsCondition}
1053
- */
1054
- modal(): FluentFiltersOrRelationsCondition;
1055
- /**
1056
- * Filters for a UI element 'message box'.
1057
- *
1058
- * @return {FluentFiltersOrRelationsCondition}
1059
- */
1060
- messageBox(): FluentFiltersOrRelationsCondition;
1061
- /**
1062
- * Filters for a UI element 'map'.
1063
- *
1064
- * @return {FluentFiltersOrRelationsCondition}
1065
- */
1066
- map(): FluentFiltersOrRelationsCondition;
1067
- /**
1068
- * Filters for a UI element 'logo'.
1069
- *
1070
- * @return {FluentFiltersOrRelationsCondition}
1071
- */
1072
- logo(): FluentFiltersOrRelationsCondition;
1073
- /**
1074
- * Filters for a UI element 'link'.
1075
- *
1076
- * @return {FluentFiltersOrRelationsCondition}
1077
- */
1078
- link(): FluentFiltersOrRelationsCondition;
1079
- /**
1080
- * Filters for a UI element 'keyboard'.
1081
- *
1082
- * @return {FluentFiltersOrRelationsCondition}
1083
- */
1084
- keyboard(): FluentFiltersOrRelationsCondition;
1085
- /**
1086
- * Filters for a UI element 'image'.
1087
- *
1088
- * @return {FluentFiltersOrRelationsCondition}
1089
- */
1090
- image(): FluentFiltersOrRelationsCondition;
1091
- /**
1092
- * Filters for a UI element 'header'.
1093
- *
1094
- * @return {FluentFiltersOrRelationsCondition}
1095
- */
1096
- header(): FluentFiltersOrRelationsCondition;
1097
- /**
1098
- * Filters for a UI element 'footer'.
1099
- *
1100
- * @return {FluentFiltersOrRelationsCondition}
1101
- */
1102
- footer(): FluentFiltersOrRelationsCondition;
1103
- /**
1104
- * Filters for a UI element 'flag'.
1105
- *
1106
- * @return {FluentFiltersOrRelationsCondition}
1107
- */
1108
- flag(): FluentFiltersOrRelationsCondition;
1109
- /**
1110
- * Filters for a UI element 'dropdown menu'.
1111
- *
1112
- * @return {FluentFiltersOrRelationsCondition}
1113
- */
1114
- dropdownMenu(): FluentFiltersOrRelationsCondition;
1115
- /**
1116
- * Filters for a UI element 'divider'.
1117
- *
1118
- * @return {FluentFiltersOrRelationsCondition}
1119
- */
1120
- divider(): FluentFiltersOrRelationsCondition;
1121
- /**
1122
- * Filters for a UI element 'circle'.
1123
- *
1124
- * @return {FluentFiltersOrRelationsCondition}
1125
- */
1126
- circle(): FluentFiltersOrRelationsCondition;
1127
- /**
1128
- * Filters for a UI element 'checkbox unchecked'.
1129
- *
1130
- * @return {FluentFiltersOrRelationsCondition}
1131
- */
1132
- checkboxUnchecked(): FluentFiltersOrRelationsCondition;
1133
- /**
1134
- * Filters for a UI element 'checkbox checked'.
1135
- *
1136
- * @return {FluentFiltersOrRelationsCondition}
1137
- */
1138
- checkboxChecked(): FluentFiltersOrRelationsCondition;
1139
- /**
1140
- * Filters for a UI element 'chart pie'.
1141
- *
1142
- * @return {FluentFiltersOrRelationsCondition}
1143
- */
1144
- chartPie(): FluentFiltersOrRelationsCondition;
1145
- /**
1146
- * Filters for a UI element 'chart'.
1147
- *
1148
- * @return {FluentFiltersOrRelationsCondition}
1149
- */
1150
- chart(): FluentFiltersOrRelationsCondition;
1151
- /**
1152
- * Filters for a UI element 'card'.
1153
- *
1154
- * @return {FluentFiltersOrRelationsCondition}
1155
- */
1156
- card(): FluentFiltersOrRelationsCondition;
1157
- /**
1158
- * Filters for a UI element 'browser bar'.
1159
- *
1160
- * @return {FluentFiltersOrRelationsCondition}
1161
- */
1162
- browserBar(): FluentFiltersOrRelationsCondition;
488
+ nearestTo(): FluentFilters;
1163
489
  /**
1164
- * Filters for a UI element 'breadcrumb'.
490
+ * Filters for an element containing another element.
1165
491
  *
1166
- * @return {FluentFiltersOrRelationsCondition}
492
+ * **Example:**
493
+ * ```typescript
494
+ * --------------------
495
+ * | outerEl |
496
+ * | -------------- |
497
+ * | | innerEl | |
498
+ * | -------------- |
499
+ * | |
500
+ * --------------------
501
+ *
502
+ * // Returns outerEl because outerEl contains innerEl
503
+ * ...outerEl().contains().innerEl()
504
+ * // Returns no element because innerEl contains no outerEl
505
+ * ...innerEl().contains().outerEl()
506
+ * ```
507
+ * ![](https://docs.askui.com/img/gif/contains.gif)
508
+ *
509
+ * @return {FluentFilters}
1167
510
  */
1168
- breadcrumb(): FluentFiltersOrRelationsCondition;
511
+ contains(): FluentFilters;
512
+ exec(): Promise<void>;
513
+ }
514
+ export declare class FluentFiltersCondition extends FluentBase {
1169
515
  /**
1170
- * Filters for a UI element 'banner'.
516
+ * Filters for a UI element 'table'.
1171
517
  *
1172
518
  * @return {FluentFiltersOrRelationsCondition}
1173
519
  */
1174
- banner(): FluentFiltersOrRelationsCondition;
520
+ table(): FluentFiltersOrRelationsCondition;
1175
521
  /**
1176
- * Filters for a UI element 'badge'.
522
+ * Filters for a UI element 'switch'.
1177
523
  *
1178
524
  * @return {FluentFiltersOrRelationsCondition}
1179
525
  */
1180
- badge(): FluentFiltersOrRelationsCondition;
526
+ switch(): FluentFiltersOrRelationsCondition;
1181
527
  /**
1182
- * Filters for a UI element 'alert'.
528
+ * Filters for a UI element 'container'.
1183
529
  *
1184
530
  * @return {FluentFiltersOrRelationsCondition}
1185
531
  */
1186
- alert(): FluentFiltersOrRelationsCondition;
532
+ container(): FluentFiltersOrRelationsCondition;
1187
533
  /**
1188
- * Filters for a UI element 'unknown'.
534
+ * Filters for a UI element 'checkbox'.
1189
535
  *
1190
536
  * @return {FluentFiltersOrRelationsCondition}
1191
537
  */
1192
- unknown(): FluentFiltersOrRelationsCondition;
538
+ checkbox(): FluentFiltersOrRelationsCondition;
1193
539
  /**
1194
- * Filters for an UI element 'button'.
540
+ * Filters for a UI element 'button'.
1195
541
  *
1196
542
  * **Examples:**
1197
543
  * ```typescript
@@ -1204,35 +550,66 @@ export declare class FluentFiltersCondition extends FluentBase {
1204
550
  /**
1205
551
  * Filters for an UI element 'text'.
1206
552
  *
1207
- * @return {FluentFiltersOrRelationsCondition}
1208
- */
1209
- text(): FluentFiltersOrRelationsCondition;
1210
- /**
1211
- * Filters for an UI element 'dropdown'.
553
+ * Often combined with the filter `withText()` as shown in the below examples.
554
+ * See also the filters `withTextRegex()` and `withExactText()`
555
+ *
556
+ * **Examples:**
557
+ * ```typescript
558
+ * await aui.click().text().withText('Password').exec();
559
+ * await aui.click().text().withExactText('Username').exec();
560
+ * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
561
+ * ```
1212
562
  *
1213
563
  * @return {FluentFiltersOrRelationsCondition}
1214
564
  */
1215
- dropdown(): FluentFiltersOrRelationsCondition;
565
+ text(): FluentFiltersOrRelationsCondition;
1216
566
  /**
1217
- * Filters for an UI element 'icon'.
567
+ * Filters for a UI element 'icon'.
1218
568
  *
1219
- * You can combine it with the 'withText' command to look for a specific icon.
569
+ * You can combine it with the element-description 'withText()' to look for a specific icon.
1220
570
  *
1221
571
  * **Examples:**
1222
572
  * ```typescript
1223
573
  * icon().withText('plus')
1224
574
  * ```
1225
575
  *
1226
- * Note: This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
576
+ * **Note:** This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
1227
577
  *
1228
578
  * @return {FluentFiltersOrRelationsCondition}
1229
579
  */
1230
580
  icon(): FluentFiltersOrRelationsCondition;
1231
581
  /**
1232
- * Filters for a custom UI element (see {@link CustomElementJson}).
582
+ * 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).
583
+ *
584
+ * **Example**
585
+ * ```typescript
586
+ * await aui
587
+ * .click()
588
+ * .customElement({
589
+ * customImage: './logo.png', // required
590
+ * name: 'myLogo', // optional
591
+ * threshold: 0.9, // optional, defaults to 0.9
592
+ * rotationDegreePerStep: 0, // optional, defaults to 0
593
+ * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
594
+ * // mask:{x:0, y:0}[] // optional, a polygon to match only a certain area of the custom element
595
+ * })
596
+ * .exec();
597
+ * ```
598
+ *
599
+ * **Arguments**
600
+ *
601
+ * - **customImage** (*`string`, required*):
602
+ * - A cropped image in the form of a base64 string or file path.
603
+ * - **name** (*`string`, optional*):
604
+ * - 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.
605
+ * - **threshold** (*`number`, optional*):
606
+ * - 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`.
607
+ * - **rotationDegreePerStep** (*`number`, optional*):
608
+ * - 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`.
609
+ * - **imageCompareFormat** (*`'RGB' | 'grayscale'`, optional*):
610
+ * - The color compare style. 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three color. Defaults to 'grayscale'.
611
+ * of the given custom image.
1233
612
  *
1234
- * **Important**: This increases the runtime quite a bit. So
1235
- * only use it when absolutely necessary.
1236
613
  *
1237
614
  * @param {CustomElementJson} customElement - The custom element to filter for.
1238
615
  *
@@ -1240,11 +617,37 @@ export declare class FluentFiltersCondition extends FluentBase {
1240
617
  */
1241
618
  customElement(customElement: CustomElementJson): FluentFiltersOrRelationsCondition;
1242
619
  /**
1243
- * Filters for a UI element 'checkbox' checked or unchecked.
620
+ * Filters for a UI element 'image'.
621
+ *
622
+ * **Examples:**
623
+ * ```typescript
624
+ * // Works if there is only one image visible on the screen
625
+ * await aui.click().image().exec();
626
+ *
627
+ * // Works if you have an image with
628
+ * // a caption text below
629
+ * await aui.click().image().above().text().withText('The caption').exec();
630
+ * ```
1244
631
  *
1245
632
  * @return {FluentFiltersOrRelationsCondition}
1246
633
  */
1247
- checkbox(): FluentFiltersOrRelationsCondition;
634
+ image(): FluentFiltersOrRelationsCondition;
635
+ /**
636
+ * Filters for a UI element 'textfield'.
637
+ *
638
+ * **Examples:**
639
+ * ```typescript
640
+ * // Works if there is only one textfield visible on the screen
641
+ * await aui.typeIn('Oh yeah').textfield().exec();
642
+ *
643
+ * // Works if you have a labeled textfield
644
+ * // Label is above the textfield
645
+ * await aui.typeIn('Oh yeah').textfield().below().text().withText('E-Mail Address').exec();
646
+ * ```
647
+ *
648
+ * @return {FluentFiltersOrRelationsCondition}
649
+ */
650
+ textfield(): FluentFiltersOrRelationsCondition;
1248
651
  /**
1249
652
  * Filters for similar (doesn't need to be a 100% equal) text.
1250
653
  *
@@ -1313,9 +716,9 @@ export declare class FluentFiltersCondition extends FluentBase {
1313
716
  *
1314
717
  * **Examples:**
1315
718
  * ```typescript
1316
- * 'This is an text' === containsText('text') => true
1317
- * 'This is an text' === containsText('other text') => false
1318
- * 'This is an text' === containsText('other') => false
719
+ * 'This is a text' === containsText('text') => true
720
+ * 'This is a text' === containsText('other text') => false
721
+ * 'This is a text' === containsText('other') => false
1319
722
  * ```
1320
723
  * ![](https://docs.askui.com/img/gif/containsText.gif)
1321
724
  *
@@ -1324,6 +727,14 @@ export declare class FluentFiltersCondition extends FluentBase {
1324
727
  * @return {FluentFiltersOrRelationsCondition}
1325
728
  */
1326
729
  containsText(text: string): FluentFiltersOrRelationsCondition;
730
+ /**
731
+ * Filters elements based on a textual description.
732
+ *
733
+ * @param {string} text - A description of the target element.
734
+ *
735
+ * @return {FluentFiltersOrRelationsCondition}
736
+ */
737
+ matching(text: string): FluentFiltersOrRelationsCondition;
1327
738
  }
1328
739
  export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1329
740
  /**
@@ -1343,7 +754,7 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
1343
754
  *
1344
755
  * ```
1345
756
  * In case, that your reference element can have multiple values, in the following example, the element right of the button can be either icon or text.
1346
- * You can use **the `or()` relation**, so your teststep is valid for both scenes
757
+ * You can use **the `or()` relation**, so your instruction is valid for both scenes
1347
758
  * ```typescript
1348
759
  * const button = await aui.get().button().rightOf().icon().or().text().exec();
1349
760
  * console.log(button);
@@ -1375,12 +786,13 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
1375
786
  * example scene:
1376
787
  * --------------- ----------------
1377
788
  * | icon user | | icon search |
1378
- * --------------- ---------------n```
789
+ * --------------- ----------------
790
+ * ```
1379
791
  * ```typescript
1380
792
  * const icons = await aui.get().icon().exec();
1381
793
  * console.log(icons);
1382
794
  * ```
1383
- * Using only the filter icon, the get command will return both icons
795
+ * Using only the element-description icon, the get will return both icons
1384
796
  * ```text
1385
797
  * console output: [
1386
798
  * DetectedElement {
@@ -1405,12 +817,12 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
1405
817
  * }
1406
818
  * ]
1407
819
  * ```
1408
- * You can combine filters with **the `and()` relation** and specify exactly which icon you want
820
+ * You can combine element-descriptions with **the `and()` relation** and specify exactly which icon you want.
1409
821
  * ```typescript
1410
822
  * const icons = await aui.get().icon().and().withText('user').exec()
1411
823
  * console.log(icons)
1412
824
  * ```
1413
- * The get command returns only the user icon although both elements are icons
825
+ * The get returns only the user icon although both elements are icons.
1414
826
  * ```text
1415
827
  * console output: [
1416
828
  * DetectedElement {
@@ -1586,20 +998,46 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
1586
998
  /**
1587
999
  * Expects that filtered element exists.
1588
1000
  *
1001
+ * Always use together with `expect()`.
1002
+ *
1003
+ * **Note** Throws an error and stops the execution when the element is not found. You can catch the error and decide what to do as in the examples below.
1004
+ *
1589
1005
  * **Examples:**
1590
1006
  * ```typescript
1007
+ * // Stops execution at this point when the element does not exist.
1591
1008
  * await aui.expect().text().withText('Login').exists().exec()
1009
+ *
1010
+ * // This will catch the error and log a message
1011
+ * // But the execution will continue afterwards
1012
+ * try {
1013
+ * await aui.expect().text().withText('Login').exists().exec()
1014
+ * } catch (error) {
1015
+ * console.log('Too bad we could not find the element!');
1016
+ * }
1592
1017
  * ```
1593
1018
  *
1594
1019
  * @return {ExecCondition}
1595
1020
  */
1596
1021
  exists(): ExecCondition;
1597
1022
  /**
1598
- * Expects that filtered element does not exist.
1023
+ * Expects that filtered element not exists.
1024
+ *
1025
+ * Always use together with `expect()`.
1026
+ *
1027
+ * **Note** Throws an error and stops the execution when the element is found. You can catch the error and decide what to do as in the examples below.
1599
1028
  *
1600
1029
  * **Examples:**
1601
1030
  * ```typescript
1031
+ * // Stops execution at this point when the element does exist.
1602
1032
  * await aui.expect().text().withText('Login').notExists().exec()
1033
+ *
1034
+ * // This will catch the error and log a message
1035
+ * // But the execution will continue afterwards
1036
+ * try {
1037
+ * await aui.expect().text().withText('Login').notExists().exec()
1038
+ * } catch (error) {
1039
+ * console.log('Too bad we could find the element!');
1040
+ * }
1603
1041
  * ```
1604
1042
  *
1605
1043
  * @return {ExecCondition}
@@ -1613,6 +1051,8 @@ export declare abstract class FluentCommand extends FluentBase {
1613
1051
  /**
1614
1052
  * Expects a condition, e.g., `exists()` or `notExits()`.
1615
1053
  *
1054
+ * Use the structure `expect().<your filter>.(exists()|notExists()` as shown in the examples below.
1055
+ *
1616
1056
  * **Examples:**
1617
1057
  * ```typescript
1618
1058
  * await aui.expect().text().withText('Login').exists().exec()
@@ -1623,7 +1063,9 @@ export declare abstract class FluentCommand extends FluentBase {
1623
1063
  */
1624
1064
  expect(): FluentFiltersCondition;
1625
1065
  /**
1626
- * Clicks on the filtered element.
1066
+ * Mouse left-clicks/taps on the filtered element by moving the mouse cursor to the filtered element first.
1067
+ *
1068
+ * If you need a simple mouseleftclick/tap only, use `mouseLeftClick`.
1627
1069
  *
1628
1070
  * **Example:**
1629
1071
  * ```typescript
@@ -1647,6 +1089,8 @@ export declare abstract class FluentCommand extends FluentBase {
1647
1089
  /**
1648
1090
  * Puts the focus on the filtered element and types in the text.
1649
1091
  *
1092
+ * **Note:** In the current version it copies the text and pastes it.
1093
+ *
1650
1094
  * **Examples:**
1651
1095
  * ```typescript
1652
1096
  * await aui.typeIn('Type some text').textfield().exec()
@@ -1716,11 +1160,14 @@ export declare abstract class FluentCommand extends FluentBase {
1716
1160
  * Types a text at the current position.
1717
1161
  * If you need to focus the element first, use typeIn()
1718
1162
  *
1163
+ * **Note:** In the current version it copies the text and pastes it.
1164
+ *
1719
1165
  * **Examples:**
1720
1166
  * ```typescript
1721
1167
  * await aui.type('Type some text').exec()
1722
1168
  *
1723
- * // mask the text so it is not send to the askui-inference serverawait aui.type('Type some text', { isSecret: true, secretMask: '**' }).exec()
1169
+ * // mask the text so it is not send to the askui-inference server
1170
+ * await aui.type('Type some text', { isSecret: true, secretMask: '**' }).exec()
1724
1171
  * ```
1725
1172
  *
1726
1173
  * @param {string} text - A text to type
@@ -1731,6 +1178,11 @@ export declare abstract class FluentCommand extends FluentBase {
1731
1178
  /**
1732
1179
  * Moves the mouse from the current position (relative) in x and y direction.
1733
1180
  *
1181
+ * **Example:**
1182
+ * ```typescript
1183
+ * await aui.moveMouseRelatively(20, 20).exec();
1184
+ * ```
1185
+ *
1734
1186
  * @param {number} x_offset - A (positive/negative) x direction.
1735
1187
  * @param {number} y_offset - A (positive/negative) y direction.
1736
1188
  *
@@ -1740,6 +1192,13 @@ export declare abstract class FluentCommand extends FluentBase {
1740
1192
  /**
1741
1193
  * Moves the mouse to the absolute x and y coordinates.
1742
1194
  *
1195
+ * If you want to move your mouse cursor to an element, use `moveMouseTo()`.
1196
+ *
1197
+ * **Example:**
1198
+ * ```typescript
1199
+ * await aui.moveMouse(500, 500).exec();
1200
+ * ```
1201
+ *
1743
1202
  * @param {number} x_coordinate - A (positive/negative) x coordinate.
1744
1203
  * @param {number} y_coordinate - A (positive/negative) y coordinate.
1745
1204
  *
@@ -1762,520 +1221,254 @@ export declare abstract class FluentCommand extends FluentBase {
1762
1221
  * @param {number} x_offset - A (positive/negative) x direction.
1763
1222
  * @param {number} y_offset - A (positive/negative) y direction.
1764
1223
  *
1765
- * @return {Exec}
1766
- */
1767
- scroll(x_offset: number, y_offset: number): Exec;
1768
- /**
1769
- * Executes a shell command on the device.
1770
- *
1771
- * **Example:**
1772
- * ```typescript
1773
- * // Open the lastpass app
1774
- * await aui.execOnShell('monkey -p com.lastpass.authenticator 1').exec()
1775
- * ```
1776
- *
1777
- * @param {string} shell_command - A shell command which is executed.
1778
- *
1779
- * @return {Exec}
1780
- */
1781
- execOnShell(shell_command: string): Exec;
1782
- /**
1783
- * Clicks with left mouse key.
1784
- *
1785
- * @return {Exec}
1786
- */
1787
- mouseLeftClick(): Exec;
1788
- /**
1789
- * Clicks with right mouse key.
1790
- *
1791
- * @return {Exec}
1792
- */
1793
- mouseRightClick(): Exec;
1794
- /**
1795
- * Clicks with middle mouse key.
1796
- *
1797
- * @return {Exec}
1798
- */
1799
- mouseMiddleClick(): Exec;
1800
- /**
1801
- * Double-clicks with left mouse key.
1802
- *
1803
- * @return {Exec}
1804
- */
1805
- mouseDoubleLeftClick(): Exec;
1806
- /**
1807
- * Double-clicks with right mouse key.
1808
- *
1809
- * @return {Exec}
1810
- */
1811
- mouseDoubleRightClick(): Exec;
1812
- /**
1813
- * Double-clicks with middle mouse key.
1814
- *
1815
- * @return {Exec}
1816
- */
1817
- mouseDoubleMiddleClick(): Exec;
1818
- /**
1819
- * Toggles mouse down (Left mouse key).
1820
- *
1821
- * @return {Exec}
1822
- */
1823
- mouseToggleDown(): Exec;
1824
- /**
1825
- * Toggles mouse up (Left mouse key).
1826
- *
1827
- * @return {Exec}
1828
- */
1829
- mouseToggleUp(): Exec;
1830
- /**
1831
- * Press three keys like `CTRL+ALT+DEL`
1832
- *
1833
- * @param {MODIFIER_KEY} first_key - A modifier key
1834
- * @param {MODIFIER_KEY} second_key - A modifier key
1835
- * @param {PC_KEY} third_key - A key
1836
- *
1837
- * @return {Exec}
1838
- */
1839
- pressThreeKeys(first_key: MODIFIER_KEY, second_key: MODIFIER_KEY, third_key: PC_KEY): Exec;
1840
- /**
1841
- * Press two keys like `ALT+F4`
1842
- *
1843
- * @param {MODIFIER_KEY} first_key - A modifier key
1844
- * @param {PC_KEY} second_key - A key
1845
- *
1846
- * @return {Exec}
1847
- */
1848
- pressTwoKeys(first_key: MODIFIER_KEY, second_key: PC_KEY): Exec;
1849
- /**
1850
- * Press one keys like `DEL`
1851
- *
1852
- * @param {PC_AND_MODIFIER_KEY} key - A key
1853
- *
1854
- * @return {Exec}
1855
- */
1856
- pressKey(key: PC_AND_MODIFIER_KEY): Exec;
1857
- /**
1858
- * Press three Android keys like `CTRL+ALT+DEL`
1859
- *
1860
- * @param {ANDROID_KEY} first_key - A Android key
1861
- * @param {ANDROID_KEY} second_key - A Android key
1862
- * @param {ANDROID_KEY} third_key - A Android key
1863
- *
1864
- * @return {Exec}
1865
- */
1866
- pressAndroidThirdKey(first_key: ANDROID_KEY, second_key: ANDROID_KEY, third_key: ANDROID_KEY): Exec;
1867
- /**
1868
- * Press two Android keys like `ALT+F4`
1869
- *
1870
- * @param {ANDROID_KEY} first_key - A Android key
1871
- * @param {ANDROID_KEY} second_key - A Android key
1872
- *
1873
- * @return {Exec}
1874
- */
1875
- pressAndroidTwoKey(first_key: ANDROID_KEY, second_key: ANDROID_KEY): Exec;
1876
- /**
1877
- * Press one Android keys like `DEL`
1878
- *
1879
- * @param {ANDROID_KEY} key - A Android key
1880
- *
1881
- * @return {Exec}
1882
- */
1883
- pressAndroidKey(key: ANDROID_KEY): Exec;
1884
- abstract fluentCommandExecutor(instruction: string, customElements: CustomElementJson[]): Promise<void>;
1885
- }
1886
- export interface ExecutableGetter {
1887
- exec(): Promise<DetectedElement[]>;
1888
- }
1889
- export declare class ExecGetter extends FluentBase implements ExecutableGetter {
1890
- exec(): Promise<DetectedElement[]>;
1891
- }
1892
- export declare class FluentFiltersGetter extends FluentBase {
1893
- /**
1894
- * Filters for a UI element 'wizard item active'.
1895
- *
1896
- * @return {FluentFiltersOrRelationsGetter}
1897
- */
1898
- wizardItemActive(): FluentFiltersOrRelationsGetter;
1899
- /**
1900
- * Filters for a UI element 'wizard item'.
1901
- *
1902
- * @return {FluentFiltersOrRelationsGetter}
1903
- */
1904
- wizardItem(): FluentFiltersOrRelationsGetter;
1905
- /**
1906
- * Filters for a UI element 'wizard'.
1907
- *
1908
- * @return {FluentFiltersOrRelationsGetter}
1909
- */
1910
- wizard(): FluentFiltersOrRelationsGetter;
1911
- /**
1912
- * Filters for a UI element 'windows bar'.
1913
- *
1914
- * @return {FluentFiltersOrRelationsGetter}
1915
- */
1916
- windowsBar(): FluentFiltersOrRelationsGetter;
1917
- /**
1918
- * Filters for a UI element 'window'.
1919
- *
1920
- * @return {FluentFiltersOrRelationsGetter}
1921
- */
1922
- window(): FluentFiltersOrRelationsGetter;
1923
- /**
1924
- * Filters for a UI element 'video'.
1925
- *
1926
- * @return {FluentFiltersOrRelationsGetter}
1927
- */
1928
- video(): FluentFiltersOrRelationsGetter;
1929
- /**
1930
- * Filters for a UI element 'url'.
1931
- *
1932
- * @return {FluentFiltersOrRelationsGetter}
1933
- */
1934
- url(): FluentFiltersOrRelationsGetter;
1935
- /**
1936
- * Filters for a UI element 'tooltip'.
1937
- *
1938
- * @return {FluentFiltersOrRelationsGetter}
1939
- */
1940
- tooltip(): FluentFiltersOrRelationsGetter;
1941
- /**
1942
- * Filters for a UI element 'textfield'.
1943
- *
1944
- * @return {FluentFiltersOrRelationsGetter}
1945
- */
1946
- textfield(): FluentFiltersOrRelationsGetter;
1947
- /**
1948
- * Filters for a UI element 'textarea'.
1949
- *
1950
- * @return {FluentFiltersOrRelationsGetter}
1951
- */
1952
- textarea(): FluentFiltersOrRelationsGetter;
1953
- /**
1954
- * Filters for a UI element 'table row'.
1955
- *
1956
- * @return {FluentFiltersOrRelationsGetter}
1957
- */
1958
- tableRow(): FluentFiltersOrRelationsGetter;
1959
- /**
1960
- * Filters for a UI element 'table header'.
1961
- *
1962
- * @return {FluentFiltersOrRelationsGetter}
1224
+ * @return {Exec}
1963
1225
  */
1964
- tableHeader(): FluentFiltersOrRelationsGetter;
1226
+ scroll(x_offset: number, y_offset: number): Exec;
1965
1227
  /**
1966
- * Filters for a UI element 'table column'.
1228
+ * Executes a shell command on the device your UiController is connected to.
1967
1229
  *
1968
- * @return {FluentFiltersOrRelationsGetter}
1969
- */
1970
- tableColumn(): FluentFiltersOrRelationsGetter;
1971
- /**
1972
- * Filters for a UI element 'table'.
1230
+ * **Example:**
1231
+ * ```typescript
1232
+ * // Open the lastpass app
1233
+ * await aui.execOnShell('monkey -p com.lastpass.authenticator 1').exec();
1973
1234
  *
1974
- * @return {FluentFiltersOrRelationsGetter}
1975
- */
1976
- table(): FluentFiltersOrRelationsGetter;
1977
- /**
1978
- * Filters for a UI element 'tab selected'.
1235
+ * // Open Google Chrome on Windows
1236
+ * await aui.execOnShell("start chrome").exec()
1979
1237
  *
1980
- * @return {FluentFiltersOrRelationsGetter}
1981
- */
1982
- tabSelected(): FluentFiltersOrRelationsGetter;
1983
- /**
1984
- * Filters for a UI element 'tab bar'.
1238
+ * ;// Open Google Chrome on macOS
1239
+ * await aui.execOnShell("open -a 'Google Chrome'").exec();
1985
1240
  *
1986
- * @return {FluentFiltersOrRelationsGetter}
1987
- */
1988
- tabBar(): FluentFiltersOrRelationsGetter;
1989
- /**
1990
- * Filters for a UI element 'tab active'.
1241
+ * // Open Google Chrome on Linux
1242
+ * await aui.execOnShell("chrome").exec();
1243
+ * ```
1991
1244
  *
1992
- * @return {FluentFiltersOrRelationsGetter}
1993
- */
1994
- tabActive(): FluentFiltersOrRelationsGetter;
1995
- /**
1996
- * Filters for a UI element 'tab'.
1245
+ * @param {string} shell_command - A shell command which is executed.
1997
1246
  *
1998
- * @return {FluentFiltersOrRelationsGetter}
1247
+ * @return {Exec}
1999
1248
  */
2000
- tab(): FluentFiltersOrRelationsGetter;
1249
+ execOnShell(shell_command: string): Exec;
2001
1250
  /**
2002
- * Filters for a UI element 'switch enabled'.
1251
+ * Clicks with left mouse key.
2003
1252
  *
2004
- * @return {FluentFiltersOrRelationsGetter}
2005
- */
2006
- switchEnabled(): FluentFiltersOrRelationsGetter;
2007
- /**
2008
- * Filters for a UI element 'switch disabled'.
1253
+ * If you need to move the mouse first, use `moveMouseTo()`.
2009
1254
  *
2010
- * @return {FluentFiltersOrRelationsGetter}
2011
- */
2012
- switchDisabled(): FluentFiltersOrRelationsGetter;
2013
- /**
2014
- * Filters for a UI element 'status bar'.
1255
+ * **Examples:**
1256
+ * ```typescript
1257
+ * // Optional: Move mouse to an element first
1258
+ * await aui.moveMouseTo().button().withText('Login').exec();
2015
1259
  *
2016
- * @return {FluentFiltersOrRelationsGetter}
2017
- */
2018
- statusBar(): FluentFiltersOrRelationsGetter;
2019
- /**
2020
- * Filters for a UI element 'slider indicator'.
1260
+ * await aui.mouseLeftClick().exec();
1261
+ * ```
2021
1262
  *
2022
- * @return {FluentFiltersOrRelationsGetter}
1263
+ * @return {Exec}
2023
1264
  */
2024
- sliderIndicator(): FluentFiltersOrRelationsGetter;
1265
+ mouseLeftClick(): Exec;
2025
1266
  /**
2026
- * Filters for a UI element 'slider'.
1267
+ * Clicks with right mouse key.
2027
1268
  *
2028
- * @return {FluentFiltersOrRelationsGetter}
2029
- */
2030
- slider(): FluentFiltersOrRelationsGetter;
2031
- /**
2032
- * Filters for a UI element 'sidebar'.
1269
+ * If you need to move the mouse first, use `moveMouseTo()`.
2033
1270
  *
2034
- * @return {FluentFiltersOrRelationsGetter}
2035
- */
2036
- sidebar(): FluentFiltersOrRelationsGetter;
2037
- /**
2038
- * Filters for a UI element 'scroll bar'.
1271
+ * **Examples:**
1272
+ * ```typescript
1273
+ * // Optional: Move mouse to an element first
1274
+ * await aui.moveMouseTo().button().withText('Login').exec();
2039
1275
  *
2040
- * @return {FluentFiltersOrRelationsGetter}
2041
- */
2042
- scrollBar(): FluentFiltersOrRelationsGetter;
2043
- /**
2044
- * Filters for a UI element 'rect'.
1276
+ * await aui.mouseRightClick().exec();
1277
+ * ```
2045
1278
  *
2046
- * @return {FluentFiltersOrRelationsGetter}
1279
+ * @return {Exec}
2047
1280
  */
2048
- rect(): FluentFiltersOrRelationsGetter;
1281
+ mouseRightClick(): Exec;
2049
1282
  /**
2050
- * Filters for a UI element 'recaptcha'.
1283
+ * Clicks with middle mouse key.
2051
1284
  *
2052
- * @return {FluentFiltersOrRelationsGetter}
2053
- */
2054
- recaptcha(): FluentFiltersOrRelationsGetter;
2055
- /**
2056
- * Filters for a UI element 'rate'.
1285
+ * If you need to move the mouse first, use `moveMouseTo()`.
2057
1286
  *
2058
- * @return {FluentFiltersOrRelationsGetter}
2059
- */
2060
- rate(): FluentFiltersOrRelationsGetter;
2061
- /**
2062
- * Filters for a UI element 'radio button unselected'.
1287
+ * **Examples:**
1288
+ * ```typescript
1289
+ * // Optional: Move mouse to an element first
1290
+ * await aui.moveMouseTo().button().withText('Login').exec();
2063
1291
  *
2064
- * @return {FluentFiltersOrRelationsGetter}
2065
- */
2066
- radioButtonUnselected(): FluentFiltersOrRelationsGetter;
2067
- /**
2068
- * Filters for a UI element 'radio button selected'.
1292
+ * await aui.mouseMiddleClick().exec();
1293
+ * ```
2069
1294
  *
2070
- * @return {FluentFiltersOrRelationsGetter}
1295
+ * @return {Exec}
2071
1296
  */
2072
- radioButtonSelected(): FluentFiltersOrRelationsGetter;
1297
+ mouseMiddleClick(): Exec;
2073
1298
  /**
2074
- * Filters for a UI element 'progressbar'.
1299
+ * Double-clicks with left mouse key.
2075
1300
  *
2076
- * @return {FluentFiltersOrRelationsGetter}
2077
- */
2078
- progressbar(): FluentFiltersOrRelationsGetter;
2079
- /**
2080
- * Filters for a UI element 'progress bar'.
1301
+ * If you need to move the mouse first, use `moveMouseTo()`.
2081
1302
  *
2082
- * @return {FluentFiltersOrRelationsGetter}
2083
- */
2084
- progressBar(): FluentFiltersOrRelationsGetter;
2085
- /**
2086
- * Filters for a UI element 'popover'.
1303
+ * **Examples:**
1304
+ * ```typescript
1305
+ * // Optional: Move mouse to an element first
1306
+ * await aui.moveMouseTo().button().withText('Login').exec();
2087
1307
  *
2088
- * @return {FluentFiltersOrRelationsGetter}
2089
- */
2090
- popover(): FluentFiltersOrRelationsGetter;
2091
- /**
2092
- * Filters for a UI element 'pil'.
1308
+ * await aui.mouseDoubleLeftClick().exec();
1309
+ * ```
2093
1310
  *
2094
- * @return {FluentFiltersOrRelationsGetter}
1311
+ * @return {Exec}
2095
1312
  */
2096
- pil(): FluentFiltersOrRelationsGetter;
1313
+ mouseDoubleLeftClick(): Exec;
2097
1314
  /**
2098
- * Filters for a UI element 'password'.
1315
+ * Double-clicks with right mouse key.
2099
1316
  *
2100
- * @return {FluentFiltersOrRelationsGetter}
2101
- */
2102
- password(): FluentFiltersOrRelationsGetter;
2103
- /**
2104
- * Filters for a UI element 'pager'.
1317
+ * If you need to move the mouse first, use `moveMouseTo()`.
2105
1318
  *
2106
- * @return {FluentFiltersOrRelationsGetter}
2107
- */
2108
- pager(): FluentFiltersOrRelationsGetter;
2109
- /**
2110
- * Filters for a UI element 'navigation bar'.
1319
+ * **Examples:**
1320
+ * ```typescript
1321
+ * // Optional: Move mouse to an element first
1322
+ * await aui.moveMouseTo().button().withText('Login').exec();
2111
1323
  *
2112
- * @return {FluentFiltersOrRelationsGetter}
2113
- */
2114
- navigationBar(): FluentFiltersOrRelationsGetter;
2115
- /**
2116
- * Filters for a UI element 'mouse text'.
1324
+ * await aui.mouseDoubleRightClick().exec();
1325
+ * ```
2117
1326
  *
2118
- * @return {FluentFiltersOrRelationsGetter}
1327
+ * @return {Exec}
2119
1328
  */
2120
- mouseText(): FluentFiltersOrRelationsGetter;
1329
+ mouseDoubleRightClick(): Exec;
2121
1330
  /**
2122
- * Filters for a UI element 'mouse pointer'.
1331
+ * Double-clicks with middle mouse key.
2123
1332
  *
2124
- * @return {FluentFiltersOrRelationsGetter}
2125
- */
2126
- mousePointer(): FluentFiltersOrRelationsGetter;
2127
- /**
2128
- * Filters for a UI element 'mouse cursor'.
1333
+ * If you need to move the mouse first, use `moveMouseTo()`.
2129
1334
  *
2130
- * @return {FluentFiltersOrRelationsGetter}
2131
- */
2132
- mouseCursor(): FluentFiltersOrRelationsGetter;
2133
- /**
2134
- * Filters for a UI element 'modal'.
1335
+ * **Examples:**
1336
+ * ```typescript
1337
+ * // Optional: Move mouse to an element first
1338
+ * await aui.moveMouseTo().button().withText('Login').exec();
2135
1339
  *
2136
- * @return {FluentFiltersOrRelationsGetter}
2137
- */
2138
- modal(): FluentFiltersOrRelationsGetter;
2139
- /**
2140
- * Filters for a UI element 'message box'.
1340
+ * await aui.mouseDoubleMiddleClick().exec();
1341
+ * ```
2141
1342
  *
2142
- * @return {FluentFiltersOrRelationsGetter}
1343
+ * @return {Exec}
2143
1344
  */
2144
- messageBox(): FluentFiltersOrRelationsGetter;
1345
+ mouseDoubleMiddleClick(): Exec;
2145
1346
  /**
2146
- * Filters for a UI element 'map'.
1347
+ * Toggles mouse down (Left mouse key/tap).
2147
1348
  *
2148
- * @return {FluentFiltersOrRelationsGetter}
2149
- */
2150
- map(): FluentFiltersOrRelationsGetter;
2151
- /**
2152
- * Filters for a UI element 'logo'.
1349
+ * **Example:**
1350
+ * ```typescript
1351
+ * await aui.mouseToggleDown().exec();
1352
+ * ```
2153
1353
  *
2154
- * @return {FluentFiltersOrRelationsGetter}
1354
+ * @return {Exec}
2155
1355
  */
2156
- logo(): FluentFiltersOrRelationsGetter;
1356
+ mouseToggleDown(): Exec;
2157
1357
  /**
2158
- * Filters for a UI element 'link'.
1358
+ * Toggles mouse up (Left mouse key/tap).
2159
1359
  *
2160
- * @return {FluentFiltersOrRelationsGetter}
2161
- */
2162
- link(): FluentFiltersOrRelationsGetter;
2163
- /**
2164
- * Filters for a UI element 'keyboard'.
1360
+ * **Example:**
1361
+ * ```typescript
1362
+ * await aui.mouseToggleUp().exec();
1363
+ * ```
2165
1364
  *
2166
- * @return {FluentFiltersOrRelationsGetter}
1365
+ * @return {Exec}
2167
1366
  */
2168
- keyboard(): FluentFiltersOrRelationsGetter;
1367
+ mouseToggleUp(): Exec;
2169
1368
  /**
2170
- * Filters for a UI element 'image'.
1369
+ * Press three keys like `CTRL+ALT+DEL`
2171
1370
  *
2172
- * @return {FluentFiltersOrRelationsGetter}
2173
- */
2174
- image(): FluentFiltersOrRelationsGetter;
2175
- /**
2176
- * Filters for a UI element 'header'.
1371
+ * **Operating system specific mappings:**
1372
+ * 1. Windows: `command`-key maps to `windows`-key
1373
+ * ---
2177
1374
  *
2178
- * @return {FluentFiltersOrRelationsGetter}
2179
- */
2180
- header(): FluentFiltersOrRelationsGetter;
2181
- /**
2182
- * Filters for a UI element 'footer'.
2183
1375
  *
2184
- * @return {FluentFiltersOrRelationsGetter}
2185
- */
2186
- footer(): FluentFiltersOrRelationsGetter;
2187
- /**
2188
- * Filters for a UI element 'flag'.
1376
+ * @param {MODIFIER_KEY} first_key - A modifier key
1377
+ * @param {MODIFIER_KEY} second_key - A modifier key
1378
+ * @param {PC_KEY} third_key - A key
2189
1379
  *
2190
- * @return {FluentFiltersOrRelationsGetter}
1380
+ * @return {Exec}
2191
1381
  */
2192
- flag(): FluentFiltersOrRelationsGetter;
1382
+ pressThreeKeys(first_key: MODIFIER_KEY, second_key: MODIFIER_KEY, third_key: PC_KEY): Exec;
2193
1383
  /**
2194
- * Filters for a UI element 'dropdown menu'.
1384
+ * Press two keys like `ALT+F4`
2195
1385
  *
2196
- * @return {FluentFiltersOrRelationsGetter}
2197
- */
2198
- dropdownMenu(): FluentFiltersOrRelationsGetter;
2199
- /**
2200
- * Filters for a UI element 'divider'.
1386
+ * **Operating system specific mappings:**
1387
+ * 1. Windows: `command`-key maps to `windows`-key
1388
+ * ---
2201
1389
  *
2202
- * @return {FluentFiltersOrRelationsGetter}
2203
- */
2204
- divider(): FluentFiltersOrRelationsGetter;
2205
- /**
2206
- * Filters for a UI element 'circle'.
2207
1390
  *
2208
- * @return {FluentFiltersOrRelationsGetter}
2209
- */
2210
- circle(): FluentFiltersOrRelationsGetter;
2211
- /**
2212
- * Filters for a UI element 'checkbox unchecked'.
1391
+ * @param {MODIFIER_KEY} first_key - A modifier key
1392
+ * @param {PC_KEY} second_key - A key
2213
1393
  *
2214
- * @return {FluentFiltersOrRelationsGetter}
1394
+ * @return {Exec}
2215
1395
  */
2216
- checkboxUnchecked(): FluentFiltersOrRelationsGetter;
1396
+ pressTwoKeys(first_key: MODIFIER_KEY, second_key: PC_KEY): Exec;
2217
1397
  /**
2218
- * Filters for a UI element 'checkbox checked'.
1398
+ * Press one keys like `DEL`
2219
1399
  *
2220
- * @return {FluentFiltersOrRelationsGetter}
2221
- */
2222
- checkboxChecked(): FluentFiltersOrRelationsGetter;
2223
- /**
2224
- * Filters for a UI element 'chart pie'.
1400
+ * **Operating system specific mappings:**
1401
+ * 1. Windows: `command`-key maps to `windows`-key
1402
+ * ---
2225
1403
  *
2226
- * @return {FluentFiltersOrRelationsGetter}
2227
- */
2228
- chartPie(): FluentFiltersOrRelationsGetter;
2229
- /**
2230
- * Filters for a UI element 'chart'.
2231
1404
  *
2232
- * @return {FluentFiltersOrRelationsGetter}
1405
+ * @param {PC_AND_MODIFIER_KEY} key - A key
1406
+ *
1407
+ * @return {Exec}
2233
1408
  */
2234
- chart(): FluentFiltersOrRelationsGetter;
1409
+ pressKey(key: PC_AND_MODIFIER_KEY): Exec;
2235
1410
  /**
2236
- * Filters for a UI element 'card'.
1411
+ * Press three Android keys like `CTRL+ALT+DEL`
2237
1412
  *
2238
- * @return {FluentFiltersOrRelationsGetter}
1413
+ * @param {ANDROID_KEY} first_key - A Android key
1414
+ * @param {ANDROID_KEY} second_key - A Android key
1415
+ * @param {ANDROID_KEY} third_key - A Android key
1416
+ *
1417
+ * @return {Exec}
2239
1418
  */
2240
- card(): FluentFiltersOrRelationsGetter;
1419
+ pressAndroidThirdKey(first_key: ANDROID_KEY, second_key: ANDROID_KEY, third_key: ANDROID_KEY): Exec;
2241
1420
  /**
2242
- * Filters for a UI element 'browser bar'.
1421
+ * Press two Android keys like `ALT+F4`
2243
1422
  *
2244
- * @return {FluentFiltersOrRelationsGetter}
1423
+ * @param {ANDROID_KEY} first_key - A Android key
1424
+ * @param {ANDROID_KEY} second_key - A Android key
1425
+ *
1426
+ * @return {Exec}
2245
1427
  */
2246
- browserBar(): FluentFiltersOrRelationsGetter;
1428
+ pressAndroidTwoKey(first_key: ANDROID_KEY, second_key: ANDROID_KEY): Exec;
2247
1429
  /**
2248
- * Filters for a UI element 'breadcrumb'.
1430
+ * Press one Android key like `DEL`
2249
1431
  *
2250
- * @return {FluentFiltersOrRelationsGetter}
1432
+ * @param {ANDROID_KEY} key - A Android key
1433
+ *
1434
+ * @return {Exec}
2251
1435
  */
2252
- breadcrumb(): FluentFiltersOrRelationsGetter;
1436
+ pressAndroidKey(key: ANDROID_KEY): Exec;
1437
+ abstract fluentCommandExecutor(instruction: string, customElements: CustomElementJson[]): Promise<void>;
1438
+ }
1439
+ export interface ExecutableGetter {
1440
+ exec(): Promise<DetectedElement[]>;
1441
+ }
1442
+ export declare class ExecGetter extends FluentBase implements ExecutableGetter {
1443
+ exec(): Promise<DetectedElement[]>;
1444
+ }
1445
+ export declare class FluentFiltersGetter extends FluentBase {
2253
1446
  /**
2254
- * Filters for a UI element 'banner'.
1447
+ * Filters for a UI element 'table'.
2255
1448
  *
2256
1449
  * @return {FluentFiltersOrRelationsGetter}
2257
1450
  */
2258
- banner(): FluentFiltersOrRelationsGetter;
1451
+ table(): FluentFiltersOrRelationsGetter;
2259
1452
  /**
2260
- * Filters for a UI element 'badge'.
1453
+ * Filters for a UI element 'switch'.
2261
1454
  *
2262
1455
  * @return {FluentFiltersOrRelationsGetter}
2263
1456
  */
2264
- badge(): FluentFiltersOrRelationsGetter;
1457
+ switch(): FluentFiltersOrRelationsGetter;
2265
1458
  /**
2266
- * Filters for a UI element 'alert'.
1459
+ * Filters for a UI element 'container'.
2267
1460
  *
2268
1461
  * @return {FluentFiltersOrRelationsGetter}
2269
1462
  */
2270
- alert(): FluentFiltersOrRelationsGetter;
1463
+ container(): FluentFiltersOrRelationsGetter;
2271
1464
  /**
2272
- * Filters for a UI element 'unknown'.
1465
+ * Filters for a UI element 'checkbox'.
2273
1466
  *
2274
1467
  * @return {FluentFiltersOrRelationsGetter}
2275
1468
  */
2276
- unknown(): FluentFiltersOrRelationsGetter;
1469
+ checkbox(): FluentFiltersOrRelationsGetter;
2277
1470
  /**
2278
- * Filters for an UI element 'button'.
1471
+ * Filters for a UI element 'button'.
2279
1472
  *
2280
1473
  * **Examples:**
2281
1474
  * ```typescript
@@ -2288,35 +1481,66 @@ export declare class FluentFiltersGetter extends FluentBase {
2288
1481
  /**
2289
1482
  * Filters for an UI element 'text'.
2290
1483
  *
2291
- * @return {FluentFiltersOrRelationsGetter}
2292
- */
2293
- text(): FluentFiltersOrRelationsGetter;
2294
- /**
2295
- * Filters for an UI element 'dropdown'.
1484
+ * Often combined with the filter `withText()` as shown in the below examples.
1485
+ * See also the filters `withTextRegex()` and `withExactText()`
1486
+ *
1487
+ * **Examples:**
1488
+ * ```typescript
1489
+ * await aui.click().text().withText('Password').exec();
1490
+ * await aui.click().text().withExactText('Username').exec();
1491
+ * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
1492
+ * ```
2296
1493
  *
2297
1494
  * @return {FluentFiltersOrRelationsGetter}
2298
1495
  */
2299
- dropdown(): FluentFiltersOrRelationsGetter;
1496
+ text(): FluentFiltersOrRelationsGetter;
2300
1497
  /**
2301
- * Filters for an UI element 'icon'.
1498
+ * Filters for a UI element 'icon'.
2302
1499
  *
2303
- * You can combine it with the 'withText' command to look for a specific icon.
1500
+ * You can combine it with the element-description 'withText()' to look for a specific icon.
2304
1501
  *
2305
1502
  * **Examples:**
2306
1503
  * ```typescript
2307
1504
  * icon().withText('plus')
2308
1505
  * ```
2309
1506
  *
2310
- * Note: This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
1507
+ * **Note:** This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
2311
1508
  *
2312
1509
  * @return {FluentFiltersOrRelationsGetter}
2313
1510
  */
2314
1511
  icon(): FluentFiltersOrRelationsGetter;
2315
1512
  /**
2316
- * Filters for a custom UI element (see {@link CustomElementJson}).
1513
+ * 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).
1514
+ *
1515
+ * **Example**
1516
+ * ```typescript
1517
+ * await aui
1518
+ * .click()
1519
+ * .customElement({
1520
+ * customImage: './logo.png', // required
1521
+ * name: 'myLogo', // optional
1522
+ * threshold: 0.9, // optional, defaults to 0.9
1523
+ * rotationDegreePerStep: 0, // optional, defaults to 0
1524
+ * imageCompareFormat: 'grayscale', // optional, defaults to 'grayscale'
1525
+ * // mask:{x:0, y:0}[] // optional, a polygon to match only a certain area of the custom element
1526
+ * })
1527
+ * .exec();
1528
+ * ```
1529
+ *
1530
+ * **Arguments**
1531
+ *
1532
+ * - **customImage** (*`string`, required*):
1533
+ * - A cropped image in the form of a base64 string or file path.
1534
+ * - **name** (*`string`, optional*):
1535
+ * - 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.
1536
+ * - **threshold** (*`number`, optional*):
1537
+ * - 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`.
1538
+ * - **rotationDegreePerStep** (*`number`, optional*):
1539
+ * - 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`.
1540
+ * - **imageCompareFormat** (*`'RGB' | 'grayscale'`, optional*):
1541
+ * - The color compare style. 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three color. Defaults to 'grayscale'.
1542
+ * of the given custom image.
2317
1543
  *
2318
- * **Important**: This increases the runtime quite a bit. So
2319
- * only use it when absolutely necessary.
2320
1544
  *
2321
1545
  * @param {CustomElementJson} customElement - The custom element to filter for.
2322
1546
  *
@@ -2324,11 +1548,37 @@ export declare class FluentFiltersGetter extends FluentBase {
2324
1548
  */
2325
1549
  customElement(customElement: CustomElementJson): FluentFiltersOrRelationsGetter;
2326
1550
  /**
2327
- * Filters for a UI element 'checkbox' checked or unchecked.
1551
+ * Filters for a UI element 'image'.
1552
+ *
1553
+ * **Examples:**
1554
+ * ```typescript
1555
+ * // Works if there is only one image visible on the screen
1556
+ * await aui.click().image().exec();
1557
+ *
1558
+ * // Works if you have an image with
1559
+ * // a caption text below
1560
+ * await aui.click().image().above().text().withText('The caption').exec();
1561
+ * ```
2328
1562
  *
2329
1563
  * @return {FluentFiltersOrRelationsGetter}
2330
1564
  */
2331
- checkbox(): FluentFiltersOrRelationsGetter;
1565
+ image(): FluentFiltersOrRelationsGetter;
1566
+ /**
1567
+ * Filters for a UI element 'textfield'.
1568
+ *
1569
+ * **Examples:**
1570
+ * ```typescript
1571
+ * // Works if there is only one textfield visible on the screen
1572
+ * await aui.typeIn('Oh yeah').textfield().exec();
1573
+ *
1574
+ * // Works if you have a labeled textfield
1575
+ * // Label is above the textfield
1576
+ * await aui.typeIn('Oh yeah').textfield().below().text().withText('E-Mail Address').exec();
1577
+ * ```
1578
+ *
1579
+ * @return {FluentFiltersOrRelationsGetter}
1580
+ */
1581
+ textfield(): FluentFiltersOrRelationsGetter;
2332
1582
  /**
2333
1583
  * Filters for similar (doesn't need to be a 100% equal) text.
2334
1584
  *
@@ -2397,9 +1647,9 @@ export declare class FluentFiltersGetter extends FluentBase {
2397
1647
  *
2398
1648
  * **Examples:**
2399
1649
  * ```typescript
2400
- * 'This is an text' === containsText('text') => true
2401
- * 'This is an text' === containsText('other text') => false
2402
- * 'This is an text' === containsText('other') => false
1650
+ * 'This is a text' === containsText('text') => true
1651
+ * 'This is a text' === containsText('other text') => false
1652
+ * 'This is a text' === containsText('other') => false
2403
1653
  * ```
2404
1654
  * ![](https://docs.askui.com/img/gif/containsText.gif)
2405
1655
  *
@@ -2408,6 +1658,14 @@ export declare class FluentFiltersGetter extends FluentBase {
2408
1658
  * @return {FluentFiltersOrRelationsGetter}
2409
1659
  */
2410
1660
  containsText(text: string): FluentFiltersOrRelationsGetter;
1661
+ /**
1662
+ * Filters elements based on a textual description.
1663
+ *
1664
+ * @param {string} text - A description of the target element.
1665
+ *
1666
+ * @return {FluentFiltersOrRelationsGetter}
1667
+ */
1668
+ matching(text: string): FluentFiltersOrRelationsGetter;
2411
1669
  }
2412
1670
  export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2413
1671
  /**
@@ -2427,7 +1685,7 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
2427
1685
  *
2428
1686
  * ```
2429
1687
  * In case, that your reference element can have multiple values, in the following example, the element right of the button can be either icon or text.
2430
- * You can use **the `or()` relation**, so your teststep is valid for both scenes
1688
+ * You can use **the `or()` relation**, so your instruction is valid for both scenes
2431
1689
  * ```typescript
2432
1690
  * const button = await aui.get().button().rightOf().icon().or().text().exec();
2433
1691
  * console.log(button);
@@ -2459,12 +1717,13 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
2459
1717
  * example scene:
2460
1718
  * --------------- ----------------
2461
1719
  * | icon user | | icon search |
2462
- * --------------- ---------------n```
1720
+ * --------------- ----------------
1721
+ * ```
2463
1722
  * ```typescript
2464
1723
  * const icons = await aui.get().icon().exec();
2465
1724
  * console.log(icons);
2466
1725
  * ```
2467
- * Using only the filter icon, the get command will return both icons
1726
+ * Using only the element-description icon, the get will return both icons
2468
1727
  * ```text
2469
1728
  * console output: [
2470
1729
  * DetectedElement {
@@ -2489,12 +1748,12 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
2489
1748
  * }
2490
1749
  * ]
2491
1750
  * ```
2492
- * You can combine filters with **the `and()` relation** and specify exactly which icon you want
1751
+ * You can combine element-descriptions with **the `and()` relation** and specify exactly which icon you want.
2493
1752
  * ```typescript
2494
1753
  * const icons = await aui.get().icon().and().withText('user').exec()
2495
1754
  * console.log(icons)
2496
1755
  * ```
2497
- * The get command returns only the user icon although both elements are icons
1756
+ * The get returns only the user icon although both elements are icons.
2498
1757
  * ```text
2499
1758
  * console output: [
2500
1759
  * DetectedElement {
@@ -2698,7 +1957,7 @@ export declare abstract class Getter extends FluentCommand {
2698
1957
  * xmax: 1178.8204241071428,
2699
1958
  * ymax: 180.83512834821428
2700
1959
  * }
2701
- * }
1960
+ * }
2702
1961
  * ]
2703
1962
  * ```
2704
1963
  *
@@ -2738,7 +1997,7 @@ export declare abstract class Getter extends FluentCommand {
2738
1997
  * ymax: 950.47812834821428
2739
1998
  * },
2740
1999
  * ... 381 more items
2741
- * }
2000
+ * }
2742
2001
  * ]
2743
2002
  * ```
2744
2003
  *