askui 0.10.2 → 0.10.4

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.
@@ -64,16 +64,9 @@ export class FluentFilters extends FluentBase {
64
64
  * @return {FluentFiltersOrRelations}
65
65
  */
66
66
  otherElement() {
67
- this._textStr = 'other element';
68
- return new FluentFiltersOrRelations(this);
69
- }
70
- /**
71
- * Filters for a UI element 'table'.
72
- *
73
- * @return {FluentFiltersOrRelations}
74
- */
75
- table() {
76
- this._textStr = 'table';
67
+ this._textStr = '';
68
+ this._textStr += 'other';
69
+ this._textStr += ' element';
77
70
  return new FluentFiltersOrRelations(this);
78
71
  }
79
72
  /**
@@ -82,7 +75,8 @@ export class FluentFilters extends FluentBase {
82
75
  * @return {FluentFiltersOrRelations}
83
76
  */
84
77
  switch() {
85
- this._textStr = 'switch';
78
+ this._textStr = '';
79
+ this._textStr += 'switch';
86
80
  return new FluentFiltersOrRelations(this);
87
81
  }
88
82
  /**
@@ -91,7 +85,8 @@ export class FluentFilters extends FluentBase {
91
85
  * @return {FluentFiltersOrRelations}
92
86
  */
93
87
  container() {
94
- this._textStr = 'container';
88
+ this._textStr = '';
89
+ this._textStr += 'container';
95
90
  return new FluentFiltersOrRelations(this);
96
91
  }
97
92
  /**
@@ -100,7 +95,8 @@ export class FluentFilters extends FluentBase {
100
95
  * @return {FluentFiltersOrRelations}
101
96
  */
102
97
  checkbox() {
103
- this._textStr = 'checkbox';
98
+ this._textStr = '';
99
+ this._textStr += 'checkbox';
104
100
  return new FluentFiltersOrRelations(this);
105
101
  }
106
102
  /**
@@ -114,11 +110,18 @@ export class FluentFilters extends FluentBase {
114
110
  * @return {FluentFiltersOrRelations}
115
111
  */
116
112
  element() {
117
- this._textStr = 'element';
113
+ this._textStr = '';
114
+ this._textStr += 'element';
118
115
  return new FluentFiltersOrRelations(this);
119
116
  }
120
117
  /**
121
- * Filters special elements
118
+ * Filters special elements defined over a specifically trained custom element descriptor.
119
+ *
120
+ * Custom element descriptors are trained on your elements that were not detected with our
121
+ * default models. Please contact us for further details on how to do this. We are working on
122
+ * a solution to provide this in our User Portal.
123
+ *
124
+ * In the example below circle refers to a circle shaped icon with specific properties.
122
125
  *
123
126
  * **Examples:**
124
127
  * ```typescript
@@ -130,7 +133,9 @@ export class FluentFilters extends FluentBase {
130
133
  * @return {FluentFiltersOrRelations}
131
134
  */
132
135
  special(text) {
133
- this._textStr = `special ${Separators.STRING}${text}${Separators.STRING}`;
136
+ this._textStr = '';
137
+ this._textStr += 'special';
138
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
134
139
  return new FluentFiltersOrRelations(this);
135
140
  }
136
141
  /**
@@ -144,7 +149,41 @@ export class FluentFilters extends FluentBase {
144
149
  * @return {FluentFiltersOrRelations}
145
150
  */
146
151
  button() {
147
- this._textStr = 'button';
152
+ this._textStr = '';
153
+ this._textStr += 'button';
154
+ return new FluentFiltersOrRelations(this);
155
+ }
156
+ /**
157
+ *
158
+ * @param {number} index - element index
159
+ *
160
+ * @return {FluentFiltersOrRelations}
161
+ */
162
+ row(index) {
163
+ this._textStr = '';
164
+ this._textStr += 'row';
165
+ this._textStr += ` ${index}`;
166
+ return new FluentFiltersOrRelations(this);
167
+ }
168
+ /**
169
+ *
170
+ * @param {number} index - element index
171
+ *
172
+ * @return {FluentFiltersOrRelations}
173
+ */
174
+ col(index) {
175
+ this._textStr = '';
176
+ this._textStr += 'col';
177
+ this._textStr += ` ${index}`;
178
+ return new FluentFiltersOrRelations(this);
179
+ }
180
+ /**
181
+ *
182
+ * @return {FluentFiltersOrRelations}
183
+ */
184
+ table() {
185
+ this._textStr = '';
186
+ this._textStr += 'table';
148
187
  return new FluentFiltersOrRelations(this);
149
188
  }
150
189
  /**
@@ -162,8 +201,12 @@ export class FluentFilters extends FluentBase {
162
201
  *
163
202
  * @return {FluentFiltersOrRelations}
164
203
  */
165
- text() {
166
- this._textStr = 'text';
204
+ text(text) {
205
+ this._textStr = '';
206
+ this._textStr += 'text';
207
+ if (text !== undefined) {
208
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
209
+ }
167
210
  return new FluentFiltersOrRelations(this);
168
211
  }
169
212
  /**
@@ -181,7 +224,8 @@ export class FluentFilters extends FluentBase {
181
224
  * @return {FluentFiltersOrRelations}
182
225
  */
183
226
  icon() {
184
- this._textStr = 'icon';
227
+ this._textStr = '';
228
+ this._textStr += 'icon';
185
229
  return new FluentFiltersOrRelations(this);
186
230
  }
187
231
  /**
@@ -222,7 +266,9 @@ export class FluentFilters extends FluentBase {
222
266
  * @return {FluentFiltersOrRelations}
223
267
  */
224
268
  customElement(customElement) {
225
- this._textStr = 'custom element';
269
+ this._textStr = '';
270
+ this._textStr += 'custom';
271
+ this._textStr += ' element';
226
272
  this._params.set('customElement', customElement);
227
273
  return new FluentFiltersOrRelations(this);
228
274
  }
@@ -242,7 +288,8 @@ export class FluentFilters extends FluentBase {
242
288
  * @return {FluentFiltersOrRelations}
243
289
  */
244
290
  image() {
245
- this._textStr = 'image';
291
+ this._textStr = '';
292
+ this._textStr += 'image';
246
293
  return new FluentFiltersOrRelations(this);
247
294
  }
248
295
  /**
@@ -261,7 +308,8 @@ export class FluentFilters extends FluentBase {
261
308
  * @return {FluentFiltersOrRelations}
262
309
  */
263
310
  textfield() {
264
- this._textStr = 'textfield';
311
+ this._textStr = '';
312
+ this._textStr += 'textfield';
265
313
  return new FluentFiltersOrRelations(this);
266
314
  }
267
315
  /**
@@ -288,7 +336,10 @@ export class FluentFilters extends FluentBase {
288
336
  * @return {FluentFiltersOrRelations}
289
337
  */
290
338
  withText(text) {
291
- this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
339
+ this._textStr = '';
340
+ this._textStr += 'with';
341
+ this._textStr += ' text';
342
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
292
343
  return new FluentFiltersOrRelations(this);
293
344
  }
294
345
  /**
@@ -309,7 +360,11 @@ export class FluentFilters extends FluentBase {
309
360
  * @return {FluentFiltersOrRelations}
310
361
  */
311
362
  withTextRegex(regex_pattern) {
312
- this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
363
+ this._textStr = '';
364
+ this._textStr += 'match';
365
+ this._textStr += ' regex';
366
+ this._textStr += ' pattern';
367
+ this._textStr += ` ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
313
368
  return new FluentFiltersOrRelations(this);
314
369
  }
315
370
  /**
@@ -333,7 +388,10 @@ export class FluentFilters extends FluentBase {
333
388
  * @return {FluentFiltersOrRelations}
334
389
  */
335
390
  withExactText(text) {
336
- this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
391
+ this._textStr = '';
392
+ this._textStr += 'equals';
393
+ this._textStr += ' text';
394
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
337
395
  return new FluentFiltersOrRelations(this);
338
396
  }
339
397
  /**
@@ -352,18 +410,36 @@ export class FluentFilters extends FluentBase {
352
410
  * @return {FluentFiltersOrRelations}
353
411
  */
354
412
  containsText(text) {
355
- this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
413
+ this._textStr = '';
414
+ this._textStr += 'contain';
415
+ this._textStr += ' text';
416
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
356
417
  return new FluentFiltersOrRelations(this);
357
418
  }
358
419
  /**
359
420
  * Filters elements based on a textual description.
360
421
  *
422
+ * ## What Should I Write as Matching Text
423
+ * The text description inside the `matching()` should describe the element visually.
424
+ * It understands color, some famous company/product names, general descriptions.
425
+ *
426
+ * It sometimes requires a bit of playing to find a matching description:
427
+ * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
428
+ * Generally the more detail the better.
429
+ *
430
+ * **Examples:**
431
+ * ```typescript
432
+ * await aui.click().matching('a mask on purple background and a firefox logo').exec()
433
+ * ```
434
+ *
361
435
  * @param {string} text - A description of the target element.
362
436
  *
363
437
  * @return {FluentFiltersOrRelations}
364
438
  */
365
439
  matching(text) {
366
- this._textStr = `matching ${Separators.STRING}${text}${Separators.STRING}`;
440
+ this._textStr = '';
441
+ this._textStr += 'matching';
442
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
367
443
  return new FluentFiltersOrRelations(this);
368
444
  }
369
445
  }
@@ -410,7 +486,8 @@ export class FluentFiltersOrRelations extends FluentFilters {
410
486
  * @return {FluentFilters}
411
487
  */
412
488
  or() {
413
- this._textStr = 'or';
489
+ this._textStr = '';
490
+ this._textStr += 'or';
414
491
  return new FluentFilters(this);
415
492
  }
416
493
  /**
@@ -476,7 +553,8 @@ export class FluentFiltersOrRelations extends FluentFilters {
476
553
  * @return {FluentFilters}
477
554
  */
478
555
  and() {
479
- this._textStr = 'and';
556
+ this._textStr = '';
557
+ this._textStr += 'and';
480
558
  return new FluentFilters(this);
481
559
  }
482
560
  /**
@@ -502,7 +580,8 @@ export class FluentFiltersOrRelations extends FluentFilters {
502
580
  * @return {FluentFilters}
503
581
  */
504
582
  in() {
505
- this._textStr = 'in';
583
+ this._textStr = '';
584
+ this._textStr += 'in';
506
585
  return new FluentFilters(this);
507
586
  }
508
587
  /**
@@ -523,8 +602,13 @@ export class FluentFiltersOrRelations extends FluentFilters {
523
602
  *
524
603
  * @return {FluentFilters}
525
604
  */
526
- rightOf() {
527
- this._textStr = 'right of';
605
+ rightOf(optionalIndex = 0) {
606
+ this._textStr = '';
607
+ if (optionalIndex !== undefined) {
608
+ this._textStr += `index ${optionalIndex}`;
609
+ }
610
+ this._textStr += ' right';
611
+ this._textStr += ' of';
528
612
  return new FluentFilters(this);
529
613
  }
530
614
  /**
@@ -545,8 +629,13 @@ export class FluentFiltersOrRelations extends FluentFilters {
545
629
  *
546
630
  * @return {FluentFilters}
547
631
  */
548
- leftOf() {
549
- this._textStr = 'left of';
632
+ leftOf(optionalIndex = 0) {
633
+ this._textStr = '';
634
+ if (optionalIndex !== undefined) {
635
+ this._textStr += `index ${optionalIndex}`;
636
+ }
637
+ this._textStr += ' left';
638
+ this._textStr += ' of';
550
639
  return new FluentFilters(this);
551
640
  }
552
641
  /**
@@ -570,8 +659,12 @@ export class FluentFiltersOrRelations extends FluentFilters {
570
659
  *
571
660
  * @return {FluentFilters}
572
661
  */
573
- below() {
574
- this._textStr = 'below';
662
+ below(optionalIndex = 0) {
663
+ this._textStr = '';
664
+ if (optionalIndex !== undefined) {
665
+ this._textStr += `index ${optionalIndex}`;
666
+ }
667
+ this._textStr += ' below';
575
668
  return new FluentFilters(this);
576
669
  }
577
670
  /**
@@ -595,8 +688,12 @@ export class FluentFiltersOrRelations extends FluentFilters {
595
688
  *
596
689
  * @return {FluentFilters}
597
690
  */
598
- above() {
599
- this._textStr = 'above';
691
+ above(optionalIndex = 0) {
692
+ this._textStr = '';
693
+ if (optionalIndex !== undefined) {
694
+ this._textStr += `index ${optionalIndex}`;
695
+ }
696
+ this._textStr += ' above';
600
697
  return new FluentFilters(this);
601
698
  }
602
699
  /**
@@ -625,7 +722,9 @@ export class FluentFiltersOrRelations extends FluentFilters {
625
722
  * @return {FluentFilters}
626
723
  */
627
724
  nearestTo() {
628
- this._textStr = 'nearest to';
725
+ this._textStr = '';
726
+ this._textStr += 'nearest';
727
+ this._textStr += ' to';
629
728
  return new FluentFilters(this);
630
729
  }
631
730
  /**
@@ -651,7 +750,8 @@ export class FluentFiltersOrRelations extends FluentFilters {
651
750
  * @return {FluentFilters}
652
751
  */
653
752
  contains() {
654
- this._textStr = 'contains';
753
+ this._textStr = '';
754
+ this._textStr += 'contains';
655
755
  return new FluentFilters(this);
656
756
  }
657
757
  exec() {
@@ -666,16 +766,9 @@ export class FluentFiltersCondition extends FluentBase {
666
766
  * @return {FluentFiltersOrRelationsCondition}
667
767
  */
668
768
  otherElement() {
669
- this._textStr = 'other element';
670
- return new FluentFiltersOrRelationsCondition(this);
671
- }
672
- /**
673
- * Filters for a UI element 'table'.
674
- *
675
- * @return {FluentFiltersOrRelationsCondition}
676
- */
677
- table() {
678
- this._textStr = 'table';
769
+ this._textStr = '';
770
+ this._textStr += 'other';
771
+ this._textStr += ' element';
679
772
  return new FluentFiltersOrRelationsCondition(this);
680
773
  }
681
774
  /**
@@ -684,7 +777,8 @@ export class FluentFiltersCondition extends FluentBase {
684
777
  * @return {FluentFiltersOrRelationsCondition}
685
778
  */
686
779
  switch() {
687
- this._textStr = 'switch';
780
+ this._textStr = '';
781
+ this._textStr += 'switch';
688
782
  return new FluentFiltersOrRelationsCondition(this);
689
783
  }
690
784
  /**
@@ -693,7 +787,8 @@ export class FluentFiltersCondition extends FluentBase {
693
787
  * @return {FluentFiltersOrRelationsCondition}
694
788
  */
695
789
  container() {
696
- this._textStr = 'container';
790
+ this._textStr = '';
791
+ this._textStr += 'container';
697
792
  return new FluentFiltersOrRelationsCondition(this);
698
793
  }
699
794
  /**
@@ -702,7 +797,8 @@ export class FluentFiltersCondition extends FluentBase {
702
797
  * @return {FluentFiltersOrRelationsCondition}
703
798
  */
704
799
  checkbox() {
705
- this._textStr = 'checkbox';
800
+ this._textStr = '';
801
+ this._textStr += 'checkbox';
706
802
  return new FluentFiltersOrRelationsCondition(this);
707
803
  }
708
804
  /**
@@ -716,11 +812,18 @@ export class FluentFiltersCondition extends FluentBase {
716
812
  * @return {FluentFiltersOrRelationsCondition}
717
813
  */
718
814
  element() {
719
- this._textStr = 'element';
815
+ this._textStr = '';
816
+ this._textStr += 'element';
720
817
  return new FluentFiltersOrRelationsCondition(this);
721
818
  }
722
819
  /**
723
- * Filters special elements
820
+ * Filters special elements defined over a specifically trained custom element descriptor.
821
+ *
822
+ * Custom element descriptors are trained on your elements that were not detected with our
823
+ * default models. Please contact us for further details on how to do this. We are working on
824
+ * a solution to provide this in our User Portal.
825
+ *
826
+ * In the example below circle refers to a circle shaped icon with specific properties.
724
827
  *
725
828
  * **Examples:**
726
829
  * ```typescript
@@ -732,7 +835,9 @@ export class FluentFiltersCondition extends FluentBase {
732
835
  * @return {FluentFiltersOrRelationsCondition}
733
836
  */
734
837
  special(text) {
735
- this._textStr = `special ${Separators.STRING}${text}${Separators.STRING}`;
838
+ this._textStr = '';
839
+ this._textStr += 'special';
840
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
736
841
  return new FluentFiltersOrRelationsCondition(this);
737
842
  }
738
843
  /**
@@ -746,7 +851,41 @@ export class FluentFiltersCondition extends FluentBase {
746
851
  * @return {FluentFiltersOrRelationsCondition}
747
852
  */
748
853
  button() {
749
- this._textStr = 'button';
854
+ this._textStr = '';
855
+ this._textStr += 'button';
856
+ return new FluentFiltersOrRelationsCondition(this);
857
+ }
858
+ /**
859
+ *
860
+ * @param {number} index - element index
861
+ *
862
+ * @return {FluentFiltersOrRelationsCondition}
863
+ */
864
+ row(index) {
865
+ this._textStr = '';
866
+ this._textStr += 'row';
867
+ this._textStr += ` ${index}`;
868
+ return new FluentFiltersOrRelationsCondition(this);
869
+ }
870
+ /**
871
+ *
872
+ * @param {number} index - element index
873
+ *
874
+ * @return {FluentFiltersOrRelationsCondition}
875
+ */
876
+ col(index) {
877
+ this._textStr = '';
878
+ this._textStr += 'col';
879
+ this._textStr += ` ${index}`;
880
+ return new FluentFiltersOrRelationsCondition(this);
881
+ }
882
+ /**
883
+ *
884
+ * @return {FluentFiltersOrRelationsCondition}
885
+ */
886
+ table() {
887
+ this._textStr = '';
888
+ this._textStr += 'table';
750
889
  return new FluentFiltersOrRelationsCondition(this);
751
890
  }
752
891
  /**
@@ -764,8 +903,12 @@ export class FluentFiltersCondition extends FluentBase {
764
903
  *
765
904
  * @return {FluentFiltersOrRelationsCondition}
766
905
  */
767
- text() {
768
- this._textStr = 'text';
906
+ text(text) {
907
+ this._textStr = '';
908
+ this._textStr += 'text';
909
+ if (text !== undefined) {
910
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
911
+ }
769
912
  return new FluentFiltersOrRelationsCondition(this);
770
913
  }
771
914
  /**
@@ -783,7 +926,8 @@ export class FluentFiltersCondition extends FluentBase {
783
926
  * @return {FluentFiltersOrRelationsCondition}
784
927
  */
785
928
  icon() {
786
- this._textStr = 'icon';
929
+ this._textStr = '';
930
+ this._textStr += 'icon';
787
931
  return new FluentFiltersOrRelationsCondition(this);
788
932
  }
789
933
  /**
@@ -824,7 +968,9 @@ export class FluentFiltersCondition extends FluentBase {
824
968
  * @return {FluentFiltersOrRelationsCondition}
825
969
  */
826
970
  customElement(customElement) {
827
- this._textStr = 'custom element';
971
+ this._textStr = '';
972
+ this._textStr += 'custom';
973
+ this._textStr += ' element';
828
974
  this._params.set('customElement', customElement);
829
975
  return new FluentFiltersOrRelationsCondition(this);
830
976
  }
@@ -844,7 +990,8 @@ export class FluentFiltersCondition extends FluentBase {
844
990
  * @return {FluentFiltersOrRelationsCondition}
845
991
  */
846
992
  image() {
847
- this._textStr = 'image';
993
+ this._textStr = '';
994
+ this._textStr += 'image';
848
995
  return new FluentFiltersOrRelationsCondition(this);
849
996
  }
850
997
  /**
@@ -863,7 +1010,8 @@ export class FluentFiltersCondition extends FluentBase {
863
1010
  * @return {FluentFiltersOrRelationsCondition}
864
1011
  */
865
1012
  textfield() {
866
- this._textStr = 'textfield';
1013
+ this._textStr = '';
1014
+ this._textStr += 'textfield';
867
1015
  return new FluentFiltersOrRelationsCondition(this);
868
1016
  }
869
1017
  /**
@@ -890,7 +1038,10 @@ export class FluentFiltersCondition extends FluentBase {
890
1038
  * @return {FluentFiltersOrRelationsCondition}
891
1039
  */
892
1040
  withText(text) {
893
- this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
1041
+ this._textStr = '';
1042
+ this._textStr += 'with';
1043
+ this._textStr += ' text';
1044
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
894
1045
  return new FluentFiltersOrRelationsCondition(this);
895
1046
  }
896
1047
  /**
@@ -911,7 +1062,11 @@ export class FluentFiltersCondition extends FluentBase {
911
1062
  * @return {FluentFiltersOrRelationsCondition}
912
1063
  */
913
1064
  withTextRegex(regex_pattern) {
914
- this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
1065
+ this._textStr = '';
1066
+ this._textStr += 'match';
1067
+ this._textStr += ' regex';
1068
+ this._textStr += ' pattern';
1069
+ this._textStr += ` ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
915
1070
  return new FluentFiltersOrRelationsCondition(this);
916
1071
  }
917
1072
  /**
@@ -935,7 +1090,10 @@ export class FluentFiltersCondition extends FluentBase {
935
1090
  * @return {FluentFiltersOrRelationsCondition}
936
1091
  */
937
1092
  withExactText(text) {
938
- this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
1093
+ this._textStr = '';
1094
+ this._textStr += 'equals';
1095
+ this._textStr += ' text';
1096
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
939
1097
  return new FluentFiltersOrRelationsCondition(this);
940
1098
  }
941
1099
  /**
@@ -954,18 +1112,36 @@ export class FluentFiltersCondition extends FluentBase {
954
1112
  * @return {FluentFiltersOrRelationsCondition}
955
1113
  */
956
1114
  containsText(text) {
957
- this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
1115
+ this._textStr = '';
1116
+ this._textStr += 'contain';
1117
+ this._textStr += ' text';
1118
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
958
1119
  return new FluentFiltersOrRelationsCondition(this);
959
1120
  }
960
1121
  /**
961
1122
  * Filters elements based on a textual description.
962
1123
  *
1124
+ * ## What Should I Write as Matching Text
1125
+ * The text description inside the `matching()` should describe the element visually.
1126
+ * It understands color, some famous company/product names, general descriptions.
1127
+ *
1128
+ * It sometimes requires a bit of playing to find a matching description:
1129
+ * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
1130
+ * Generally the more detail the better.
1131
+ *
1132
+ * **Examples:**
1133
+ * ```typescript
1134
+ * await aui.click().matching('a mask on purple background and a firefox logo').exec()
1135
+ * ```
1136
+ *
963
1137
  * @param {string} text - A description of the target element.
964
1138
  *
965
1139
  * @return {FluentFiltersOrRelationsCondition}
966
1140
  */
967
1141
  matching(text) {
968
- this._textStr = `matching ${Separators.STRING}${text}${Separators.STRING}`;
1142
+ this._textStr = '';
1143
+ this._textStr += 'matching';
1144
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
969
1145
  return new FluentFiltersOrRelationsCondition(this);
970
1146
  }
971
1147
  }
@@ -1012,7 +1188,8 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1012
1188
  * @return {FluentFiltersCondition}
1013
1189
  */
1014
1190
  or() {
1015
- this._textStr = 'or';
1191
+ this._textStr = '';
1192
+ this._textStr += 'or';
1016
1193
  return new FluentFiltersCondition(this);
1017
1194
  }
1018
1195
  /**
@@ -1078,7 +1255,8 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1078
1255
  * @return {FluentFiltersCondition}
1079
1256
  */
1080
1257
  and() {
1081
- this._textStr = 'and';
1258
+ this._textStr = '';
1259
+ this._textStr += 'and';
1082
1260
  return new FluentFiltersCondition(this);
1083
1261
  }
1084
1262
  /**
@@ -1104,7 +1282,8 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1104
1282
  * @return {FluentFiltersCondition}
1105
1283
  */
1106
1284
  in() {
1107
- this._textStr = 'in';
1285
+ this._textStr = '';
1286
+ this._textStr += 'in';
1108
1287
  return new FluentFiltersCondition(this);
1109
1288
  }
1110
1289
  /**
@@ -1125,8 +1304,13 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1125
1304
  *
1126
1305
  * @return {FluentFiltersCondition}
1127
1306
  */
1128
- rightOf() {
1129
- this._textStr = 'right of';
1307
+ rightOf(optionalIndex = 0) {
1308
+ this._textStr = '';
1309
+ if (optionalIndex !== undefined) {
1310
+ this._textStr += `index ${optionalIndex}`;
1311
+ }
1312
+ this._textStr += ' right';
1313
+ this._textStr += ' of';
1130
1314
  return new FluentFiltersCondition(this);
1131
1315
  }
1132
1316
  /**
@@ -1147,8 +1331,13 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1147
1331
  *
1148
1332
  * @return {FluentFiltersCondition}
1149
1333
  */
1150
- leftOf() {
1151
- this._textStr = 'left of';
1334
+ leftOf(optionalIndex = 0) {
1335
+ this._textStr = '';
1336
+ if (optionalIndex !== undefined) {
1337
+ this._textStr += `index ${optionalIndex}`;
1338
+ }
1339
+ this._textStr += ' left';
1340
+ this._textStr += ' of';
1152
1341
  return new FluentFiltersCondition(this);
1153
1342
  }
1154
1343
  /**
@@ -1172,8 +1361,12 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1172
1361
  *
1173
1362
  * @return {FluentFiltersCondition}
1174
1363
  */
1175
- below() {
1176
- this._textStr = 'below';
1364
+ below(optionalIndex = 0) {
1365
+ this._textStr = '';
1366
+ if (optionalIndex !== undefined) {
1367
+ this._textStr += `index ${optionalIndex}`;
1368
+ }
1369
+ this._textStr += ' below';
1177
1370
  return new FluentFiltersCondition(this);
1178
1371
  }
1179
1372
  /**
@@ -1197,8 +1390,12 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1197
1390
  *
1198
1391
  * @return {FluentFiltersCondition}
1199
1392
  */
1200
- above() {
1201
- this._textStr = 'above';
1393
+ above(optionalIndex = 0) {
1394
+ this._textStr = '';
1395
+ if (optionalIndex !== undefined) {
1396
+ this._textStr += `index ${optionalIndex}`;
1397
+ }
1398
+ this._textStr += ' above';
1202
1399
  return new FluentFiltersCondition(this);
1203
1400
  }
1204
1401
  /**
@@ -1227,7 +1424,9 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1227
1424
  * @return {FluentFiltersCondition}
1228
1425
  */
1229
1426
  nearestTo() {
1230
- this._textStr = 'nearest to';
1427
+ this._textStr = '';
1428
+ this._textStr += 'nearest';
1429
+ this._textStr += ' to';
1231
1430
  return new FluentFiltersCondition(this);
1232
1431
  }
1233
1432
  /**
@@ -1253,7 +1452,8 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1253
1452
  * @return {FluentFiltersCondition}
1254
1453
  */
1255
1454
  contains() {
1256
- this._textStr = 'contains';
1455
+ this._textStr = '';
1456
+ this._textStr += 'contains';
1257
1457
  return new FluentFiltersCondition(this);
1258
1458
  }
1259
1459
  /**
@@ -1280,7 +1480,8 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1280
1480
  * @return {ExecCondition}
1281
1481
  */
1282
1482
  exists() {
1283
- this._textStr = 'exists';
1483
+ this._textStr = '';
1484
+ this._textStr += 'exists';
1284
1485
  return new ExecCondition(this);
1285
1486
  }
1286
1487
  /**
@@ -1307,7 +1508,9 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1307
1508
  * @return {ExecCondition}
1308
1509
  */
1309
1510
  notExists() {
1310
- this._textStr = 'not exists';
1511
+ this._textStr = '';
1512
+ this._textStr += 'not';
1513
+ this._textStr += ' exists';
1311
1514
  return new ExecCondition(this);
1312
1515
  }
1313
1516
  }
@@ -1321,7 +1524,7 @@ export class FluentCommand extends FluentBase {
1321
1524
  /**
1322
1525
  * Expects a condition, e.g., `exists()` or `notExits()`.
1323
1526
  *
1324
- * Use the structure `expect().<your filter>.(exists()|notExists()` as shown in the examples below.
1527
+ * Use the structure `expect().<your filter>.(exists()|notExists())` as shown in the examples below.
1325
1528
  *
1326
1529
  * **Examples:**
1327
1530
  * ```typescript
@@ -1332,7 +1535,8 @@ export class FluentCommand extends FluentBase {
1332
1535
  * @return {FluentFiltersCondition}
1333
1536
  */
1334
1537
  expect() {
1335
- this._textStr = 'Expect';
1538
+ this._textStr = '';
1539
+ this._textStr += 'Expect';
1336
1540
  return new FluentFiltersCondition(this);
1337
1541
  }
1338
1542
  /**
@@ -1348,7 +1552,9 @@ export class FluentCommand extends FluentBase {
1348
1552
  * @return {FluentFilters}
1349
1553
  */
1350
1554
  click() {
1351
- this._textStr = 'Click on';
1555
+ this._textStr = '';
1556
+ this._textStr += 'Click';
1557
+ this._textStr += ' on';
1352
1558
  return new FluentFilters(this);
1353
1559
  }
1354
1560
  /**
@@ -1362,7 +1568,10 @@ export class FluentCommand extends FluentBase {
1362
1568
  * @return {FluentFilters}
1363
1569
  */
1364
1570
  moveMouseTo() {
1365
- this._textStr = 'Move mouse to';
1571
+ this._textStr = '';
1572
+ this._textStr += 'Move';
1573
+ this._textStr += ' mouse';
1574
+ this._textStr += ' to';
1366
1575
  return new FluentFilters(this);
1367
1576
  }
1368
1577
  /**
@@ -1384,7 +1593,10 @@ export class FluentCommand extends FluentBase {
1384
1593
  * @return {FluentFilters}
1385
1594
  */
1386
1595
  typeIn(text) {
1387
- this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING} in`;
1596
+ this._textStr = '';
1597
+ this._textStr += 'Type';
1598
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1599
+ this._textStr += ' in';
1388
1600
  return new FluentFilters(this);
1389
1601
  }
1390
1602
  /**
@@ -1403,7 +1615,13 @@ export class FluentCommand extends FluentBase {
1403
1615
  * @return {FluentFilters}
1404
1616
  */
1405
1617
  scrollInside(x_offset, y_offset) {
1406
- this._textStr = `Scroll x ${x_offset} y ${y_offset} in`;
1618
+ this._textStr = '';
1619
+ this._textStr += 'Scroll';
1620
+ this._textStr += ' x';
1621
+ this._textStr += ` ${x_offset}`;
1622
+ this._textStr += ' y';
1623
+ this._textStr += ` ${y_offset}`;
1624
+ this._textStr += ' in';
1407
1625
  return new FluentFilters(this);
1408
1626
  }
1409
1627
  /**
@@ -1423,7 +1641,14 @@ export class FluentCommand extends FluentBase {
1423
1641
  * @return {FluentFilters}
1424
1642
  */
1425
1643
  moveMouseRelativelyTo(x_offset, y_offset) {
1426
- this._textStr = `Move mouse x ${x_offset} y ${y_offset} relatively to`;
1644
+ this._textStr = '';
1645
+ this._textStr += 'Move';
1646
+ this._textStr += ' mouse';
1647
+ this._textStr += ' x';
1648
+ this._textStr += ` ${x_offset}`;
1649
+ this._textStr += ' y';
1650
+ this._textStr += ` ${y_offset}`;
1651
+ this._textStr += ' relatively to';
1427
1652
  return new FluentFilters(this);
1428
1653
  }
1429
1654
  /**
@@ -1444,7 +1669,12 @@ export class FluentCommand extends FluentBase {
1444
1669
  * @return {FluentFilters}
1445
1670
  */
1446
1671
  swipe(x_offset, y_offset) {
1447
- this._textStr = `Swipe x ${x_offset} y ${y_offset}`;
1672
+ this._textStr = '';
1673
+ this._textStr += 'Swipe';
1674
+ this._textStr += ' x';
1675
+ this._textStr += ` ${x_offset}`;
1676
+ this._textStr += ' y';
1677
+ this._textStr += ` ${y_offset}`;
1448
1678
  return new FluentFilters(this);
1449
1679
  }
1450
1680
  /**
@@ -1466,7 +1696,9 @@ export class FluentCommand extends FluentBase {
1466
1696
  * @return {Exec}
1467
1697
  */
1468
1698
  type(text) {
1469
- this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING}`;
1699
+ this._textStr = '';
1700
+ this._textStr += 'Type';
1701
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1470
1702
  return new Exec(this);
1471
1703
  }
1472
1704
  /**
@@ -1483,7 +1715,17 @@ export class FluentCommand extends FluentBase {
1483
1715
  * @return {Exec}
1484
1716
  */
1485
1717
  moveMouseRelatively(x_offset, y_offset) {
1486
- this._textStr = `Move mouse from current position with x ${x_offset} y ${y_offset}`;
1718
+ this._textStr = '';
1719
+ this._textStr += 'Move';
1720
+ this._textStr += ' mouse';
1721
+ this._textStr += ' from';
1722
+ this._textStr += ' current';
1723
+ this._textStr += ' position';
1724
+ this._textStr += ' with';
1725
+ this._textStr += ' x';
1726
+ this._textStr += ` ${x_offset}`;
1727
+ this._textStr += ' y';
1728
+ this._textStr += ` ${y_offset}`;
1487
1729
  return new Exec(this);
1488
1730
  }
1489
1731
  /**
@@ -1502,7 +1744,14 @@ export class FluentCommand extends FluentBase {
1502
1744
  * @return {Exec}
1503
1745
  */
1504
1746
  moveMouse(x_coordinate, y_coordinate) {
1505
- this._textStr = `Move mouse to x ${x_coordinate} y ${y_coordinate}`;
1747
+ this._textStr = '';
1748
+ this._textStr += 'Move';
1749
+ this._textStr += ' mouse';
1750
+ this._textStr += ' to';
1751
+ this._textStr += ' x';
1752
+ this._textStr += ` ${x_coordinate}`;
1753
+ this._textStr += ' y';
1754
+ this._textStr += ` ${y_coordinate}`;
1506
1755
  return new Exec(this);
1507
1756
  }
1508
1757
  /**
@@ -1524,7 +1773,12 @@ export class FluentCommand extends FluentBase {
1524
1773
  * @return {Exec}
1525
1774
  */
1526
1775
  scroll(x_offset, y_offset) {
1527
- this._textStr = `Scroll x ${x_offset} y ${y_offset}`;
1776
+ this._textStr = '';
1777
+ this._textStr += 'Scroll';
1778
+ this._textStr += ' x';
1779
+ this._textStr += ` ${x_offset}`;
1780
+ this._textStr += ' y';
1781
+ this._textStr += ` ${y_offset}`;
1528
1782
  return new Exec(this);
1529
1783
  }
1530
1784
  /**
@@ -1550,7 +1804,11 @@ export class FluentCommand extends FluentBase {
1550
1804
  * @return {Exec}
1551
1805
  */
1552
1806
  execOnShell(shell_command) {
1553
- this._textStr = `Execute shell command ${Separators.STRING}${shell_command}${Separators.STRING}`;
1807
+ this._textStr = '';
1808
+ this._textStr += 'Execute';
1809
+ this._textStr += ' shell';
1810
+ this._textStr += ' command';
1811
+ this._textStr += ` ${Separators.STRING}${shell_command}${Separators.STRING}`;
1554
1812
  return new Exec(this);
1555
1813
  }
1556
1814
  /**
@@ -1569,7 +1827,8 @@ export class FluentCommand extends FluentBase {
1569
1827
  * @return {Exec}
1570
1828
  */
1571
1829
  mouseLeftClick() {
1572
- this._textStr = 'Mouse left click';
1830
+ this._textStr = '';
1831
+ this._textStr += 'Mouse left click';
1573
1832
  return new Exec(this);
1574
1833
  }
1575
1834
  /**
@@ -1588,7 +1847,8 @@ export class FluentCommand extends FluentBase {
1588
1847
  * @return {Exec}
1589
1848
  */
1590
1849
  mouseRightClick() {
1591
- this._textStr = 'Mouse right click';
1850
+ this._textStr = '';
1851
+ this._textStr += 'Mouse right click';
1592
1852
  return new Exec(this);
1593
1853
  }
1594
1854
  /**
@@ -1607,7 +1867,8 @@ export class FluentCommand extends FluentBase {
1607
1867
  * @return {Exec}
1608
1868
  */
1609
1869
  mouseMiddleClick() {
1610
- this._textStr = 'Mouse middle click';
1870
+ this._textStr = '';
1871
+ this._textStr += 'Mouse middle click';
1611
1872
  return new Exec(this);
1612
1873
  }
1613
1874
  /**
@@ -1626,7 +1887,8 @@ export class FluentCommand extends FluentBase {
1626
1887
  * @return {Exec}
1627
1888
  */
1628
1889
  mouseDoubleLeftClick() {
1629
- this._textStr = 'Mouse double left click';
1890
+ this._textStr = '';
1891
+ this._textStr += 'Mouse double left click';
1630
1892
  return new Exec(this);
1631
1893
  }
1632
1894
  /**
@@ -1645,7 +1907,8 @@ export class FluentCommand extends FluentBase {
1645
1907
  * @return {Exec}
1646
1908
  */
1647
1909
  mouseDoubleRightClick() {
1648
- this._textStr = 'Mouse double right click';
1910
+ this._textStr = '';
1911
+ this._textStr += 'Mouse double right click';
1649
1912
  return new Exec(this);
1650
1913
  }
1651
1914
  /**
@@ -1664,7 +1927,8 @@ export class FluentCommand extends FluentBase {
1664
1927
  * @return {Exec}
1665
1928
  */
1666
1929
  mouseDoubleMiddleClick() {
1667
- this._textStr = 'Mouse double middle click';
1930
+ this._textStr = '';
1931
+ this._textStr += 'Mouse double middle click';
1668
1932
  return new Exec(this);
1669
1933
  }
1670
1934
  /**
@@ -1678,7 +1942,8 @@ export class FluentCommand extends FluentBase {
1678
1942
  * @return {Exec}
1679
1943
  */
1680
1944
  mouseToggleDown() {
1681
- this._textStr = 'Mouse toggle down';
1945
+ this._textStr = '';
1946
+ this._textStr += 'Mouse toggle down';
1682
1947
  return new Exec(this);
1683
1948
  }
1684
1949
  /**
@@ -1692,7 +1957,8 @@ export class FluentCommand extends FluentBase {
1692
1957
  * @return {Exec}
1693
1958
  */
1694
1959
  mouseToggleUp() {
1695
- this._textStr = 'Mouse toggle up';
1960
+ this._textStr = '';
1961
+ this._textStr += 'Mouse toggle up';
1696
1962
  return new Exec(this);
1697
1963
  }
1698
1964
  /**
@@ -1710,7 +1976,12 @@ export class FluentCommand extends FluentBase {
1710
1976
  * @return {Exec}
1711
1977
  */
1712
1978
  pressThreeKeys(first_key, second_key, third_key) {
1713
- this._textStr = `Press key ${first_key} ${second_key} ${third_key}`;
1979
+ this._textStr = '';
1980
+ this._textStr += 'Press';
1981
+ this._textStr += ' key';
1982
+ this._textStr += ` ${first_key}`;
1983
+ this._textStr += ` ${second_key}`;
1984
+ this._textStr += ` ${third_key}`;
1714
1985
  return new Exec(this);
1715
1986
  }
1716
1987
  /**
@@ -1727,7 +1998,11 @@ export class FluentCommand extends FluentBase {
1727
1998
  * @return {Exec}
1728
1999
  */
1729
2000
  pressTwoKeys(first_key, second_key) {
1730
- this._textStr = `Press key ${first_key} ${second_key}`;
2001
+ this._textStr = '';
2002
+ this._textStr += 'Press';
2003
+ this._textStr += ' key';
2004
+ this._textStr += ` ${first_key}`;
2005
+ this._textStr += ` ${second_key}`;
1731
2006
  return new Exec(this);
1732
2007
  }
1733
2008
  /**
@@ -1743,7 +2018,10 @@ export class FluentCommand extends FluentBase {
1743
2018
  * @return {Exec}
1744
2019
  */
1745
2020
  pressKey(key) {
1746
- this._textStr = `Press key ${key}`;
2021
+ this._textStr = '';
2022
+ this._textStr += 'Press';
2023
+ this._textStr += ' key';
2024
+ this._textStr += ` ${key}`;
1747
2025
  return new Exec(this);
1748
2026
  }
1749
2027
  /**
@@ -1756,7 +2034,13 @@ export class FluentCommand extends FluentBase {
1756
2034
  * @return {Exec}
1757
2035
  */
1758
2036
  pressAndroidThirdKey(first_key, second_key, third_key) {
1759
- this._textStr = `Press android key ${first_key} ${second_key} ${third_key}`;
2037
+ this._textStr = '';
2038
+ this._textStr += 'Press';
2039
+ this._textStr += ' android';
2040
+ this._textStr += ' key';
2041
+ this._textStr += ` ${first_key}`;
2042
+ this._textStr += ` ${second_key}`;
2043
+ this._textStr += ` ${third_key}`;
1760
2044
  return new Exec(this);
1761
2045
  }
1762
2046
  /**
@@ -1768,7 +2052,12 @@ export class FluentCommand extends FluentBase {
1768
2052
  * @return {Exec}
1769
2053
  */
1770
2054
  pressAndroidTwoKey(first_key, second_key) {
1771
- this._textStr = `Press android key ${first_key} ${second_key}`;
2055
+ this._textStr = '';
2056
+ this._textStr += 'Press';
2057
+ this._textStr += ' android';
2058
+ this._textStr += ' key';
2059
+ this._textStr += ` ${first_key}`;
2060
+ this._textStr += ` ${second_key}`;
1772
2061
  return new Exec(this);
1773
2062
  }
1774
2063
  /**
@@ -1779,7 +2068,11 @@ export class FluentCommand extends FluentBase {
1779
2068
  * @return {Exec}
1780
2069
  */
1781
2070
  pressAndroidKey(key) {
1782
- this._textStr = `Press android key ${key}`;
2071
+ this._textStr = '';
2072
+ this._textStr += 'Press';
2073
+ this._textStr += ' android';
2074
+ this._textStr += ' key';
2075
+ this._textStr += ` ${key}`;
1783
2076
  return new Exec(this);
1784
2077
  }
1785
2078
  }
@@ -1796,16 +2089,9 @@ export class FluentFiltersGetter extends FluentBase {
1796
2089
  * @return {FluentFiltersOrRelationsGetter}
1797
2090
  */
1798
2091
  otherElement() {
1799
- this._textStr = 'other element';
1800
- return new FluentFiltersOrRelationsGetter(this);
1801
- }
1802
- /**
1803
- * Filters for a UI element 'table'.
1804
- *
1805
- * @return {FluentFiltersOrRelationsGetter}
1806
- */
1807
- table() {
1808
- this._textStr = 'table';
2092
+ this._textStr = '';
2093
+ this._textStr += 'other';
2094
+ this._textStr += ' element';
1809
2095
  return new FluentFiltersOrRelationsGetter(this);
1810
2096
  }
1811
2097
  /**
@@ -1814,7 +2100,8 @@ export class FluentFiltersGetter extends FluentBase {
1814
2100
  * @return {FluentFiltersOrRelationsGetter}
1815
2101
  */
1816
2102
  switch() {
1817
- this._textStr = 'switch';
2103
+ this._textStr = '';
2104
+ this._textStr += 'switch';
1818
2105
  return new FluentFiltersOrRelationsGetter(this);
1819
2106
  }
1820
2107
  /**
@@ -1823,7 +2110,8 @@ export class FluentFiltersGetter extends FluentBase {
1823
2110
  * @return {FluentFiltersOrRelationsGetter}
1824
2111
  */
1825
2112
  container() {
1826
- this._textStr = 'container';
2113
+ this._textStr = '';
2114
+ this._textStr += 'container';
1827
2115
  return new FluentFiltersOrRelationsGetter(this);
1828
2116
  }
1829
2117
  /**
@@ -1832,7 +2120,8 @@ export class FluentFiltersGetter extends FluentBase {
1832
2120
  * @return {FluentFiltersOrRelationsGetter}
1833
2121
  */
1834
2122
  checkbox() {
1835
- this._textStr = 'checkbox';
2123
+ this._textStr = '';
2124
+ this._textStr += 'checkbox';
1836
2125
  return new FluentFiltersOrRelationsGetter(this);
1837
2126
  }
1838
2127
  /**
@@ -1846,11 +2135,18 @@ export class FluentFiltersGetter extends FluentBase {
1846
2135
  * @return {FluentFiltersOrRelationsGetter}
1847
2136
  */
1848
2137
  element() {
1849
- this._textStr = 'element';
2138
+ this._textStr = '';
2139
+ this._textStr += 'element';
1850
2140
  return new FluentFiltersOrRelationsGetter(this);
1851
2141
  }
1852
2142
  /**
1853
- * Filters special elements
2143
+ * Filters special elements defined over a specifically trained custom element descriptor.
2144
+ *
2145
+ * Custom element descriptors are trained on your elements that were not detected with our
2146
+ * default models. Please contact us for further details on how to do this. We are working on
2147
+ * a solution to provide this in our User Portal.
2148
+ *
2149
+ * In the example below circle refers to a circle shaped icon with specific properties.
1854
2150
  *
1855
2151
  * **Examples:**
1856
2152
  * ```typescript
@@ -1862,7 +2158,9 @@ export class FluentFiltersGetter extends FluentBase {
1862
2158
  * @return {FluentFiltersOrRelationsGetter}
1863
2159
  */
1864
2160
  special(text) {
1865
- this._textStr = `special ${Separators.STRING}${text}${Separators.STRING}`;
2161
+ this._textStr = '';
2162
+ this._textStr += 'special';
2163
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1866
2164
  return new FluentFiltersOrRelationsGetter(this);
1867
2165
  }
1868
2166
  /**
@@ -1876,7 +2174,41 @@ export class FluentFiltersGetter extends FluentBase {
1876
2174
  * @return {FluentFiltersOrRelationsGetter}
1877
2175
  */
1878
2176
  button() {
1879
- this._textStr = 'button';
2177
+ this._textStr = '';
2178
+ this._textStr += 'button';
2179
+ return new FluentFiltersOrRelationsGetter(this);
2180
+ }
2181
+ /**
2182
+ *
2183
+ * @param {number} index - element index
2184
+ *
2185
+ * @return {FluentFiltersOrRelationsGetter}
2186
+ */
2187
+ row(index) {
2188
+ this._textStr = '';
2189
+ this._textStr += 'row';
2190
+ this._textStr += ` ${index}`;
2191
+ return new FluentFiltersOrRelationsGetter(this);
2192
+ }
2193
+ /**
2194
+ *
2195
+ * @param {number} index - element index
2196
+ *
2197
+ * @return {FluentFiltersOrRelationsGetter}
2198
+ */
2199
+ col(index) {
2200
+ this._textStr = '';
2201
+ this._textStr += 'col';
2202
+ this._textStr += ` ${index}`;
2203
+ return new FluentFiltersOrRelationsGetter(this);
2204
+ }
2205
+ /**
2206
+ *
2207
+ * @return {FluentFiltersOrRelationsGetter}
2208
+ */
2209
+ table() {
2210
+ this._textStr = '';
2211
+ this._textStr += 'table';
1880
2212
  return new FluentFiltersOrRelationsGetter(this);
1881
2213
  }
1882
2214
  /**
@@ -1894,8 +2226,12 @@ export class FluentFiltersGetter extends FluentBase {
1894
2226
  *
1895
2227
  * @return {FluentFiltersOrRelationsGetter}
1896
2228
  */
1897
- text() {
1898
- this._textStr = 'text';
2229
+ text(text) {
2230
+ this._textStr = '';
2231
+ this._textStr += 'text';
2232
+ if (text !== undefined) {
2233
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2234
+ }
1899
2235
  return new FluentFiltersOrRelationsGetter(this);
1900
2236
  }
1901
2237
  /**
@@ -1913,7 +2249,8 @@ export class FluentFiltersGetter extends FluentBase {
1913
2249
  * @return {FluentFiltersOrRelationsGetter}
1914
2250
  */
1915
2251
  icon() {
1916
- this._textStr = 'icon';
2252
+ this._textStr = '';
2253
+ this._textStr += 'icon';
1917
2254
  return new FluentFiltersOrRelationsGetter(this);
1918
2255
  }
1919
2256
  /**
@@ -1954,7 +2291,9 @@ export class FluentFiltersGetter extends FluentBase {
1954
2291
  * @return {FluentFiltersOrRelationsGetter}
1955
2292
  */
1956
2293
  customElement(customElement) {
1957
- this._textStr = 'custom element';
2294
+ this._textStr = '';
2295
+ this._textStr += 'custom';
2296
+ this._textStr += ' element';
1958
2297
  this._params.set('customElement', customElement);
1959
2298
  return new FluentFiltersOrRelationsGetter(this);
1960
2299
  }
@@ -1974,7 +2313,8 @@ export class FluentFiltersGetter extends FluentBase {
1974
2313
  * @return {FluentFiltersOrRelationsGetter}
1975
2314
  */
1976
2315
  image() {
1977
- this._textStr = 'image';
2316
+ this._textStr = '';
2317
+ this._textStr += 'image';
1978
2318
  return new FluentFiltersOrRelationsGetter(this);
1979
2319
  }
1980
2320
  /**
@@ -1993,7 +2333,8 @@ export class FluentFiltersGetter extends FluentBase {
1993
2333
  * @return {FluentFiltersOrRelationsGetter}
1994
2334
  */
1995
2335
  textfield() {
1996
- this._textStr = 'textfield';
2336
+ this._textStr = '';
2337
+ this._textStr += 'textfield';
1997
2338
  return new FluentFiltersOrRelationsGetter(this);
1998
2339
  }
1999
2340
  /**
@@ -2020,7 +2361,10 @@ export class FluentFiltersGetter extends FluentBase {
2020
2361
  * @return {FluentFiltersOrRelationsGetter}
2021
2362
  */
2022
2363
  withText(text) {
2023
- this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
2364
+ this._textStr = '';
2365
+ this._textStr += 'with';
2366
+ this._textStr += ' text';
2367
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2024
2368
  return new FluentFiltersOrRelationsGetter(this);
2025
2369
  }
2026
2370
  /**
@@ -2041,7 +2385,11 @@ export class FluentFiltersGetter extends FluentBase {
2041
2385
  * @return {FluentFiltersOrRelationsGetter}
2042
2386
  */
2043
2387
  withTextRegex(regex_pattern) {
2044
- this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
2388
+ this._textStr = '';
2389
+ this._textStr += 'match';
2390
+ this._textStr += ' regex';
2391
+ this._textStr += ' pattern';
2392
+ this._textStr += ` ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
2045
2393
  return new FluentFiltersOrRelationsGetter(this);
2046
2394
  }
2047
2395
  /**
@@ -2065,7 +2413,10 @@ export class FluentFiltersGetter extends FluentBase {
2065
2413
  * @return {FluentFiltersOrRelationsGetter}
2066
2414
  */
2067
2415
  withExactText(text) {
2068
- this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
2416
+ this._textStr = '';
2417
+ this._textStr += 'equals';
2418
+ this._textStr += ' text';
2419
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2069
2420
  return new FluentFiltersOrRelationsGetter(this);
2070
2421
  }
2071
2422
  /**
@@ -2084,18 +2435,36 @@ export class FluentFiltersGetter extends FluentBase {
2084
2435
  * @return {FluentFiltersOrRelationsGetter}
2085
2436
  */
2086
2437
  containsText(text) {
2087
- this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
2438
+ this._textStr = '';
2439
+ this._textStr += 'contain';
2440
+ this._textStr += ' text';
2441
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2088
2442
  return new FluentFiltersOrRelationsGetter(this);
2089
2443
  }
2090
2444
  /**
2091
2445
  * Filters elements based on a textual description.
2092
2446
  *
2447
+ * ## What Should I Write as Matching Text
2448
+ * The text description inside the `matching()` should describe the element visually.
2449
+ * It understands color, some famous company/product names, general descriptions.
2450
+ *
2451
+ * It sometimes requires a bit of playing to find a matching description:
2452
+ * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
2453
+ * Generally the more detail the better.
2454
+ *
2455
+ * **Examples:**
2456
+ * ```typescript
2457
+ * await aui.click().matching('a mask on purple background and a firefox logo').exec()
2458
+ * ```
2459
+ *
2093
2460
  * @param {string} text - A description of the target element.
2094
2461
  *
2095
2462
  * @return {FluentFiltersOrRelationsGetter}
2096
2463
  */
2097
2464
  matching(text) {
2098
- this._textStr = `matching ${Separators.STRING}${text}${Separators.STRING}`;
2465
+ this._textStr = '';
2466
+ this._textStr += 'matching';
2467
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2099
2468
  return new FluentFiltersOrRelationsGetter(this);
2100
2469
  }
2101
2470
  }
@@ -2142,7 +2511,8 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2142
2511
  * @return {FluentFiltersGetter}
2143
2512
  */
2144
2513
  or() {
2145
- this._textStr = 'or';
2514
+ this._textStr = '';
2515
+ this._textStr += 'or';
2146
2516
  return new FluentFiltersGetter(this);
2147
2517
  }
2148
2518
  /**
@@ -2208,7 +2578,8 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2208
2578
  * @return {FluentFiltersGetter}
2209
2579
  */
2210
2580
  and() {
2211
- this._textStr = 'and';
2581
+ this._textStr = '';
2582
+ this._textStr += 'and';
2212
2583
  return new FluentFiltersGetter(this);
2213
2584
  }
2214
2585
  /**
@@ -2234,7 +2605,8 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2234
2605
  * @return {FluentFiltersGetter}
2235
2606
  */
2236
2607
  in() {
2237
- this._textStr = 'in';
2608
+ this._textStr = '';
2609
+ this._textStr += 'in';
2238
2610
  return new FluentFiltersGetter(this);
2239
2611
  }
2240
2612
  /**
@@ -2255,8 +2627,13 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2255
2627
  *
2256
2628
  * @return {FluentFiltersGetter}
2257
2629
  */
2258
- rightOf() {
2259
- this._textStr = 'right of';
2630
+ rightOf(optionalIndex = 0) {
2631
+ this._textStr = '';
2632
+ if (optionalIndex !== undefined) {
2633
+ this._textStr += `index ${optionalIndex}`;
2634
+ }
2635
+ this._textStr += ' right';
2636
+ this._textStr += ' of';
2260
2637
  return new FluentFiltersGetter(this);
2261
2638
  }
2262
2639
  /**
@@ -2277,8 +2654,13 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2277
2654
  *
2278
2655
  * @return {FluentFiltersGetter}
2279
2656
  */
2280
- leftOf() {
2281
- this._textStr = 'left of';
2657
+ leftOf(optionalIndex = 0) {
2658
+ this._textStr = '';
2659
+ if (optionalIndex !== undefined) {
2660
+ this._textStr += `index ${optionalIndex}`;
2661
+ }
2662
+ this._textStr += ' left';
2663
+ this._textStr += ' of';
2282
2664
  return new FluentFiltersGetter(this);
2283
2665
  }
2284
2666
  /**
@@ -2302,8 +2684,12 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2302
2684
  *
2303
2685
  * @return {FluentFiltersGetter}
2304
2686
  */
2305
- below() {
2306
- this._textStr = 'below';
2687
+ below(optionalIndex = 0) {
2688
+ this._textStr = '';
2689
+ if (optionalIndex !== undefined) {
2690
+ this._textStr += `index ${optionalIndex}`;
2691
+ }
2692
+ this._textStr += ' below';
2307
2693
  return new FluentFiltersGetter(this);
2308
2694
  }
2309
2695
  /**
@@ -2327,8 +2713,12 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2327
2713
  *
2328
2714
  * @return {FluentFiltersGetter}
2329
2715
  */
2330
- above() {
2331
- this._textStr = 'above';
2716
+ above(optionalIndex = 0) {
2717
+ this._textStr = '';
2718
+ if (optionalIndex !== undefined) {
2719
+ this._textStr += `index ${optionalIndex}`;
2720
+ }
2721
+ this._textStr += ' above';
2332
2722
  return new FluentFiltersGetter(this);
2333
2723
  }
2334
2724
  /**
@@ -2357,7 +2747,9 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2357
2747
  * @return {FluentFiltersGetter}
2358
2748
  */
2359
2749
  nearestTo() {
2360
- this._textStr = 'nearest to';
2750
+ this._textStr = '';
2751
+ this._textStr += 'nearest';
2752
+ this._textStr += ' to';
2361
2753
  return new FluentFiltersGetter(this);
2362
2754
  }
2363
2755
  /**
@@ -2383,7 +2775,8 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2383
2775
  * @return {FluentFiltersGetter}
2384
2776
  */
2385
2777
  contains() {
2386
- this._textStr = 'contains';
2778
+ this._textStr = '';
2779
+ this._textStr += 'contains';
2387
2780
  return new FluentFiltersGetter(this);
2388
2781
  }
2389
2782
  /**
@@ -2427,7 +2820,9 @@ export class Getter extends FluentCommand {
2427
2820
  * @return {FluentFiltersGetter}
2428
2821
  */
2429
2822
  get() {
2430
- this._textStr = 'get element';
2823
+ this._textStr = '';
2824
+ this._textStr += 'get';
2825
+ this._textStr += ' element';
2431
2826
  return new FluentFiltersGetter(this);
2432
2827
  }
2433
2828
  /**
@@ -2470,7 +2865,10 @@ export class Getter extends FluentCommand {
2470
2865
  * @return {ExecGetter}
2471
2866
  */
2472
2867
  getAll() {
2473
- this._textStr = 'get all elements';
2868
+ this._textStr = '';
2869
+ this._textStr += 'get';
2870
+ this._textStr += ' all';
2871
+ this._textStr += ' elements';
2474
2872
  return new ExecGetter(this);
2475
2873
  }
2476
2874
  }