askui 0.20.1 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/execution/dsl.d.ts +177 -49
- package/dist/cjs/execution/dsl.js +224 -96
- package/dist/esm/execution/dsl.d.ts +177 -49
- package/dist/esm/execution/dsl.js +224 -96
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ import { DetectedElement } from '../core/model/annotation-result/detected-elemen
|
|
|
3
3
|
export declare enum Separators {
|
|
4
4
|
STRING = "<|string|>"
|
|
5
5
|
}
|
|
6
|
-
export declare type
|
|
6
|
+
export declare type INTERSECTION_AREA = 'element_center_line' | 'element_edge_area' | 'display_edge_area';
|
|
7
7
|
export declare type PC_KEY = 'backspace' | 'delete' | 'enter' | 'tab' | 'escape' | 'up' | 'down' | 'right' | 'left' | 'home' | 'end' | 'pageup' | 'pagedown' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'f10' | 'f11' | 'f12' | 'space' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '!' | '"' | '#' | '$' | '%' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~ ';
|
|
8
8
|
export declare type ANDROID_KEY = 'home' | 'back' | 'call' | 'endcall' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'star' | 'pound' | 'dpad_up' | 'dpad_down' | 'dpad_left' | 'dpad_right' | 'dpad_center' | 'volume_up' | 'volume_down' | 'power' | 'camera' | 'clear' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'comma' | 'period' | 'alt_left' | 'alt_right' | 'shift_left' | 'shift_right' | 'tab' | 'space' | 'sym' | 'explorer' | 'envelope' | 'enter' | 'del' | 'grave' | 'minus' | 'equals' | 'left_bracket' | 'right_bracket' | 'backslash' | 'semicolon' | 'apostrophe' | 'slash' | 'at' | 'num' | 'headsethook' | 'focus' | 'plus' | 'menu' | 'notification' | 'search' | 'media_play_pause' | 'media_stop' | 'media_next' | 'media_previous' | 'media_rewind' | 'media_fast_forward' | 'mute' | 'page_up' | 'page_down' | 'switch_charset' | 'escape' | 'forward_del' | 'ctrl_left' | 'ctrl_right' | 'caps_lock' | 'scroll_lock' | 'function' | 'break' | 'move_home' | 'move_end' | 'insert' | 'forward' | 'media_play' | 'media_pause' | 'media_close' | 'media_eject' | 'media_record' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'f10' | 'f11' | 'f12' | 'num_lock' | 'numpad_0' | 'numpad_1' | 'numpad_2' | 'numpad_3' | 'numpad_4' | 'numpad_5' | 'numpad_6' | 'numpad_7' | 'numpad_8' | 'numpad_9' | 'numpad_divide' | 'numpad_multiply' | 'numpad_subtract' | 'numpad_add' | 'numpad_dot' | 'numpad_comma' | 'numpad_enter' | 'numpad_equals' | 'numpad_left_paren' | 'numpad_right_paren' | 'volume_mute' | 'info' | 'channel_up' | 'channel_down' | 'zoom_in' | 'zoom_out' | 'window' | 'guide' | 'bookmark' | 'captions' | 'settings' | 'app_switch' | 'language_switch' | 'contacts' | 'calendar' | 'music' | 'calculator' | 'assist' | 'brightness_down' | 'brightness_up' | 'media_audio_track' | 'sleep' | 'wakeup' | 'pairing' | 'media_top_menu' | 'last_channel' | 'tv_data_service' | 'voice_assist' | 'help' | 'navigate_previous' | 'navigate_next' | 'navigate_in' | 'navigate_out' | 'dpad_up_left' | 'dpad_down_left' | 'dpad_up_right' | 'dpad_down_right' | 'media_skip_forward' | 'media_skip_backward' | 'media_step_forward' | 'media_step_backward' | 'soft_sleep' | 'cut' | 'copy' | 'paste' | 'all_apps' | 'refresh';
|
|
9
9
|
export declare type MODIFIER_KEY = 'command' | 'alt' | 'control' | 'shift' | 'right_shift';
|
|
@@ -121,6 +121,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
121
121
|
*/
|
|
122
122
|
cell(row_index: number, column_index: number): FluentFiltersOrRelations;
|
|
123
123
|
/**
|
|
124
|
+
* Filters for a UI element 'table'.
|
|
124
125
|
*
|
|
125
126
|
* @return {FluentFiltersOrRelations}
|
|
126
127
|
*/
|
|
@@ -145,6 +146,8 @@ export declare class FluentFilters extends FluentBase {
|
|
|
145
146
|
* await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
|
|
146
147
|
* ```
|
|
147
148
|
*
|
|
149
|
+
* @param {string} [text] - A text to be matched.
|
|
150
|
+
*
|
|
148
151
|
* @return {FluentFiltersOrRelations}
|
|
149
152
|
*/
|
|
150
153
|
text(text?: string): FluentFiltersOrRelations;
|
|
@@ -166,9 +169,9 @@ export declare class FluentFilters extends FluentBase {
|
|
|
166
169
|
*/
|
|
167
170
|
icon(): FluentFiltersOrRelations;
|
|
168
171
|
/**
|
|
169
|
-
* Filters for a 'custom element', that is a UI element
|
|
172
|
+
* Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
|
|
170
173
|
*
|
|
171
|
-
* See the tutorial - [Custom Element](https://docs.askui.com/docs/general/
|
|
174
|
+
* See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
|
|
172
175
|
*
|
|
173
176
|
* **Example**
|
|
174
177
|
* ```typescript
|
|
@@ -199,7 +202,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
199
202
|
* - **rotationDegreePerStep** (*`number`, optional*):
|
|
200
203
|
* - 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`.
|
|
201
204
|
* - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
|
|
202
|
-
* - 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'
|
|
205
|
+
* - 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'`.
|
|
203
206
|
*
|
|
204
207
|
*
|
|
205
208
|
* @param {CustomElementJson} customElement - The custom element to filter for.
|
|
@@ -208,7 +211,13 @@ export declare class FluentFilters extends FluentBase {
|
|
|
208
211
|
*/
|
|
209
212
|
customElement(customElement: CustomElementJson): FluentFiltersOrRelations;
|
|
210
213
|
/**
|
|
211
|
-
* Detects an AI Element created with the workflow
|
|
214
|
+
* Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
|
|
215
|
+
*
|
|
216
|
+
* **Examples:**
|
|
217
|
+
*
|
|
218
|
+
* ```typescript
|
|
219
|
+
* await aui.click().aiElement('askui-logo').exec();
|
|
220
|
+
* ```
|
|
212
221
|
*
|
|
213
222
|
* @param {string} aiElementName - Name of the AI Element.
|
|
214
223
|
*
|
|
@@ -279,12 +288,13 @@ export declare class FluentFilters extends FluentBase {
|
|
|
279
288
|
* 'other' === withText('text') => false
|
|
280
289
|
*
|
|
281
290
|
* // optional parameter: similarity_score
|
|
282
|
-
* '978-0-201-00650-6' == withText(
|
|
283
|
-
* '978-0-201-00650-6' == withText(
|
|
291
|
+
* '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
|
|
292
|
+
* '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
|
|
284
293
|
* ```
|
|
285
294
|
* 
|
|
286
295
|
*
|
|
287
296
|
* @param {string} text - A text to be matched.
|
|
297
|
+
* @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
|
|
288
298
|
*
|
|
289
299
|
* @return {FluentFiltersOrRelations}
|
|
290
300
|
*/
|
|
@@ -366,7 +376,7 @@ export declare class FluentFilters extends FluentBase {
|
|
|
366
376
|
* E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
|
|
367
377
|
* Generally, the more detail the better.
|
|
368
378
|
*
|
|
369
|
-
* We also recommend to not restrict the type of element by using the
|
|
379
|
+
* We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
|
|
370
380
|
*
|
|
371
381
|
* **Examples:**
|
|
372
382
|
* ```typescript
|
|
@@ -520,7 +530,12 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
520
530
|
/**
|
|
521
531
|
* Filters for an element right of another element.
|
|
522
532
|
*
|
|
523
|
-
* Takes an optional parameter `index` to select the
|
|
533
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
534
|
+
*
|
|
535
|
+
* Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
|
|
536
|
+
* - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
|
|
537
|
+
* - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
|
|
538
|
+
* - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
|
|
524
539
|
*
|
|
525
540
|
* **Examples:**
|
|
526
541
|
* ```typescript
|
|
@@ -538,13 +553,21 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
538
553
|
* ```
|
|
539
554
|
* 
|
|
540
555
|
*
|
|
556
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
557
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
558
|
+
*
|
|
541
559
|
* @return {FluentFilters}
|
|
542
560
|
*/
|
|
543
|
-
rightOf(
|
|
561
|
+
rightOf(index?: number, intersection_area?: INTERSECTION_AREA): FluentFilters;
|
|
544
562
|
/**
|
|
545
563
|
* Filters for an element left of another element.
|
|
546
564
|
*
|
|
547
|
-
* Takes an optional parameter `index` to select the
|
|
565
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
566
|
+
*
|
|
567
|
+
* Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
|
|
568
|
+
* - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
|
|
569
|
+
* - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
|
|
570
|
+
* - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
|
|
548
571
|
*
|
|
549
572
|
* **Examples:**
|
|
550
573
|
* ```typescript
|
|
@@ -562,13 +585,21 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
562
585
|
* ```
|
|
563
586
|
* 
|
|
564
587
|
*
|
|
588
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
589
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
590
|
+
*
|
|
565
591
|
* @return {FluentFilters}
|
|
566
592
|
*/
|
|
567
|
-
leftOf(
|
|
593
|
+
leftOf(index?: number, intersection_area?: INTERSECTION_AREA): FluentFilters;
|
|
568
594
|
/**
|
|
569
595
|
* Filters for an element below another element.
|
|
570
596
|
*
|
|
571
|
-
* Takes an optional parameter `index` to select the
|
|
597
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
598
|
+
*
|
|
599
|
+
* Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
|
|
600
|
+
* - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
|
|
601
|
+
* - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
|
|
602
|
+
* - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
|
|
572
603
|
*
|
|
573
604
|
* **Examples:**
|
|
574
605
|
* ```typescript
|
|
@@ -592,13 +623,21 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
592
623
|
* ```
|
|
593
624
|
* 
|
|
594
625
|
*
|
|
626
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
627
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
628
|
+
*
|
|
595
629
|
* @return {FluentFilters}
|
|
596
630
|
*/
|
|
597
|
-
below(
|
|
631
|
+
below(index?: number, intersection_area?: INTERSECTION_AREA): FluentFilters;
|
|
598
632
|
/**
|
|
599
633
|
* Filters for an element above another element.
|
|
600
634
|
*
|
|
601
|
-
* Takes an optional parameter `index` to select the
|
|
635
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
636
|
+
*
|
|
637
|
+
* Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
|
|
638
|
+
* - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
|
|
639
|
+
* - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
|
|
640
|
+
* - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
|
|
602
641
|
*
|
|
603
642
|
* **Examples:**
|
|
604
643
|
* ```typescript
|
|
@@ -622,9 +661,12 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
|
|
|
622
661
|
* ```
|
|
623
662
|
* 
|
|
624
663
|
*
|
|
664
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
665
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
666
|
+
*
|
|
625
667
|
* @return {FluentFilters}
|
|
626
668
|
*/
|
|
627
|
-
above(
|
|
669
|
+
above(index?: number, intersection_area?: INTERSECTION_AREA): FluentFilters;
|
|
628
670
|
/**
|
|
629
671
|
* Filters for an element nearest to another element.
|
|
630
672
|
*
|
|
@@ -767,6 +809,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
767
809
|
*/
|
|
768
810
|
cell(row_index: number, column_index: number): FluentFiltersOrRelationsCondition;
|
|
769
811
|
/**
|
|
812
|
+
* Filters for a UI element 'table'.
|
|
770
813
|
*
|
|
771
814
|
* @return {FluentFiltersOrRelationsCondition}
|
|
772
815
|
*/
|
|
@@ -791,6 +834,8 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
791
834
|
* await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
|
|
792
835
|
* ```
|
|
793
836
|
*
|
|
837
|
+
* @param {string} [text] - A text to be matched.
|
|
838
|
+
*
|
|
794
839
|
* @return {FluentFiltersOrRelationsCondition}
|
|
795
840
|
*/
|
|
796
841
|
text(text?: string): FluentFiltersOrRelationsCondition;
|
|
@@ -812,9 +857,9 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
812
857
|
*/
|
|
813
858
|
icon(): FluentFiltersOrRelationsCondition;
|
|
814
859
|
/**
|
|
815
|
-
* Filters for a 'custom element', that is a UI element
|
|
860
|
+
* Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
|
|
816
861
|
*
|
|
817
|
-
* See the tutorial - [Custom Element](https://docs.askui.com/docs/general/
|
|
862
|
+
* See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
|
|
818
863
|
*
|
|
819
864
|
* **Example**
|
|
820
865
|
* ```typescript
|
|
@@ -845,7 +890,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
845
890
|
* - **rotationDegreePerStep** (*`number`, optional*):
|
|
846
891
|
* - 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`.
|
|
847
892
|
* - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
|
|
848
|
-
* - 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'
|
|
893
|
+
* - 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'`.
|
|
849
894
|
*
|
|
850
895
|
*
|
|
851
896
|
* @param {CustomElementJson} customElement - The custom element to filter for.
|
|
@@ -854,7 +899,13 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
854
899
|
*/
|
|
855
900
|
customElement(customElement: CustomElementJson): FluentFiltersOrRelationsCondition;
|
|
856
901
|
/**
|
|
857
|
-
* Detects an AI Element created with the workflow
|
|
902
|
+
* Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
|
|
903
|
+
*
|
|
904
|
+
* **Examples:**
|
|
905
|
+
*
|
|
906
|
+
* ```typescript
|
|
907
|
+
* await aui.click().aiElement('askui-logo').exec();
|
|
908
|
+
* ```
|
|
858
909
|
*
|
|
859
910
|
* @param {string} aiElementName - Name of the AI Element.
|
|
860
911
|
*
|
|
@@ -925,12 +976,13 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
925
976
|
* 'other' === withText('text') => false
|
|
926
977
|
*
|
|
927
978
|
* // optional parameter: similarity_score
|
|
928
|
-
* '978-0-201-00650-6' == withText(
|
|
929
|
-
* '978-0-201-00650-6' == withText(
|
|
979
|
+
* '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
|
|
980
|
+
* '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
|
|
930
981
|
* ```
|
|
931
982
|
* 
|
|
932
983
|
*
|
|
933
984
|
* @param {string} text - A text to be matched.
|
|
985
|
+
* @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
|
|
934
986
|
*
|
|
935
987
|
* @return {FluentFiltersOrRelationsCondition}
|
|
936
988
|
*/
|
|
@@ -1012,7 +1064,7 @@ export declare class FluentFiltersCondition extends FluentBase {
|
|
|
1012
1064
|
* E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
|
|
1013
1065
|
* Generally, the more detail the better.
|
|
1014
1066
|
*
|
|
1015
|
-
* We also recommend to not restrict the type of element by using the
|
|
1067
|
+
* We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
|
|
1016
1068
|
*
|
|
1017
1069
|
* **Examples:**
|
|
1018
1070
|
* ```typescript
|
|
@@ -1166,7 +1218,12 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1166
1218
|
/**
|
|
1167
1219
|
* Filters for an element right of another element.
|
|
1168
1220
|
*
|
|
1169
|
-
* Takes an optional parameter `index` to select the
|
|
1221
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
1222
|
+
*
|
|
1223
|
+
* Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
|
|
1224
|
+
* - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
|
|
1225
|
+
* - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
|
|
1226
|
+
* - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
|
|
1170
1227
|
*
|
|
1171
1228
|
* **Examples:**
|
|
1172
1229
|
* ```typescript
|
|
@@ -1184,13 +1241,21 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1184
1241
|
* ```
|
|
1185
1242
|
* 
|
|
1186
1243
|
*
|
|
1244
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
1245
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
1246
|
+
*
|
|
1187
1247
|
* @return {FluentFiltersCondition}
|
|
1188
1248
|
*/
|
|
1189
|
-
rightOf(
|
|
1249
|
+
rightOf(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersCondition;
|
|
1190
1250
|
/**
|
|
1191
1251
|
* Filters for an element left of another element.
|
|
1192
1252
|
*
|
|
1193
|
-
* Takes an optional parameter `index` to select the
|
|
1253
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
1254
|
+
*
|
|
1255
|
+
* Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
|
|
1256
|
+
* - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
|
|
1257
|
+
* - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
|
|
1258
|
+
* - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
|
|
1194
1259
|
*
|
|
1195
1260
|
* **Examples:**
|
|
1196
1261
|
* ```typescript
|
|
@@ -1208,13 +1273,21 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1208
1273
|
* ```
|
|
1209
1274
|
* 
|
|
1210
1275
|
*
|
|
1276
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
1277
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
1278
|
+
*
|
|
1211
1279
|
* @return {FluentFiltersCondition}
|
|
1212
1280
|
*/
|
|
1213
|
-
leftOf(
|
|
1281
|
+
leftOf(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersCondition;
|
|
1214
1282
|
/**
|
|
1215
1283
|
* Filters for an element below another element.
|
|
1216
1284
|
*
|
|
1217
|
-
* Takes an optional parameter `index` to select the
|
|
1285
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
1286
|
+
*
|
|
1287
|
+
* Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
|
|
1288
|
+
* - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
|
|
1289
|
+
* - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
|
|
1290
|
+
* - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
|
|
1218
1291
|
*
|
|
1219
1292
|
* **Examples:**
|
|
1220
1293
|
* ```typescript
|
|
@@ -1238,13 +1311,21 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1238
1311
|
* ```
|
|
1239
1312
|
* 
|
|
1240
1313
|
*
|
|
1314
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
1315
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
1316
|
+
*
|
|
1241
1317
|
* @return {FluentFiltersCondition}
|
|
1242
1318
|
*/
|
|
1243
|
-
below(
|
|
1319
|
+
below(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersCondition;
|
|
1244
1320
|
/**
|
|
1245
1321
|
* Filters for an element above another element.
|
|
1246
1322
|
*
|
|
1247
|
-
* Takes an optional parameter `index` to select the
|
|
1323
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
1324
|
+
*
|
|
1325
|
+
* Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
|
|
1326
|
+
* - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
|
|
1327
|
+
* - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
|
|
1328
|
+
* - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
|
|
1248
1329
|
*
|
|
1249
1330
|
* **Examples:**
|
|
1250
1331
|
* ```typescript
|
|
@@ -1268,9 +1349,12 @@ export declare class FluentFiltersOrRelationsCondition extends FluentFiltersCond
|
|
|
1268
1349
|
* ```
|
|
1269
1350
|
* 
|
|
1270
1351
|
*
|
|
1352
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
1353
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
1354
|
+
*
|
|
1271
1355
|
* @return {FluentFiltersCondition}
|
|
1272
1356
|
*/
|
|
1273
|
-
above(
|
|
1357
|
+
above(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersCondition;
|
|
1274
1358
|
/**
|
|
1275
1359
|
* Filters for an element nearest to another element.
|
|
1276
1360
|
*
|
|
@@ -1568,7 +1652,7 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1568
1652
|
*/
|
|
1569
1653
|
scroll(x_offset: number, y_offset: number): Exec;
|
|
1570
1654
|
/**
|
|
1571
|
-
* Executes a shell command on the device your
|
|
1655
|
+
* Executes a shell command on the device your AskUI Controller is connected to.
|
|
1572
1656
|
*
|
|
1573
1657
|
* **Example:**
|
|
1574
1658
|
* ```typescript
|
|
@@ -1916,6 +2000,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
1916
2000
|
*/
|
|
1917
2001
|
cell(row_index: number, column_index: number): FluentFiltersOrRelationsGetter;
|
|
1918
2002
|
/**
|
|
2003
|
+
* Filters for a UI element 'table'.
|
|
1919
2004
|
*
|
|
1920
2005
|
* @return {FluentFiltersOrRelationsGetter}
|
|
1921
2006
|
*/
|
|
@@ -1940,6 +2025,8 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
1940
2025
|
* await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
|
|
1941
2026
|
* ```
|
|
1942
2027
|
*
|
|
2028
|
+
* @param {string} [text] - A text to be matched.
|
|
2029
|
+
*
|
|
1943
2030
|
* @return {FluentFiltersOrRelationsGetter}
|
|
1944
2031
|
*/
|
|
1945
2032
|
text(text?: string): FluentFiltersOrRelationsGetter;
|
|
@@ -1961,9 +2048,9 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
1961
2048
|
*/
|
|
1962
2049
|
icon(): FluentFiltersOrRelationsGetter;
|
|
1963
2050
|
/**
|
|
1964
|
-
* Filters for a 'custom element', that is a UI element
|
|
2051
|
+
* Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
|
|
1965
2052
|
*
|
|
1966
|
-
* See the tutorial - [Custom Element](https://docs.askui.com/docs/general/
|
|
2053
|
+
* See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
|
|
1967
2054
|
*
|
|
1968
2055
|
* **Example**
|
|
1969
2056
|
* ```typescript
|
|
@@ -1994,7 +2081,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
1994
2081
|
* - **rotationDegreePerStep** (*`number`, optional*):
|
|
1995
2082
|
* - 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`.
|
|
1996
2083
|
* - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
|
|
1997
|
-
* - 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'
|
|
2084
|
+
* - 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'`.
|
|
1998
2085
|
*
|
|
1999
2086
|
*
|
|
2000
2087
|
* @param {CustomElementJson} customElement - The custom element to filter for.
|
|
@@ -2003,7 +2090,13 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2003
2090
|
*/
|
|
2004
2091
|
customElement(customElement: CustomElementJson): FluentFiltersOrRelationsGetter;
|
|
2005
2092
|
/**
|
|
2006
|
-
* Detects an AI Element created with the workflow
|
|
2093
|
+
* Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
|
|
2094
|
+
*
|
|
2095
|
+
* **Examples:**
|
|
2096
|
+
*
|
|
2097
|
+
* ```typescript
|
|
2098
|
+
* await aui.click().aiElement('askui-logo').exec();
|
|
2099
|
+
* ```
|
|
2007
2100
|
*
|
|
2008
2101
|
* @param {string} aiElementName - Name of the AI Element.
|
|
2009
2102
|
*
|
|
@@ -2074,12 +2167,13 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2074
2167
|
* 'other' === withText('text') => false
|
|
2075
2168
|
*
|
|
2076
2169
|
* // optional parameter: similarity_score
|
|
2077
|
-
* '978-0-201-00650-6' == withText(
|
|
2078
|
-
* '978-0-201-00650-6' == withText(
|
|
2170
|
+
* '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
|
|
2171
|
+
* '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
|
|
2079
2172
|
* ```
|
|
2080
2173
|
* 
|
|
2081
2174
|
*
|
|
2082
2175
|
* @param {string} text - A text to be matched.
|
|
2176
|
+
* @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
|
|
2083
2177
|
*
|
|
2084
2178
|
* @return {FluentFiltersOrRelationsGetter}
|
|
2085
2179
|
*/
|
|
@@ -2161,7 +2255,7 @@ export declare class FluentFiltersGetter extends FluentBase {
|
|
|
2161
2255
|
* E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
|
|
2162
2256
|
* Generally, the more detail the better.
|
|
2163
2257
|
*
|
|
2164
|
-
* We also recommend to not restrict the type of element by using the
|
|
2258
|
+
* We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
|
|
2165
2259
|
*
|
|
2166
2260
|
* **Examples:**
|
|
2167
2261
|
* ```typescript
|
|
@@ -2315,7 +2409,12 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2315
2409
|
/**
|
|
2316
2410
|
* Filters for an element right of another element.
|
|
2317
2411
|
*
|
|
2318
|
-
* Takes an optional parameter `index` to select the
|
|
2412
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
2413
|
+
*
|
|
2414
|
+
* Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
|
|
2415
|
+
* - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
|
|
2416
|
+
* - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
|
|
2417
|
+
* - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
|
|
2319
2418
|
*
|
|
2320
2419
|
* **Examples:**
|
|
2321
2420
|
* ```typescript
|
|
@@ -2333,13 +2432,21 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2333
2432
|
* ```
|
|
2334
2433
|
* 
|
|
2335
2434
|
*
|
|
2435
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
2436
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
2437
|
+
*
|
|
2336
2438
|
* @return {FluentFiltersGetter}
|
|
2337
2439
|
*/
|
|
2338
|
-
rightOf(
|
|
2440
|
+
rightOf(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersGetter;
|
|
2339
2441
|
/**
|
|
2340
2442
|
* Filters for an element left of another element.
|
|
2341
2443
|
*
|
|
2342
|
-
* Takes an optional parameter `index` to select the
|
|
2444
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
2445
|
+
*
|
|
2446
|
+
* Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
|
|
2447
|
+
* - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
|
|
2448
|
+
* - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
|
|
2449
|
+
* - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
|
|
2343
2450
|
*
|
|
2344
2451
|
* **Examples:**
|
|
2345
2452
|
* ```typescript
|
|
@@ -2357,13 +2464,21 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2357
2464
|
* ```
|
|
2358
2465
|
* 
|
|
2359
2466
|
*
|
|
2467
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
2468
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
2469
|
+
*
|
|
2360
2470
|
* @return {FluentFiltersGetter}
|
|
2361
2471
|
*/
|
|
2362
|
-
leftOf(
|
|
2472
|
+
leftOf(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersGetter;
|
|
2363
2473
|
/**
|
|
2364
2474
|
* Filters for an element below another element.
|
|
2365
2475
|
*
|
|
2366
|
-
* Takes an optional parameter `index` to select the
|
|
2476
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
2477
|
+
*
|
|
2478
|
+
* Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
|
|
2479
|
+
* - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
|
|
2480
|
+
* - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
|
|
2481
|
+
* - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
|
|
2367
2482
|
*
|
|
2368
2483
|
* **Examples:**
|
|
2369
2484
|
* ```typescript
|
|
@@ -2387,13 +2502,21 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2387
2502
|
* ```
|
|
2388
2503
|
* 
|
|
2389
2504
|
*
|
|
2505
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
2506
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
2507
|
+
*
|
|
2390
2508
|
* @return {FluentFiltersGetter}
|
|
2391
2509
|
*/
|
|
2392
|
-
below(
|
|
2510
|
+
below(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersGetter;
|
|
2393
2511
|
/**
|
|
2394
2512
|
* Filters for an element above another element.
|
|
2395
2513
|
*
|
|
2396
|
-
* Takes an optional parameter `index` to select the
|
|
2514
|
+
* Takes an optional parameter `index` to select the nth element (defaults to `0`).
|
|
2515
|
+
*
|
|
2516
|
+
* Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
|
|
2517
|
+
* - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
|
|
2518
|
+
* - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
|
|
2519
|
+
* - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
|
|
2397
2520
|
*
|
|
2398
2521
|
* **Examples:**
|
|
2399
2522
|
* ```typescript
|
|
@@ -2417,9 +2540,12 @@ export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter
|
|
|
2417
2540
|
* ```
|
|
2418
2541
|
* 
|
|
2419
2542
|
*
|
|
2543
|
+
* @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
|
|
2544
|
+
* @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
|
|
2545
|
+
*
|
|
2420
2546
|
* @return {FluentFiltersGetter}
|
|
2421
2547
|
*/
|
|
2422
|
-
above(
|
|
2548
|
+
above(index?: number, intersection_area?: INTERSECTION_AREA): FluentFiltersGetter;
|
|
2423
2549
|
/**
|
|
2424
2550
|
* Filters for an element nearest to another element.
|
|
2425
2551
|
*
|
|
@@ -2507,6 +2633,7 @@ export declare abstract class Getter extends FluentCommand {
|
|
|
2507
2633
|
* ]
|
|
2508
2634
|
* ```
|
|
2509
2635
|
*
|
|
2636
|
+
* ```typescript
|
|
2510
2637
|
* // *************************************************** //
|
|
2511
2638
|
* // Examples on how to work with the returned elements //
|
|
2512
2639
|
* // *************************************************** //
|
|
@@ -2585,6 +2712,7 @@ export declare abstract class Getter extends FluentCommand {
|
|
|
2585
2712
|
* xmax: 1178.8204241071428,
|
|
2586
2713
|
* ymax: 180.83512834821428
|
|
2587
2714
|
* },
|
|
2715
|
+
* },
|
|
2588
2716
|
* DetectedElement {
|
|
2589
2717
|
* name: 'ICON',
|
|
2590
2718
|
* text: 'search',
|
|
@@ -2594,8 +2722,8 @@ export declare abstract class Getter extends FluentCommand {
|
|
|
2594
2722
|
* xmax: 450.6304241071428,
|
|
2595
2723
|
* ymax: 950.47812834821428
|
|
2596
2724
|
* },
|
|
2597
|
-
*
|
|
2598
|
-
*
|
|
2725
|
+
* },
|
|
2726
|
+
* ... 381 more items
|
|
2599
2727
|
* ]
|
|
2600
2728
|
* ```
|
|
2601
2729
|
*
|