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.
@@ -215,6 +215,7 @@ class FluentFilters extends FluentBase {
215
215
  return new FluentFiltersOrRelations(this);
216
216
  }
217
217
  /**
218
+ * Filters for a UI element 'table'.
218
219
  *
219
220
  * @return {FluentFiltersOrRelations}
220
221
  */
@@ -243,6 +244,8 @@ class FluentFilters extends FluentBase {
243
244
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
244
245
  * ```
245
246
  *
247
+ * @param {string} [text] - A text to be matched.
248
+ *
246
249
  * @return {FluentFiltersOrRelations}
247
250
  */
248
251
  text(text) {
@@ -275,9 +278,9 @@ class FluentFilters extends FluentBase {
275
278
  return new FluentFiltersOrRelations(this);
276
279
  }
277
280
  /**
278
- * Filters for a 'custom element', that is a UI element which is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
281
+ * Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
279
282
  *
280
- * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
283
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
281
284
  *
282
285
  * **Example**
283
286
  * ```typescript
@@ -308,7 +311,7 @@ class FluentFilters extends FluentBase {
308
311
  * - **rotationDegreePerStep** (*`number`, optional*):
309
312
  * - Step size in rotation degree. Rotates the custom image by this step size until 360° is exceeded. The range is from `0` to `360`. Defaults to `0`.
310
313
  * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
311
- * - The color compare style. 'edges' compares only edges, 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three colors (red, green, blue). Defaults to 'grayscale'.
314
+ * - The color compare style. `'edges'` compares only edges, `'greyscale'` compares the brightness of each pixel whereas `'RGB'` compares all three colors (red, green, blue). Defaults to `'grayscale'`.
312
315
  *
313
316
  *
314
317
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -323,7 +326,13 @@ class FluentFilters extends FluentBase {
323
326
  return new FluentFiltersOrRelations(this);
324
327
  }
325
328
  /**
326
- * Detects an AI Element created with the workflow creator.
329
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
330
+ *
331
+ * **Examples:**
332
+ *
333
+ * ```typescript
334
+ * await aui.click().aiElement('askui-logo').exec();
335
+ * ```
327
336
  *
328
337
  * @param {string} aiElementName - Name of the AI Element.
329
338
  *
@@ -411,12 +420,13 @@ class FluentFilters extends FluentBase {
411
420
  * 'other' === withText('text') => false
412
421
  *
413
422
  * // optional parameter: similarity_score
414
- * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
415
- * '978-0-201-00650-6' == withText('978-0-201-00650', 90) => true with 93.75 < 90 similarity
423
+ * '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
424
+ * '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
416
425
  * ```
417
426
  * ![](https://docs.askui.com/img/gif/withText.gif)
418
427
  *
419
428
  * @param {string} text - A text to be matched.
429
+ * @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
420
430
  *
421
431
  * @return {FluentFiltersOrRelations}
422
432
  */
@@ -526,7 +536,7 @@ class FluentFilters extends FluentBase {
526
536
  * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
527
537
  * Generally, the more detail the better.
528
538
  *
529
- * We also recommend to not restrict the type of element by using the generalselector `element()` as shown in the examples below.
539
+ * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
530
540
  *
531
541
  * **Examples:**
532
542
  * ```typescript
@@ -699,7 +709,12 @@ class FluentFiltersOrRelations extends FluentFilters {
699
709
  /**
700
710
  * Filters for an element right of another element.
701
711
  *
702
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
712
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
713
+ *
714
+ * Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
715
+ * - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
716
+ * - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
717
+ * - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
703
718
  *
704
719
  * **Examples:**
705
720
  * ```typescript
@@ -717,24 +732,32 @@ class FluentFiltersOrRelations extends FluentFilters {
717
732
  * ```
718
733
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
719
734
  *
735
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
736
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
737
+ *
720
738
  * @return {FluentFilters}
721
739
  */
722
- rightOf(optionalIndex = 0, intersecting = 'bbox') {
740
+ rightOf(index = 0, intersection_area = 'element_edge_area') {
723
741
  this._textStr = '';
724
- if (optionalIndex !== undefined) {
725
- this._textStr += `index ${optionalIndex}`;
742
+ if (index !== undefined) {
743
+ this._textStr += `index ${index}`;
726
744
  }
727
745
  this._textStr += ' right';
728
746
  this._textStr += ' of';
729
- if (intersecting !== undefined) {
730
- this._textStr += ` intersecting ${intersecting}`;
747
+ if (intersection_area !== undefined) {
748
+ this._textStr += ` intersection_area ${intersection_area}`;
731
749
  }
732
750
  return new FluentFilters(this);
733
751
  }
734
752
  /**
735
753
  * Filters for an element left of another element.
736
754
  *
737
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
755
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
756
+ *
757
+ * Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
758
+ * - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
759
+ * - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
760
+ * - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
738
761
  *
739
762
  * **Examples:**
740
763
  * ```typescript
@@ -752,24 +775,32 @@ class FluentFiltersOrRelations extends FluentFilters {
752
775
  * ```
753
776
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
754
777
  *
778
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
779
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
780
+ *
755
781
  * @return {FluentFilters}
756
782
  */
757
- leftOf(optionalIndex = 0, intersecting = 'bbox') {
783
+ leftOf(index = 0, intersection_area = 'element_edge_area') {
758
784
  this._textStr = '';
759
- if (optionalIndex !== undefined) {
760
- this._textStr += `index ${optionalIndex}`;
785
+ if (index !== undefined) {
786
+ this._textStr += `index ${index}`;
761
787
  }
762
788
  this._textStr += ' left';
763
789
  this._textStr += ' of';
764
- if (intersecting !== undefined) {
765
- this._textStr += ` intersecting ${intersecting}`;
790
+ if (intersection_area !== undefined) {
791
+ this._textStr += ` intersection_area ${intersection_area}`;
766
792
  }
767
793
  return new FluentFilters(this);
768
794
  }
769
795
  /**
770
796
  * Filters for an element below another element.
771
797
  *
772
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
798
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
799
+ *
800
+ * Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
801
+ * - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
802
+ * - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
803
+ * - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
773
804
  *
774
805
  * **Examples:**
775
806
  * ```typescript
@@ -793,23 +824,31 @@ class FluentFiltersOrRelations extends FluentFilters {
793
824
  * ```
794
825
  * ![](https://docs.askui.com/img/gif/below.gif)
795
826
  *
827
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
828
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
829
+ *
796
830
  * @return {FluentFilters}
797
831
  */
798
- below(optionalIndex = 0, intersecting = 'bbox') {
832
+ below(index = 0, intersection_area = 'element_edge_area') {
799
833
  this._textStr = '';
800
- if (optionalIndex !== undefined) {
801
- this._textStr += `index ${optionalIndex}`;
834
+ if (index !== undefined) {
835
+ this._textStr += `index ${index}`;
802
836
  }
803
837
  this._textStr += ' below';
804
- if (intersecting !== undefined) {
805
- this._textStr += ` intersecting ${intersecting}`;
838
+ if (intersection_area !== undefined) {
839
+ this._textStr += ` intersection_area ${intersection_area}`;
806
840
  }
807
841
  return new FluentFilters(this);
808
842
  }
809
843
  /**
810
844
  * Filters for an element above another element.
811
845
  *
812
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
846
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
847
+ *
848
+ * Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
849
+ * - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
850
+ * - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
851
+ * - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
813
852
  *
814
853
  * **Examples:**
815
854
  * ```typescript
@@ -833,16 +872,19 @@ class FluentFiltersOrRelations extends FluentFilters {
833
872
  * ```
834
873
  * ![](https://docs.askui.com/img/gif/above.gif)
835
874
  *
875
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
876
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
877
+ *
836
878
  * @return {FluentFilters}
837
879
  */
838
- above(optionalIndex = 0, intersecting = 'bbox') {
880
+ above(index = 0, intersection_area = 'element_edge_area') {
839
881
  this._textStr = '';
840
- if (optionalIndex !== undefined) {
841
- this._textStr += `index ${optionalIndex}`;
882
+ if (index !== undefined) {
883
+ this._textStr += `index ${index}`;
842
884
  }
843
885
  this._textStr += ' above';
844
- if (intersecting !== undefined) {
845
- this._textStr += ` intersecting ${intersecting}`;
886
+ if (intersection_area !== undefined) {
887
+ this._textStr += ` intersection_area ${intersection_area}`;
846
888
  }
847
889
  return new FluentFilters(this);
848
890
  }
@@ -1049,6 +1091,7 @@ class FluentFiltersCondition extends FluentBase {
1049
1091
  return new FluentFiltersOrRelationsCondition(this);
1050
1092
  }
1051
1093
  /**
1094
+ * Filters for a UI element 'table'.
1052
1095
  *
1053
1096
  * @return {FluentFiltersOrRelationsCondition}
1054
1097
  */
@@ -1077,6 +1120,8 @@ class FluentFiltersCondition extends FluentBase {
1077
1120
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
1078
1121
  * ```
1079
1122
  *
1123
+ * @param {string} [text] - A text to be matched.
1124
+ *
1080
1125
  * @return {FluentFiltersOrRelationsCondition}
1081
1126
  */
1082
1127
  text(text) {
@@ -1109,9 +1154,9 @@ class FluentFiltersCondition extends FluentBase {
1109
1154
  return new FluentFiltersOrRelationsCondition(this);
1110
1155
  }
1111
1156
  /**
1112
- * Filters for a 'custom element', that is a UI element which is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
1157
+ * Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
1113
1158
  *
1114
- * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
1159
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
1115
1160
  *
1116
1161
  * **Example**
1117
1162
  * ```typescript
@@ -1142,7 +1187,7 @@ class FluentFiltersCondition extends FluentBase {
1142
1187
  * - **rotationDegreePerStep** (*`number`, optional*):
1143
1188
  * - Step size in rotation degree. Rotates the custom image by this step size until 360° is exceeded. The range is from `0` to `360`. Defaults to `0`.
1144
1189
  * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
1145
- * - The color compare style. 'edges' compares only edges, 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three colors (red, green, blue). Defaults to 'grayscale'.
1190
+ * - The color compare style. `'edges'` compares only edges, `'greyscale'` compares the brightness of each pixel whereas `'RGB'` compares all three colors (red, green, blue). Defaults to `'grayscale'`.
1146
1191
  *
1147
1192
  *
1148
1193
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -1157,7 +1202,13 @@ class FluentFiltersCondition extends FluentBase {
1157
1202
  return new FluentFiltersOrRelationsCondition(this);
1158
1203
  }
1159
1204
  /**
1160
- * Detects an AI Element created with the workflow creator.
1205
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
1206
+ *
1207
+ * **Examples:**
1208
+ *
1209
+ * ```typescript
1210
+ * await aui.click().aiElement('askui-logo').exec();
1211
+ * ```
1161
1212
  *
1162
1213
  * @param {string} aiElementName - Name of the AI Element.
1163
1214
  *
@@ -1245,12 +1296,13 @@ class FluentFiltersCondition extends FluentBase {
1245
1296
  * 'other' === withText('text') => false
1246
1297
  *
1247
1298
  * // optional parameter: similarity_score
1248
- * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
1249
- * '978-0-201-00650-6' == withText('978-0-201-00650', 90) => true with 93.75 < 90 similarity
1299
+ * '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
1300
+ * '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
1250
1301
  * ```
1251
1302
  * ![](https://docs.askui.com/img/gif/withText.gif)
1252
1303
  *
1253
1304
  * @param {string} text - A text to be matched.
1305
+ * @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
1254
1306
  *
1255
1307
  * @return {FluentFiltersOrRelationsCondition}
1256
1308
  */
@@ -1360,7 +1412,7 @@ class FluentFiltersCondition extends FluentBase {
1360
1412
  * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
1361
1413
  * Generally, the more detail the better.
1362
1414
  *
1363
- * We also recommend to not restrict the type of element by using the generalselector `element()` as shown in the examples below.
1415
+ * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
1364
1416
  *
1365
1417
  * **Examples:**
1366
1418
  * ```typescript
@@ -1533,7 +1585,12 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1533
1585
  /**
1534
1586
  * Filters for an element right of another element.
1535
1587
  *
1536
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1588
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1589
+ *
1590
+ * Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
1591
+ * - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
1592
+ * - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
1593
+ * - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
1537
1594
  *
1538
1595
  * **Examples:**
1539
1596
  * ```typescript
@@ -1551,24 +1608,32 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1551
1608
  * ```
1552
1609
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
1553
1610
  *
1611
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1612
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1613
+ *
1554
1614
  * @return {FluentFiltersCondition}
1555
1615
  */
1556
- rightOf(optionalIndex = 0, intersecting = 'bbox') {
1616
+ rightOf(index = 0, intersection_area = 'element_edge_area') {
1557
1617
  this._textStr = '';
1558
- if (optionalIndex !== undefined) {
1559
- this._textStr += `index ${optionalIndex}`;
1618
+ if (index !== undefined) {
1619
+ this._textStr += `index ${index}`;
1560
1620
  }
1561
1621
  this._textStr += ' right';
1562
1622
  this._textStr += ' of';
1563
- if (intersecting !== undefined) {
1564
- this._textStr += ` intersecting ${intersecting}`;
1623
+ if (intersection_area !== undefined) {
1624
+ this._textStr += ` intersection_area ${intersection_area}`;
1565
1625
  }
1566
1626
  return new FluentFiltersCondition(this);
1567
1627
  }
1568
1628
  /**
1569
1629
  * Filters for an element left of another element.
1570
1630
  *
1571
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1631
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1632
+ *
1633
+ * Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
1634
+ * - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
1635
+ * - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
1636
+ * - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
1572
1637
  *
1573
1638
  * **Examples:**
1574
1639
  * ```typescript
@@ -1586,24 +1651,32 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1586
1651
  * ```
1587
1652
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
1588
1653
  *
1654
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1655
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1656
+ *
1589
1657
  * @return {FluentFiltersCondition}
1590
1658
  */
1591
- leftOf(optionalIndex = 0, intersecting = 'bbox') {
1659
+ leftOf(index = 0, intersection_area = 'element_edge_area') {
1592
1660
  this._textStr = '';
1593
- if (optionalIndex !== undefined) {
1594
- this._textStr += `index ${optionalIndex}`;
1661
+ if (index !== undefined) {
1662
+ this._textStr += `index ${index}`;
1595
1663
  }
1596
1664
  this._textStr += ' left';
1597
1665
  this._textStr += ' of';
1598
- if (intersecting !== undefined) {
1599
- this._textStr += ` intersecting ${intersecting}`;
1666
+ if (intersection_area !== undefined) {
1667
+ this._textStr += ` intersection_area ${intersection_area}`;
1600
1668
  }
1601
1669
  return new FluentFiltersCondition(this);
1602
1670
  }
1603
1671
  /**
1604
1672
  * Filters for an element below another element.
1605
1673
  *
1606
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1674
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1675
+ *
1676
+ * Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
1677
+ * - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
1678
+ * - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
1679
+ * - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
1607
1680
  *
1608
1681
  * **Examples:**
1609
1682
  * ```typescript
@@ -1627,23 +1700,31 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1627
1700
  * ```
1628
1701
  * ![](https://docs.askui.com/img/gif/below.gif)
1629
1702
  *
1703
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1704
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1705
+ *
1630
1706
  * @return {FluentFiltersCondition}
1631
1707
  */
1632
- below(optionalIndex = 0, intersecting = 'bbox') {
1708
+ below(index = 0, intersection_area = 'element_edge_area') {
1633
1709
  this._textStr = '';
1634
- if (optionalIndex !== undefined) {
1635
- this._textStr += `index ${optionalIndex}`;
1710
+ if (index !== undefined) {
1711
+ this._textStr += `index ${index}`;
1636
1712
  }
1637
1713
  this._textStr += ' below';
1638
- if (intersecting !== undefined) {
1639
- this._textStr += ` intersecting ${intersecting}`;
1714
+ if (intersection_area !== undefined) {
1715
+ this._textStr += ` intersection_area ${intersection_area}`;
1640
1716
  }
1641
1717
  return new FluentFiltersCondition(this);
1642
1718
  }
1643
1719
  /**
1644
1720
  * Filters for an element above another element.
1645
1721
  *
1646
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
1722
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
1723
+ *
1724
+ * Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
1725
+ * - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
1726
+ * - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
1727
+ * - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
1647
1728
  *
1648
1729
  * **Examples:**
1649
1730
  * ```typescript
@@ -1667,16 +1748,19 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1667
1748
  * ```
1668
1749
  * ![](https://docs.askui.com/img/gif/above.gif)
1669
1750
  *
1751
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
1752
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
1753
+ *
1670
1754
  * @return {FluentFiltersCondition}
1671
1755
  */
1672
- above(optionalIndex = 0, intersecting = 'bbox') {
1756
+ above(index = 0, intersection_area = 'element_edge_area') {
1673
1757
  this._textStr = '';
1674
- if (optionalIndex !== undefined) {
1675
- this._textStr += `index ${optionalIndex}`;
1758
+ if (index !== undefined) {
1759
+ this._textStr += `index ${index}`;
1676
1760
  }
1677
1761
  this._textStr += ' above';
1678
- if (intersecting !== undefined) {
1679
- this._textStr += ` intersecting ${intersecting}`;
1762
+ if (intersection_area !== undefined) {
1763
+ this._textStr += ` intersection_area ${intersection_area}`;
1680
1764
  }
1681
1765
  return new FluentFiltersCondition(this);
1682
1766
  }
@@ -2083,7 +2167,7 @@ class FluentCommand extends FluentBase {
2083
2167
  return new Exec(this);
2084
2168
  }
2085
2169
  /**
2086
- * Executes a shell command on the device your UiController is connected to.
2170
+ * Executes a shell command on the device your AskUI Controller is connected to.
2087
2171
  *
2088
2172
  * **Example:**
2089
2173
  * ```typescript
@@ -2564,6 +2648,7 @@ class FluentFiltersGetter extends FluentBase {
2564
2648
  return new FluentFiltersOrRelationsGetter(this);
2565
2649
  }
2566
2650
  /**
2651
+ * Filters for a UI element 'table'.
2567
2652
  *
2568
2653
  * @return {FluentFiltersOrRelationsGetter}
2569
2654
  */
@@ -2592,6 +2677,8 @@ class FluentFiltersGetter extends FluentBase {
2592
2677
  * await aui.click().text().withTextRegex('\b[Ss]\w+').exec();
2593
2678
  * ```
2594
2679
  *
2680
+ * @param {string} [text] - A text to be matched.
2681
+ *
2595
2682
  * @return {FluentFiltersOrRelationsGetter}
2596
2683
  */
2597
2684
  text(text) {
@@ -2624,9 +2711,9 @@ class FluentFiltersGetter extends FluentBase {
2624
2711
  return new FluentFiltersOrRelationsGetter(this);
2625
2712
  }
2626
2713
  /**
2627
- * Filters for a 'custom element', that is a UI element which is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
2714
+ * Filters for a 'custom element', that is a UI element that is defined by providing an image and other parameters such as degree of rotation. It allows filtering for a UI element based on an image instead of using text or element descriptions like `button().withText('Submit')` in `await aui.click().button().withText('Submit').exec()`.
2628
2715
  *
2629
- * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Tutorials/custom-element) for more detail.
2716
+ * See the tutorial - [Custom Element](https://docs.askui.com/docs/general/Element%20Selection/custom-elements) for more details.
2630
2717
  *
2631
2718
  * **Example**
2632
2719
  * ```typescript
@@ -2657,7 +2744,7 @@ class FluentFiltersGetter extends FluentBase {
2657
2744
  * - **rotationDegreePerStep** (*`number`, optional*):
2658
2745
  * - Step size in rotation degree. Rotates the custom image by this step size until 360° is exceeded. The range is from `0` to `360`. Defaults to `0`.
2659
2746
  * - **imageCompareFormat** (*`'RGB' | 'grayscale' | 'edges'`, optional*):
2660
- * - The color compare style. 'edges' compares only edges, 'greyscale' compares the brightness of each pixel whereas 'RGB' compares all three colors (red, green, blue). Defaults to 'grayscale'.
2747
+ * - The color compare style. `'edges'` compares only edges, `'greyscale'` compares the brightness of each pixel whereas `'RGB'` compares all three colors (red, green, blue). Defaults to `'grayscale'`.
2661
2748
  *
2662
2749
  *
2663
2750
  * @param {CustomElementJson} customElement - The custom element to filter for.
@@ -2672,7 +2759,13 @@ class FluentFiltersGetter extends FluentBase {
2672
2759
  return new FluentFiltersOrRelationsGetter(this);
2673
2760
  }
2674
2761
  /**
2675
- * Detects an AI Element created with the workflow creator.
2762
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
2763
+ *
2764
+ * **Examples:**
2765
+ *
2766
+ * ```typescript
2767
+ * await aui.click().aiElement('askui-logo').exec();
2768
+ * ```
2676
2769
  *
2677
2770
  * @param {string} aiElementName - Name of the AI Element.
2678
2771
  *
@@ -2760,12 +2853,13 @@ class FluentFiltersGetter extends FluentBase {
2760
2853
  * 'other' === withText('text') => false
2761
2854
  *
2762
2855
  * // optional parameter: similarity_score
2763
- * '978-0-201-00650-6' == withText('978-0-201-00') => true with 82.76 similarity
2764
- * '978-0-201-00650-6' == withText('978-0-201-00650', 90) => true with 93.75 < 90 similarity
2856
+ * '978-0-201-00650-6' == withText("978-0-201-00", 90) => false with 82.76 < 90 similarity
2857
+ * '978-0-201-00650-6' == withText("978-0-201-00650", 90) => true with 93.75 > 90 similarity
2765
2858
  * ```
2766
2859
  * ![](https://docs.askui.com/img/gif/withText.gif)
2767
2860
  *
2768
2861
  * @param {string} text - A text to be matched.
2862
+ * @param {number} [similarityScore=70] - Similarity score minimum value, it should be between `0` and `100`.
2769
2863
  *
2770
2864
  * @return {FluentFiltersOrRelationsGetter}
2771
2865
  */
@@ -2875,7 +2969,7 @@ class FluentFiltersGetter extends FluentBase {
2875
2969
  * E.g., `puzzle piece` can fail while `an icon showing a puzzle piece` might work.
2876
2970
  * Generally, the more detail the better.
2877
2971
  *
2878
- * We also recommend to not restrict the type of element by using the generalselector `element()` as shown in the examples below.
2972
+ * We also recommend to not restrict the type of element by using the general selector `element()` as shown in the examples below.
2879
2973
  *
2880
2974
  * **Examples:**
2881
2975
  * ```typescript
@@ -3048,7 +3142,12 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3048
3142
  /**
3049
3143
  * Filters for an element right of another element.
3050
3144
  *
3051
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3145
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3146
+ *
3147
+ * Takes an optional parameter `intersection_area` to specify which elements right of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
3148
+ * - `"element_center_line"` - considered right of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
3149
+ * - `"element_edge_area"` - considered right of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
3150
+ * - `"display_edge_area"` - considered right of the other element no matter where it is placed vertically on the screen (y-axis)
3052
3151
  *
3053
3152
  * **Examples:**
3054
3153
  * ```typescript
@@ -3066,24 +3165,32 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3066
3165
  * ```
3067
3166
  * ![](https://docs.askui.com/img/gif/rightOf.gif)
3068
3167
  *
3168
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3169
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3170
+ *
3069
3171
  * @return {FluentFiltersGetter}
3070
3172
  */
3071
- rightOf(optionalIndex = 0, intersecting = 'bbox') {
3173
+ rightOf(index = 0, intersection_area = 'element_edge_area') {
3072
3174
  this._textStr = '';
3073
- if (optionalIndex !== undefined) {
3074
- this._textStr += `index ${optionalIndex}`;
3175
+ if (index !== undefined) {
3176
+ this._textStr += `index ${index}`;
3075
3177
  }
3076
3178
  this._textStr += ' right';
3077
3179
  this._textStr += ' of';
3078
- if (intersecting !== undefined) {
3079
- this._textStr += ` intersecting ${intersecting}`;
3180
+ if (intersection_area !== undefined) {
3181
+ this._textStr += ` intersection_area ${intersection_area}`;
3080
3182
  }
3081
3183
  return new FluentFiltersGetter(this);
3082
3184
  }
3083
3185
  /**
3084
3186
  * Filters for an element left of another element.
3085
3187
  *
3086
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3188
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3189
+ *
3190
+ * Takes an optional parameter `intersection_area` to specify which elements left of the other element are filtered for based on their vertical position (y-coordinates of bounding box):
3191
+ * - `"element_center_line"` - considered left of the other element if element's bounding box intersects with a horizontal line passing through the center of the other element
3192
+ * - `"element_edge_area"` - considered left of the other element if element's bounding box intersects with an area between the top and the bottom edge of the other element
3193
+ * - `"display_edge_area"` - considered left of the other element no matter where it is placed vertically on the screen (y-axis)
3087
3194
  *
3088
3195
  * **Examples:**
3089
3196
  * ```typescript
@@ -3101,24 +3208,32 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3101
3208
  * ```
3102
3209
  * ![](https://docs.askui.com/img/gif/leftOf.gif)
3103
3210
  *
3211
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3212
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3213
+ *
3104
3214
  * @return {FluentFiltersGetter}
3105
3215
  */
3106
- leftOf(optionalIndex = 0, intersecting = 'bbox') {
3216
+ leftOf(index = 0, intersection_area = 'element_edge_area') {
3107
3217
  this._textStr = '';
3108
- if (optionalIndex !== undefined) {
3109
- this._textStr += `index ${optionalIndex}`;
3218
+ if (index !== undefined) {
3219
+ this._textStr += `index ${index}`;
3110
3220
  }
3111
3221
  this._textStr += ' left';
3112
3222
  this._textStr += ' of';
3113
- if (intersecting !== undefined) {
3114
- this._textStr += ` intersecting ${intersecting}`;
3223
+ if (intersection_area !== undefined) {
3224
+ this._textStr += ` intersection_area ${intersection_area}`;
3115
3225
  }
3116
3226
  return new FluentFiltersGetter(this);
3117
3227
  }
3118
3228
  /**
3119
3229
  * Filters for an element below another element.
3120
3230
  *
3121
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3231
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3232
+ *
3233
+ * Takes an optional parameter `intersection_area` to specify which elements below of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
3234
+ * - `"element_center_line"` - considered below of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
3235
+ * - `"element_edge_area"` - considered below of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
3236
+ * - `"display_edge_area"` - considered below of the other element no matter where it is placed horizontally on the screen (y-axis)
3122
3237
  *
3123
3238
  * **Examples:**
3124
3239
  * ```typescript
@@ -3142,23 +3257,31 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3142
3257
  * ```
3143
3258
  * ![](https://docs.askui.com/img/gif/below.gif)
3144
3259
  *
3260
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3261
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3262
+ *
3145
3263
  * @return {FluentFiltersGetter}
3146
3264
  */
3147
- below(optionalIndex = 0, intersecting = 'bbox') {
3265
+ below(index = 0, intersection_area = 'element_edge_area') {
3148
3266
  this._textStr = '';
3149
- if (optionalIndex !== undefined) {
3150
- this._textStr += `index ${optionalIndex}`;
3267
+ if (index !== undefined) {
3268
+ this._textStr += `index ${index}`;
3151
3269
  }
3152
3270
  this._textStr += ' below';
3153
- if (intersecting !== undefined) {
3154
- this._textStr += ` intersecting ${intersecting}`;
3271
+ if (intersection_area !== undefined) {
3272
+ this._textStr += ` intersection_area ${intersection_area}`;
3155
3273
  }
3156
3274
  return new FluentFiltersGetter(this);
3157
3275
  }
3158
3276
  /**
3159
3277
  * Filters for an element above another element.
3160
3278
  *
3161
- * Takes an optional parameter `index` to select the `nth` element (starting with 0)
3279
+ * Takes an optional parameter `index` to select the nth element (defaults to `0`).
3280
+ *
3281
+ * Takes an optional parameter `intersection_area` to specify which elements above of the other element are filtered for based on their horizontal position (y-coordinates of bounding box):
3282
+ * - `"element_center_line"` - considered above of the other element if element's bounding box intersects with a vertical line passing through the center of the other element
3283
+ * - `"element_edge_area"` - considered above of the other element if element's bounding box intersects with an area between the left and the right edge of the other element
3284
+ * - `"display_edge_area"` - considered above of the other element no matter where it is placed horizontally on the screen (y-axis)
3162
3285
  *
3163
3286
  * **Examples:**
3164
3287
  * ```typescript
@@ -3182,16 +3305,19 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
3182
3305
  * ```
3183
3306
  * ![](https://docs.askui.com/img/gif/above.gif)
3184
3307
  *
3308
+ * @param {number} [index=0] - Index of element to filter for going into the direction specified. Defaults to `0` which is the first element (zero-indexed) found in that direction.
3309
+ * @param {INTERSECTION_AREA} [intersection_area="element_edge_area"] - Intersecting with either `"element_center_line"`, `"element_edge_area"` or `"display_edge_area"`. Defaults to `"element_edge_area"`.
3310
+ *
3185
3311
  * @return {FluentFiltersGetter}
3186
3312
  */
3187
- above(optionalIndex = 0, intersecting = 'bbox') {
3313
+ above(index = 0, intersection_area = 'element_edge_area') {
3188
3314
  this._textStr = '';
3189
- if (optionalIndex !== undefined) {
3190
- this._textStr += `index ${optionalIndex}`;
3315
+ if (index !== undefined) {
3316
+ this._textStr += `index ${index}`;
3191
3317
  }
3192
3318
  this._textStr += ' above';
3193
- if (intersecting !== undefined) {
3194
- this._textStr += ` intersecting ${intersecting}`;
3319
+ if (intersection_area !== undefined) {
3320
+ this._textStr += ` intersection_area ${intersection_area}`;
3195
3321
  }
3196
3322
  return new FluentFiltersGetter(this);
3197
3323
  }
@@ -3295,6 +3421,7 @@ class Getter extends FluentCommand {
3295
3421
  * ]
3296
3422
  * ```
3297
3423
  *
3424
+ * ```typescript
3298
3425
  * // *************************************************** //
3299
3426
  * // Examples on how to work with the returned elements //
3300
3427
  * // *************************************************** //
@@ -3378,6 +3505,7 @@ class Getter extends FluentCommand {
3378
3505
  * xmax: 1178.8204241071428,
3379
3506
  * ymax: 180.83512834821428
3380
3507
  * },
3508
+ * },
3381
3509
  * DetectedElement {
3382
3510
  * name: 'ICON',
3383
3511
  * text: 'search',
@@ -3387,8 +3515,8 @@ class Getter extends FluentCommand {
3387
3515
  * xmax: 450.6304241071428,
3388
3516
  * ymax: 950.47812834821428
3389
3517
  * },
3390
- * ... 381 more items
3391
- * }
3518
+ * },
3519
+ * ... 381 more items
3392
3520
  * ]
3393
3521
  * ```
3394
3522
  *