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.
@@ -68,16 +68,9 @@ class FluentFilters extends FluentBase {
68
68
  * @return {FluentFiltersOrRelations}
69
69
  */
70
70
  otherElement() {
71
- this._textStr = 'other element';
72
- return new FluentFiltersOrRelations(this);
73
- }
74
- /**
75
- * Filters for a UI element 'table'.
76
- *
77
- * @return {FluentFiltersOrRelations}
78
- */
79
- table() {
80
- this._textStr = 'table';
71
+ this._textStr = '';
72
+ this._textStr += 'other';
73
+ this._textStr += ' element';
81
74
  return new FluentFiltersOrRelations(this);
82
75
  }
83
76
  /**
@@ -86,7 +79,8 @@ class FluentFilters extends FluentBase {
86
79
  * @return {FluentFiltersOrRelations}
87
80
  */
88
81
  switch() {
89
- this._textStr = 'switch';
82
+ this._textStr = '';
83
+ this._textStr += 'switch';
90
84
  return new FluentFiltersOrRelations(this);
91
85
  }
92
86
  /**
@@ -95,7 +89,8 @@ class FluentFilters extends FluentBase {
95
89
  * @return {FluentFiltersOrRelations}
96
90
  */
97
91
  container() {
98
- this._textStr = 'container';
92
+ this._textStr = '';
93
+ this._textStr += 'container';
99
94
  return new FluentFiltersOrRelations(this);
100
95
  }
101
96
  /**
@@ -104,7 +99,8 @@ class FluentFilters extends FluentBase {
104
99
  * @return {FluentFiltersOrRelations}
105
100
  */
106
101
  checkbox() {
107
- this._textStr = 'checkbox';
102
+ this._textStr = '';
103
+ this._textStr += 'checkbox';
108
104
  return new FluentFiltersOrRelations(this);
109
105
  }
110
106
  /**
@@ -118,11 +114,18 @@ class FluentFilters extends FluentBase {
118
114
  * @return {FluentFiltersOrRelations}
119
115
  */
120
116
  element() {
121
- this._textStr = 'element';
117
+ this._textStr = '';
118
+ this._textStr += 'element';
122
119
  return new FluentFiltersOrRelations(this);
123
120
  }
124
121
  /**
125
- * Filters special elements
122
+ * Filters special elements defined over a specifically trained custom element descriptor.
123
+ *
124
+ * Custom element descriptors are trained on your elements that were not detected with our
125
+ * default models. Please contact us for further details on how to do this. We are working on
126
+ * a solution to provide this in our User Portal.
127
+ *
128
+ * In the example below circle refers to a circle shaped icon with specific properties.
126
129
  *
127
130
  * **Examples:**
128
131
  * ```typescript
@@ -134,7 +137,9 @@ class FluentFilters extends FluentBase {
134
137
  * @return {FluentFiltersOrRelations}
135
138
  */
136
139
  special(text) {
137
- this._textStr = `special ${Separators.STRING}${text}${Separators.STRING}`;
140
+ this._textStr = '';
141
+ this._textStr += 'special';
142
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
138
143
  return new FluentFiltersOrRelations(this);
139
144
  }
140
145
  /**
@@ -148,7 +153,41 @@ class FluentFilters extends FluentBase {
148
153
  * @return {FluentFiltersOrRelations}
149
154
  */
150
155
  button() {
151
- this._textStr = 'button';
156
+ this._textStr = '';
157
+ this._textStr += 'button';
158
+ return new FluentFiltersOrRelations(this);
159
+ }
160
+ /**
161
+ *
162
+ * @param {number} index - element index
163
+ *
164
+ * @return {FluentFiltersOrRelations}
165
+ */
166
+ row(index) {
167
+ this._textStr = '';
168
+ this._textStr += 'row';
169
+ this._textStr += ` ${index}`;
170
+ return new FluentFiltersOrRelations(this);
171
+ }
172
+ /**
173
+ *
174
+ * @param {number} index - element index
175
+ *
176
+ * @return {FluentFiltersOrRelations}
177
+ */
178
+ col(index) {
179
+ this._textStr = '';
180
+ this._textStr += 'col';
181
+ this._textStr += ` ${index}`;
182
+ return new FluentFiltersOrRelations(this);
183
+ }
184
+ /**
185
+ *
186
+ * @return {FluentFiltersOrRelations}
187
+ */
188
+ table() {
189
+ this._textStr = '';
190
+ this._textStr += 'table';
152
191
  return new FluentFiltersOrRelations(this);
153
192
  }
154
193
  /**
@@ -166,8 +205,12 @@ class FluentFilters extends FluentBase {
166
205
  *
167
206
  * @return {FluentFiltersOrRelations}
168
207
  */
169
- text() {
170
- this._textStr = 'text';
208
+ text(text) {
209
+ this._textStr = '';
210
+ this._textStr += 'text';
211
+ if (text !== undefined) {
212
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
213
+ }
171
214
  return new FluentFiltersOrRelations(this);
172
215
  }
173
216
  /**
@@ -185,7 +228,8 @@ class FluentFilters extends FluentBase {
185
228
  * @return {FluentFiltersOrRelations}
186
229
  */
187
230
  icon() {
188
- this._textStr = 'icon';
231
+ this._textStr = '';
232
+ this._textStr += 'icon';
189
233
  return new FluentFiltersOrRelations(this);
190
234
  }
191
235
  /**
@@ -226,7 +270,9 @@ class FluentFilters extends FluentBase {
226
270
  * @return {FluentFiltersOrRelations}
227
271
  */
228
272
  customElement(customElement) {
229
- this._textStr = 'custom element';
273
+ this._textStr = '';
274
+ this._textStr += 'custom';
275
+ this._textStr += ' element';
230
276
  this._params.set('customElement', customElement);
231
277
  return new FluentFiltersOrRelations(this);
232
278
  }
@@ -246,7 +292,8 @@ class FluentFilters extends FluentBase {
246
292
  * @return {FluentFiltersOrRelations}
247
293
  */
248
294
  image() {
249
- this._textStr = 'image';
295
+ this._textStr = '';
296
+ this._textStr += 'image';
250
297
  return new FluentFiltersOrRelations(this);
251
298
  }
252
299
  /**
@@ -265,7 +312,8 @@ class FluentFilters extends FluentBase {
265
312
  * @return {FluentFiltersOrRelations}
266
313
  */
267
314
  textfield() {
268
- this._textStr = 'textfield';
315
+ this._textStr = '';
316
+ this._textStr += 'textfield';
269
317
  return new FluentFiltersOrRelations(this);
270
318
  }
271
319
  /**
@@ -292,7 +340,10 @@ class FluentFilters extends FluentBase {
292
340
  * @return {FluentFiltersOrRelations}
293
341
  */
294
342
  withText(text) {
295
- this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
343
+ this._textStr = '';
344
+ this._textStr += 'with';
345
+ this._textStr += ' text';
346
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
296
347
  return new FluentFiltersOrRelations(this);
297
348
  }
298
349
  /**
@@ -313,7 +364,11 @@ class FluentFilters extends FluentBase {
313
364
  * @return {FluentFiltersOrRelations}
314
365
  */
315
366
  withTextRegex(regex_pattern) {
316
- this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
367
+ this._textStr = '';
368
+ this._textStr += 'match';
369
+ this._textStr += ' regex';
370
+ this._textStr += ' pattern';
371
+ this._textStr += ` ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
317
372
  return new FluentFiltersOrRelations(this);
318
373
  }
319
374
  /**
@@ -337,7 +392,10 @@ class FluentFilters extends FluentBase {
337
392
  * @return {FluentFiltersOrRelations}
338
393
  */
339
394
  withExactText(text) {
340
- this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
395
+ this._textStr = '';
396
+ this._textStr += 'equals';
397
+ this._textStr += ' text';
398
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
341
399
  return new FluentFiltersOrRelations(this);
342
400
  }
343
401
  /**
@@ -356,18 +414,36 @@ class FluentFilters extends FluentBase {
356
414
  * @return {FluentFiltersOrRelations}
357
415
  */
358
416
  containsText(text) {
359
- this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
417
+ this._textStr = '';
418
+ this._textStr += 'contain';
419
+ this._textStr += ' text';
420
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
360
421
  return new FluentFiltersOrRelations(this);
361
422
  }
362
423
  /**
363
424
  * Filters elements based on a textual description.
364
425
  *
426
+ * ## What Should I Write as Matching Text
427
+ * The text description inside the `matching()` should describe the element visually.
428
+ * It understands color, some famous company/product names, general descriptions.
429
+ *
430
+ * It sometimes requires a bit of playing to find a matching description:
431
+ * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
432
+ * Generally the more detail the better.
433
+ *
434
+ * **Examples:**
435
+ * ```typescript
436
+ * await aui.click().matching('a mask on purple background and a firefox logo').exec()
437
+ * ```
438
+ *
365
439
  * @param {string} text - A description of the target element.
366
440
  *
367
441
  * @return {FluentFiltersOrRelations}
368
442
  */
369
443
  matching(text) {
370
- this._textStr = `matching ${Separators.STRING}${text}${Separators.STRING}`;
444
+ this._textStr = '';
445
+ this._textStr += 'matching';
446
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
371
447
  return new FluentFiltersOrRelations(this);
372
448
  }
373
449
  }
@@ -415,7 +491,8 @@ class FluentFiltersOrRelations extends FluentFilters {
415
491
  * @return {FluentFilters}
416
492
  */
417
493
  or() {
418
- this._textStr = 'or';
494
+ this._textStr = '';
495
+ this._textStr += 'or';
419
496
  return new FluentFilters(this);
420
497
  }
421
498
  /**
@@ -481,7 +558,8 @@ class FluentFiltersOrRelations extends FluentFilters {
481
558
  * @return {FluentFilters}
482
559
  */
483
560
  and() {
484
- this._textStr = 'and';
561
+ this._textStr = '';
562
+ this._textStr += 'and';
485
563
  return new FluentFilters(this);
486
564
  }
487
565
  /**
@@ -507,7 +585,8 @@ class FluentFiltersOrRelations extends FluentFilters {
507
585
  * @return {FluentFilters}
508
586
  */
509
587
  in() {
510
- this._textStr = 'in';
588
+ this._textStr = '';
589
+ this._textStr += 'in';
511
590
  return new FluentFilters(this);
512
591
  }
513
592
  /**
@@ -528,8 +607,13 @@ class FluentFiltersOrRelations extends FluentFilters {
528
607
  *
529
608
  * @return {FluentFilters}
530
609
  */
531
- rightOf() {
532
- this._textStr = 'right of';
610
+ rightOf(optionalIndex = 0) {
611
+ this._textStr = '';
612
+ if (optionalIndex !== undefined) {
613
+ this._textStr += `index ${optionalIndex}`;
614
+ }
615
+ this._textStr += ' right';
616
+ this._textStr += ' of';
533
617
  return new FluentFilters(this);
534
618
  }
535
619
  /**
@@ -550,8 +634,13 @@ class FluentFiltersOrRelations extends FluentFilters {
550
634
  *
551
635
  * @return {FluentFilters}
552
636
  */
553
- leftOf() {
554
- this._textStr = 'left of';
637
+ leftOf(optionalIndex = 0) {
638
+ this._textStr = '';
639
+ if (optionalIndex !== undefined) {
640
+ this._textStr += `index ${optionalIndex}`;
641
+ }
642
+ this._textStr += ' left';
643
+ this._textStr += ' of';
555
644
  return new FluentFilters(this);
556
645
  }
557
646
  /**
@@ -575,8 +664,12 @@ class FluentFiltersOrRelations extends FluentFilters {
575
664
  *
576
665
  * @return {FluentFilters}
577
666
  */
578
- below() {
579
- this._textStr = 'below';
667
+ below(optionalIndex = 0) {
668
+ this._textStr = '';
669
+ if (optionalIndex !== undefined) {
670
+ this._textStr += `index ${optionalIndex}`;
671
+ }
672
+ this._textStr += ' below';
580
673
  return new FluentFilters(this);
581
674
  }
582
675
  /**
@@ -600,8 +693,12 @@ class FluentFiltersOrRelations extends FluentFilters {
600
693
  *
601
694
  * @return {FluentFilters}
602
695
  */
603
- above() {
604
- this._textStr = 'above';
696
+ above(optionalIndex = 0) {
697
+ this._textStr = '';
698
+ if (optionalIndex !== undefined) {
699
+ this._textStr += `index ${optionalIndex}`;
700
+ }
701
+ this._textStr += ' above';
605
702
  return new FluentFilters(this);
606
703
  }
607
704
  /**
@@ -630,7 +727,9 @@ class FluentFiltersOrRelations extends FluentFilters {
630
727
  * @return {FluentFilters}
631
728
  */
632
729
  nearestTo() {
633
- this._textStr = 'nearest to';
730
+ this._textStr = '';
731
+ this._textStr += 'nearest';
732
+ this._textStr += ' to';
634
733
  return new FluentFilters(this);
635
734
  }
636
735
  /**
@@ -656,7 +755,8 @@ class FluentFiltersOrRelations extends FluentFilters {
656
755
  * @return {FluentFilters}
657
756
  */
658
757
  contains() {
659
- this._textStr = 'contains';
758
+ this._textStr = '';
759
+ this._textStr += 'contains';
660
760
  return new FluentFilters(this);
661
761
  }
662
762
  exec() {
@@ -672,16 +772,9 @@ class FluentFiltersCondition extends FluentBase {
672
772
  * @return {FluentFiltersOrRelationsCondition}
673
773
  */
674
774
  otherElement() {
675
- this._textStr = 'other element';
676
- return new FluentFiltersOrRelationsCondition(this);
677
- }
678
- /**
679
- * Filters for a UI element 'table'.
680
- *
681
- * @return {FluentFiltersOrRelationsCondition}
682
- */
683
- table() {
684
- this._textStr = 'table';
775
+ this._textStr = '';
776
+ this._textStr += 'other';
777
+ this._textStr += ' element';
685
778
  return new FluentFiltersOrRelationsCondition(this);
686
779
  }
687
780
  /**
@@ -690,7 +783,8 @@ class FluentFiltersCondition extends FluentBase {
690
783
  * @return {FluentFiltersOrRelationsCondition}
691
784
  */
692
785
  switch() {
693
- this._textStr = 'switch';
786
+ this._textStr = '';
787
+ this._textStr += 'switch';
694
788
  return new FluentFiltersOrRelationsCondition(this);
695
789
  }
696
790
  /**
@@ -699,7 +793,8 @@ class FluentFiltersCondition extends FluentBase {
699
793
  * @return {FluentFiltersOrRelationsCondition}
700
794
  */
701
795
  container() {
702
- this._textStr = 'container';
796
+ this._textStr = '';
797
+ this._textStr += 'container';
703
798
  return new FluentFiltersOrRelationsCondition(this);
704
799
  }
705
800
  /**
@@ -708,7 +803,8 @@ class FluentFiltersCondition extends FluentBase {
708
803
  * @return {FluentFiltersOrRelationsCondition}
709
804
  */
710
805
  checkbox() {
711
- this._textStr = 'checkbox';
806
+ this._textStr = '';
807
+ this._textStr += 'checkbox';
712
808
  return new FluentFiltersOrRelationsCondition(this);
713
809
  }
714
810
  /**
@@ -722,11 +818,18 @@ class FluentFiltersCondition extends FluentBase {
722
818
  * @return {FluentFiltersOrRelationsCondition}
723
819
  */
724
820
  element() {
725
- this._textStr = 'element';
821
+ this._textStr = '';
822
+ this._textStr += 'element';
726
823
  return new FluentFiltersOrRelationsCondition(this);
727
824
  }
728
825
  /**
729
- * Filters special elements
826
+ * Filters special elements defined over a specifically trained custom element descriptor.
827
+ *
828
+ * Custom element descriptors are trained on your elements that were not detected with our
829
+ * default models. Please contact us for further details on how to do this. We are working on
830
+ * a solution to provide this in our User Portal.
831
+ *
832
+ * In the example below circle refers to a circle shaped icon with specific properties.
730
833
  *
731
834
  * **Examples:**
732
835
  * ```typescript
@@ -738,7 +841,9 @@ class FluentFiltersCondition extends FluentBase {
738
841
  * @return {FluentFiltersOrRelationsCondition}
739
842
  */
740
843
  special(text) {
741
- this._textStr = `special ${Separators.STRING}${text}${Separators.STRING}`;
844
+ this._textStr = '';
845
+ this._textStr += 'special';
846
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
742
847
  return new FluentFiltersOrRelationsCondition(this);
743
848
  }
744
849
  /**
@@ -752,7 +857,41 @@ class FluentFiltersCondition extends FluentBase {
752
857
  * @return {FluentFiltersOrRelationsCondition}
753
858
  */
754
859
  button() {
755
- this._textStr = 'button';
860
+ this._textStr = '';
861
+ this._textStr += 'button';
862
+ return new FluentFiltersOrRelationsCondition(this);
863
+ }
864
+ /**
865
+ *
866
+ * @param {number} index - element index
867
+ *
868
+ * @return {FluentFiltersOrRelationsCondition}
869
+ */
870
+ row(index) {
871
+ this._textStr = '';
872
+ this._textStr += 'row';
873
+ this._textStr += ` ${index}`;
874
+ return new FluentFiltersOrRelationsCondition(this);
875
+ }
876
+ /**
877
+ *
878
+ * @param {number} index - element index
879
+ *
880
+ * @return {FluentFiltersOrRelationsCondition}
881
+ */
882
+ col(index) {
883
+ this._textStr = '';
884
+ this._textStr += 'col';
885
+ this._textStr += ` ${index}`;
886
+ return new FluentFiltersOrRelationsCondition(this);
887
+ }
888
+ /**
889
+ *
890
+ * @return {FluentFiltersOrRelationsCondition}
891
+ */
892
+ table() {
893
+ this._textStr = '';
894
+ this._textStr += 'table';
756
895
  return new FluentFiltersOrRelationsCondition(this);
757
896
  }
758
897
  /**
@@ -770,8 +909,12 @@ class FluentFiltersCondition extends FluentBase {
770
909
  *
771
910
  * @return {FluentFiltersOrRelationsCondition}
772
911
  */
773
- text() {
774
- this._textStr = 'text';
912
+ text(text) {
913
+ this._textStr = '';
914
+ this._textStr += 'text';
915
+ if (text !== undefined) {
916
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
917
+ }
775
918
  return new FluentFiltersOrRelationsCondition(this);
776
919
  }
777
920
  /**
@@ -789,7 +932,8 @@ class FluentFiltersCondition extends FluentBase {
789
932
  * @return {FluentFiltersOrRelationsCondition}
790
933
  */
791
934
  icon() {
792
- this._textStr = 'icon';
935
+ this._textStr = '';
936
+ this._textStr += 'icon';
793
937
  return new FluentFiltersOrRelationsCondition(this);
794
938
  }
795
939
  /**
@@ -830,7 +974,9 @@ class FluentFiltersCondition extends FluentBase {
830
974
  * @return {FluentFiltersOrRelationsCondition}
831
975
  */
832
976
  customElement(customElement) {
833
- this._textStr = 'custom element';
977
+ this._textStr = '';
978
+ this._textStr += 'custom';
979
+ this._textStr += ' element';
834
980
  this._params.set('customElement', customElement);
835
981
  return new FluentFiltersOrRelationsCondition(this);
836
982
  }
@@ -850,7 +996,8 @@ class FluentFiltersCondition extends FluentBase {
850
996
  * @return {FluentFiltersOrRelationsCondition}
851
997
  */
852
998
  image() {
853
- this._textStr = 'image';
999
+ this._textStr = '';
1000
+ this._textStr += 'image';
854
1001
  return new FluentFiltersOrRelationsCondition(this);
855
1002
  }
856
1003
  /**
@@ -869,7 +1016,8 @@ class FluentFiltersCondition extends FluentBase {
869
1016
  * @return {FluentFiltersOrRelationsCondition}
870
1017
  */
871
1018
  textfield() {
872
- this._textStr = 'textfield';
1019
+ this._textStr = '';
1020
+ this._textStr += 'textfield';
873
1021
  return new FluentFiltersOrRelationsCondition(this);
874
1022
  }
875
1023
  /**
@@ -896,7 +1044,10 @@ class FluentFiltersCondition extends FluentBase {
896
1044
  * @return {FluentFiltersOrRelationsCondition}
897
1045
  */
898
1046
  withText(text) {
899
- this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
1047
+ this._textStr = '';
1048
+ this._textStr += 'with';
1049
+ this._textStr += ' text';
1050
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
900
1051
  return new FluentFiltersOrRelationsCondition(this);
901
1052
  }
902
1053
  /**
@@ -917,7 +1068,11 @@ class FluentFiltersCondition extends FluentBase {
917
1068
  * @return {FluentFiltersOrRelationsCondition}
918
1069
  */
919
1070
  withTextRegex(regex_pattern) {
920
- this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
1071
+ this._textStr = '';
1072
+ this._textStr += 'match';
1073
+ this._textStr += ' regex';
1074
+ this._textStr += ' pattern';
1075
+ this._textStr += ` ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
921
1076
  return new FluentFiltersOrRelationsCondition(this);
922
1077
  }
923
1078
  /**
@@ -941,7 +1096,10 @@ class FluentFiltersCondition extends FluentBase {
941
1096
  * @return {FluentFiltersOrRelationsCondition}
942
1097
  */
943
1098
  withExactText(text) {
944
- this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
1099
+ this._textStr = '';
1100
+ this._textStr += 'equals';
1101
+ this._textStr += ' text';
1102
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
945
1103
  return new FluentFiltersOrRelationsCondition(this);
946
1104
  }
947
1105
  /**
@@ -960,18 +1118,36 @@ class FluentFiltersCondition extends FluentBase {
960
1118
  * @return {FluentFiltersOrRelationsCondition}
961
1119
  */
962
1120
  containsText(text) {
963
- this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
1121
+ this._textStr = '';
1122
+ this._textStr += 'contain';
1123
+ this._textStr += ' text';
1124
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
964
1125
  return new FluentFiltersOrRelationsCondition(this);
965
1126
  }
966
1127
  /**
967
1128
  * Filters elements based on a textual description.
968
1129
  *
1130
+ * ## What Should I Write as Matching Text
1131
+ * The text description inside the `matching()` should describe the element visually.
1132
+ * It understands color, some famous company/product names, general descriptions.
1133
+ *
1134
+ * It sometimes requires a bit of playing to find a matching description:
1135
+ * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
1136
+ * Generally the more detail the better.
1137
+ *
1138
+ * **Examples:**
1139
+ * ```typescript
1140
+ * await aui.click().matching('a mask on purple background and a firefox logo').exec()
1141
+ * ```
1142
+ *
969
1143
  * @param {string} text - A description of the target element.
970
1144
  *
971
1145
  * @return {FluentFiltersOrRelationsCondition}
972
1146
  */
973
1147
  matching(text) {
974
- this._textStr = `matching ${Separators.STRING}${text}${Separators.STRING}`;
1148
+ this._textStr = '';
1149
+ this._textStr += 'matching';
1150
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
975
1151
  return new FluentFiltersOrRelationsCondition(this);
976
1152
  }
977
1153
  }
@@ -1019,7 +1195,8 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1019
1195
  * @return {FluentFiltersCondition}
1020
1196
  */
1021
1197
  or() {
1022
- this._textStr = 'or';
1198
+ this._textStr = '';
1199
+ this._textStr += 'or';
1023
1200
  return new FluentFiltersCondition(this);
1024
1201
  }
1025
1202
  /**
@@ -1085,7 +1262,8 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1085
1262
  * @return {FluentFiltersCondition}
1086
1263
  */
1087
1264
  and() {
1088
- this._textStr = 'and';
1265
+ this._textStr = '';
1266
+ this._textStr += 'and';
1089
1267
  return new FluentFiltersCondition(this);
1090
1268
  }
1091
1269
  /**
@@ -1111,7 +1289,8 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1111
1289
  * @return {FluentFiltersCondition}
1112
1290
  */
1113
1291
  in() {
1114
- this._textStr = 'in';
1292
+ this._textStr = '';
1293
+ this._textStr += 'in';
1115
1294
  return new FluentFiltersCondition(this);
1116
1295
  }
1117
1296
  /**
@@ -1132,8 +1311,13 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1132
1311
  *
1133
1312
  * @return {FluentFiltersCondition}
1134
1313
  */
1135
- rightOf() {
1136
- this._textStr = 'right of';
1314
+ rightOf(optionalIndex = 0) {
1315
+ this._textStr = '';
1316
+ if (optionalIndex !== undefined) {
1317
+ this._textStr += `index ${optionalIndex}`;
1318
+ }
1319
+ this._textStr += ' right';
1320
+ this._textStr += ' of';
1137
1321
  return new FluentFiltersCondition(this);
1138
1322
  }
1139
1323
  /**
@@ -1154,8 +1338,13 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1154
1338
  *
1155
1339
  * @return {FluentFiltersCondition}
1156
1340
  */
1157
- leftOf() {
1158
- this._textStr = 'left of';
1341
+ leftOf(optionalIndex = 0) {
1342
+ this._textStr = '';
1343
+ if (optionalIndex !== undefined) {
1344
+ this._textStr += `index ${optionalIndex}`;
1345
+ }
1346
+ this._textStr += ' left';
1347
+ this._textStr += ' of';
1159
1348
  return new FluentFiltersCondition(this);
1160
1349
  }
1161
1350
  /**
@@ -1179,8 +1368,12 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1179
1368
  *
1180
1369
  * @return {FluentFiltersCondition}
1181
1370
  */
1182
- below() {
1183
- this._textStr = 'below';
1371
+ below(optionalIndex = 0) {
1372
+ this._textStr = '';
1373
+ if (optionalIndex !== undefined) {
1374
+ this._textStr += `index ${optionalIndex}`;
1375
+ }
1376
+ this._textStr += ' below';
1184
1377
  return new FluentFiltersCondition(this);
1185
1378
  }
1186
1379
  /**
@@ -1204,8 +1397,12 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1204
1397
  *
1205
1398
  * @return {FluentFiltersCondition}
1206
1399
  */
1207
- above() {
1208
- this._textStr = 'above';
1400
+ above(optionalIndex = 0) {
1401
+ this._textStr = '';
1402
+ if (optionalIndex !== undefined) {
1403
+ this._textStr += `index ${optionalIndex}`;
1404
+ }
1405
+ this._textStr += ' above';
1209
1406
  return new FluentFiltersCondition(this);
1210
1407
  }
1211
1408
  /**
@@ -1234,7 +1431,9 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1234
1431
  * @return {FluentFiltersCondition}
1235
1432
  */
1236
1433
  nearestTo() {
1237
- this._textStr = 'nearest to';
1434
+ this._textStr = '';
1435
+ this._textStr += 'nearest';
1436
+ this._textStr += ' to';
1238
1437
  return new FluentFiltersCondition(this);
1239
1438
  }
1240
1439
  /**
@@ -1260,7 +1459,8 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1260
1459
  * @return {FluentFiltersCondition}
1261
1460
  */
1262
1461
  contains() {
1263
- this._textStr = 'contains';
1462
+ this._textStr = '';
1463
+ this._textStr += 'contains';
1264
1464
  return new FluentFiltersCondition(this);
1265
1465
  }
1266
1466
  /**
@@ -1287,7 +1487,8 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1287
1487
  * @return {ExecCondition}
1288
1488
  */
1289
1489
  exists() {
1290
- this._textStr = 'exists';
1490
+ this._textStr = '';
1491
+ this._textStr += 'exists';
1291
1492
  return new ExecCondition(this);
1292
1493
  }
1293
1494
  /**
@@ -1314,7 +1515,9 @@ class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
1314
1515
  * @return {ExecCondition}
1315
1516
  */
1316
1517
  notExists() {
1317
- this._textStr = 'not exists';
1518
+ this._textStr = '';
1519
+ this._textStr += 'not';
1520
+ this._textStr += ' exists';
1318
1521
  return new ExecCondition(this);
1319
1522
  }
1320
1523
  }
@@ -1329,7 +1532,7 @@ class FluentCommand extends FluentBase {
1329
1532
  /**
1330
1533
  * Expects a condition, e.g., `exists()` or `notExits()`.
1331
1534
  *
1332
- * Use the structure `expect().<your filter>.(exists()|notExists()` as shown in the examples below.
1535
+ * Use the structure `expect().<your filter>.(exists()|notExists())` as shown in the examples below.
1333
1536
  *
1334
1537
  * **Examples:**
1335
1538
  * ```typescript
@@ -1340,7 +1543,8 @@ class FluentCommand extends FluentBase {
1340
1543
  * @return {FluentFiltersCondition}
1341
1544
  */
1342
1545
  expect() {
1343
- this._textStr = 'Expect';
1546
+ this._textStr = '';
1547
+ this._textStr += 'Expect';
1344
1548
  return new FluentFiltersCondition(this);
1345
1549
  }
1346
1550
  /**
@@ -1356,7 +1560,9 @@ class FluentCommand extends FluentBase {
1356
1560
  * @return {FluentFilters}
1357
1561
  */
1358
1562
  click() {
1359
- this._textStr = 'Click on';
1563
+ this._textStr = '';
1564
+ this._textStr += 'Click';
1565
+ this._textStr += ' on';
1360
1566
  return new FluentFilters(this);
1361
1567
  }
1362
1568
  /**
@@ -1370,7 +1576,10 @@ class FluentCommand extends FluentBase {
1370
1576
  * @return {FluentFilters}
1371
1577
  */
1372
1578
  moveMouseTo() {
1373
- this._textStr = 'Move mouse to';
1579
+ this._textStr = '';
1580
+ this._textStr += 'Move';
1581
+ this._textStr += ' mouse';
1582
+ this._textStr += ' to';
1374
1583
  return new FluentFilters(this);
1375
1584
  }
1376
1585
  /**
@@ -1392,7 +1601,10 @@ class FluentCommand extends FluentBase {
1392
1601
  * @return {FluentFilters}
1393
1602
  */
1394
1603
  typeIn(text) {
1395
- this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING} in`;
1604
+ this._textStr = '';
1605
+ this._textStr += 'Type';
1606
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1607
+ this._textStr += ' in';
1396
1608
  return new FluentFilters(this);
1397
1609
  }
1398
1610
  /**
@@ -1411,7 +1623,13 @@ class FluentCommand extends FluentBase {
1411
1623
  * @return {FluentFilters}
1412
1624
  */
1413
1625
  scrollInside(x_offset, y_offset) {
1414
- this._textStr = `Scroll x ${x_offset} y ${y_offset} in`;
1626
+ this._textStr = '';
1627
+ this._textStr += 'Scroll';
1628
+ this._textStr += ' x';
1629
+ this._textStr += ` ${x_offset}`;
1630
+ this._textStr += ' y';
1631
+ this._textStr += ` ${y_offset}`;
1632
+ this._textStr += ' in';
1415
1633
  return new FluentFilters(this);
1416
1634
  }
1417
1635
  /**
@@ -1431,7 +1649,14 @@ class FluentCommand extends FluentBase {
1431
1649
  * @return {FluentFilters}
1432
1650
  */
1433
1651
  moveMouseRelativelyTo(x_offset, y_offset) {
1434
- this._textStr = `Move mouse x ${x_offset} y ${y_offset} relatively to`;
1652
+ this._textStr = '';
1653
+ this._textStr += 'Move';
1654
+ this._textStr += ' mouse';
1655
+ this._textStr += ' x';
1656
+ this._textStr += ` ${x_offset}`;
1657
+ this._textStr += ' y';
1658
+ this._textStr += ` ${y_offset}`;
1659
+ this._textStr += ' relatively to';
1435
1660
  return new FluentFilters(this);
1436
1661
  }
1437
1662
  /**
@@ -1452,7 +1677,12 @@ class FluentCommand extends FluentBase {
1452
1677
  * @return {FluentFilters}
1453
1678
  */
1454
1679
  swipe(x_offset, y_offset) {
1455
- this._textStr = `Swipe x ${x_offset} y ${y_offset}`;
1680
+ this._textStr = '';
1681
+ this._textStr += 'Swipe';
1682
+ this._textStr += ' x';
1683
+ this._textStr += ` ${x_offset}`;
1684
+ this._textStr += ' y';
1685
+ this._textStr += ` ${y_offset}`;
1456
1686
  return new FluentFilters(this);
1457
1687
  }
1458
1688
  /**
@@ -1474,7 +1704,9 @@ class FluentCommand extends FluentBase {
1474
1704
  * @return {Exec}
1475
1705
  */
1476
1706
  type(text) {
1477
- this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING}`;
1707
+ this._textStr = '';
1708
+ this._textStr += 'Type';
1709
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1478
1710
  return new Exec(this);
1479
1711
  }
1480
1712
  /**
@@ -1491,7 +1723,17 @@ class FluentCommand extends FluentBase {
1491
1723
  * @return {Exec}
1492
1724
  */
1493
1725
  moveMouseRelatively(x_offset, y_offset) {
1494
- this._textStr = `Move mouse from current position with x ${x_offset} y ${y_offset}`;
1726
+ this._textStr = '';
1727
+ this._textStr += 'Move';
1728
+ this._textStr += ' mouse';
1729
+ this._textStr += ' from';
1730
+ this._textStr += ' current';
1731
+ this._textStr += ' position';
1732
+ this._textStr += ' with';
1733
+ this._textStr += ' x';
1734
+ this._textStr += ` ${x_offset}`;
1735
+ this._textStr += ' y';
1736
+ this._textStr += ` ${y_offset}`;
1495
1737
  return new Exec(this);
1496
1738
  }
1497
1739
  /**
@@ -1510,7 +1752,14 @@ class FluentCommand extends FluentBase {
1510
1752
  * @return {Exec}
1511
1753
  */
1512
1754
  moveMouse(x_coordinate, y_coordinate) {
1513
- this._textStr = `Move mouse to x ${x_coordinate} y ${y_coordinate}`;
1755
+ this._textStr = '';
1756
+ this._textStr += 'Move';
1757
+ this._textStr += ' mouse';
1758
+ this._textStr += ' to';
1759
+ this._textStr += ' x';
1760
+ this._textStr += ` ${x_coordinate}`;
1761
+ this._textStr += ' y';
1762
+ this._textStr += ` ${y_coordinate}`;
1514
1763
  return new Exec(this);
1515
1764
  }
1516
1765
  /**
@@ -1532,7 +1781,12 @@ class FluentCommand extends FluentBase {
1532
1781
  * @return {Exec}
1533
1782
  */
1534
1783
  scroll(x_offset, y_offset) {
1535
- this._textStr = `Scroll x ${x_offset} y ${y_offset}`;
1784
+ this._textStr = '';
1785
+ this._textStr += 'Scroll';
1786
+ this._textStr += ' x';
1787
+ this._textStr += ` ${x_offset}`;
1788
+ this._textStr += ' y';
1789
+ this._textStr += ` ${y_offset}`;
1536
1790
  return new Exec(this);
1537
1791
  }
1538
1792
  /**
@@ -1558,7 +1812,11 @@ class FluentCommand extends FluentBase {
1558
1812
  * @return {Exec}
1559
1813
  */
1560
1814
  execOnShell(shell_command) {
1561
- this._textStr = `Execute shell command ${Separators.STRING}${shell_command}${Separators.STRING}`;
1815
+ this._textStr = '';
1816
+ this._textStr += 'Execute';
1817
+ this._textStr += ' shell';
1818
+ this._textStr += ' command';
1819
+ this._textStr += ` ${Separators.STRING}${shell_command}${Separators.STRING}`;
1562
1820
  return new Exec(this);
1563
1821
  }
1564
1822
  /**
@@ -1577,7 +1835,8 @@ class FluentCommand extends FluentBase {
1577
1835
  * @return {Exec}
1578
1836
  */
1579
1837
  mouseLeftClick() {
1580
- this._textStr = 'Mouse left click';
1838
+ this._textStr = '';
1839
+ this._textStr += 'Mouse left click';
1581
1840
  return new Exec(this);
1582
1841
  }
1583
1842
  /**
@@ -1596,7 +1855,8 @@ class FluentCommand extends FluentBase {
1596
1855
  * @return {Exec}
1597
1856
  */
1598
1857
  mouseRightClick() {
1599
- this._textStr = 'Mouse right click';
1858
+ this._textStr = '';
1859
+ this._textStr += 'Mouse right click';
1600
1860
  return new Exec(this);
1601
1861
  }
1602
1862
  /**
@@ -1615,7 +1875,8 @@ class FluentCommand extends FluentBase {
1615
1875
  * @return {Exec}
1616
1876
  */
1617
1877
  mouseMiddleClick() {
1618
- this._textStr = 'Mouse middle click';
1878
+ this._textStr = '';
1879
+ this._textStr += 'Mouse middle click';
1619
1880
  return new Exec(this);
1620
1881
  }
1621
1882
  /**
@@ -1634,7 +1895,8 @@ class FluentCommand extends FluentBase {
1634
1895
  * @return {Exec}
1635
1896
  */
1636
1897
  mouseDoubleLeftClick() {
1637
- this._textStr = 'Mouse double left click';
1898
+ this._textStr = '';
1899
+ this._textStr += 'Mouse double left click';
1638
1900
  return new Exec(this);
1639
1901
  }
1640
1902
  /**
@@ -1653,7 +1915,8 @@ class FluentCommand extends FluentBase {
1653
1915
  * @return {Exec}
1654
1916
  */
1655
1917
  mouseDoubleRightClick() {
1656
- this._textStr = 'Mouse double right click';
1918
+ this._textStr = '';
1919
+ this._textStr += 'Mouse double right click';
1657
1920
  return new Exec(this);
1658
1921
  }
1659
1922
  /**
@@ -1672,7 +1935,8 @@ class FluentCommand extends FluentBase {
1672
1935
  * @return {Exec}
1673
1936
  */
1674
1937
  mouseDoubleMiddleClick() {
1675
- this._textStr = 'Mouse double middle click';
1938
+ this._textStr = '';
1939
+ this._textStr += 'Mouse double middle click';
1676
1940
  return new Exec(this);
1677
1941
  }
1678
1942
  /**
@@ -1686,7 +1950,8 @@ class FluentCommand extends FluentBase {
1686
1950
  * @return {Exec}
1687
1951
  */
1688
1952
  mouseToggleDown() {
1689
- this._textStr = 'Mouse toggle down';
1953
+ this._textStr = '';
1954
+ this._textStr += 'Mouse toggle down';
1690
1955
  return new Exec(this);
1691
1956
  }
1692
1957
  /**
@@ -1700,7 +1965,8 @@ class FluentCommand extends FluentBase {
1700
1965
  * @return {Exec}
1701
1966
  */
1702
1967
  mouseToggleUp() {
1703
- this._textStr = 'Mouse toggle up';
1968
+ this._textStr = '';
1969
+ this._textStr += 'Mouse toggle up';
1704
1970
  return new Exec(this);
1705
1971
  }
1706
1972
  /**
@@ -1718,7 +1984,12 @@ class FluentCommand extends FluentBase {
1718
1984
  * @return {Exec}
1719
1985
  */
1720
1986
  pressThreeKeys(first_key, second_key, third_key) {
1721
- this._textStr = `Press key ${first_key} ${second_key} ${third_key}`;
1987
+ this._textStr = '';
1988
+ this._textStr += 'Press';
1989
+ this._textStr += ' key';
1990
+ this._textStr += ` ${first_key}`;
1991
+ this._textStr += ` ${second_key}`;
1992
+ this._textStr += ` ${third_key}`;
1722
1993
  return new Exec(this);
1723
1994
  }
1724
1995
  /**
@@ -1735,7 +2006,11 @@ class FluentCommand extends FluentBase {
1735
2006
  * @return {Exec}
1736
2007
  */
1737
2008
  pressTwoKeys(first_key, second_key) {
1738
- this._textStr = `Press key ${first_key} ${second_key}`;
2009
+ this._textStr = '';
2010
+ this._textStr += 'Press';
2011
+ this._textStr += ' key';
2012
+ this._textStr += ` ${first_key}`;
2013
+ this._textStr += ` ${second_key}`;
1739
2014
  return new Exec(this);
1740
2015
  }
1741
2016
  /**
@@ -1751,7 +2026,10 @@ class FluentCommand extends FluentBase {
1751
2026
  * @return {Exec}
1752
2027
  */
1753
2028
  pressKey(key) {
1754
- this._textStr = `Press key ${key}`;
2029
+ this._textStr = '';
2030
+ this._textStr += 'Press';
2031
+ this._textStr += ' key';
2032
+ this._textStr += ` ${key}`;
1755
2033
  return new Exec(this);
1756
2034
  }
1757
2035
  /**
@@ -1764,7 +2042,13 @@ class FluentCommand extends FluentBase {
1764
2042
  * @return {Exec}
1765
2043
  */
1766
2044
  pressAndroidThirdKey(first_key, second_key, third_key) {
1767
- this._textStr = `Press android key ${first_key} ${second_key} ${third_key}`;
2045
+ this._textStr = '';
2046
+ this._textStr += 'Press';
2047
+ this._textStr += ' android';
2048
+ this._textStr += ' key';
2049
+ this._textStr += ` ${first_key}`;
2050
+ this._textStr += ` ${second_key}`;
2051
+ this._textStr += ` ${third_key}`;
1768
2052
  return new Exec(this);
1769
2053
  }
1770
2054
  /**
@@ -1776,7 +2060,12 @@ class FluentCommand extends FluentBase {
1776
2060
  * @return {Exec}
1777
2061
  */
1778
2062
  pressAndroidTwoKey(first_key, second_key) {
1779
- this._textStr = `Press android key ${first_key} ${second_key}`;
2063
+ this._textStr = '';
2064
+ this._textStr += 'Press';
2065
+ this._textStr += ' android';
2066
+ this._textStr += ' key';
2067
+ this._textStr += ` ${first_key}`;
2068
+ this._textStr += ` ${second_key}`;
1780
2069
  return new Exec(this);
1781
2070
  }
1782
2071
  /**
@@ -1787,7 +2076,11 @@ class FluentCommand extends FluentBase {
1787
2076
  * @return {Exec}
1788
2077
  */
1789
2078
  pressAndroidKey(key) {
1790
- this._textStr = `Press android key ${key}`;
2079
+ this._textStr = '';
2080
+ this._textStr += 'Press';
2081
+ this._textStr += ' android';
2082
+ this._textStr += ' key';
2083
+ this._textStr += ` ${key}`;
1791
2084
  return new Exec(this);
1792
2085
  }
1793
2086
  }
@@ -1806,16 +2099,9 @@ class FluentFiltersGetter extends FluentBase {
1806
2099
  * @return {FluentFiltersOrRelationsGetter}
1807
2100
  */
1808
2101
  otherElement() {
1809
- this._textStr = 'other element';
1810
- return new FluentFiltersOrRelationsGetter(this);
1811
- }
1812
- /**
1813
- * Filters for a UI element 'table'.
1814
- *
1815
- * @return {FluentFiltersOrRelationsGetter}
1816
- */
1817
- table() {
1818
- this._textStr = 'table';
2102
+ this._textStr = '';
2103
+ this._textStr += 'other';
2104
+ this._textStr += ' element';
1819
2105
  return new FluentFiltersOrRelationsGetter(this);
1820
2106
  }
1821
2107
  /**
@@ -1824,7 +2110,8 @@ class FluentFiltersGetter extends FluentBase {
1824
2110
  * @return {FluentFiltersOrRelationsGetter}
1825
2111
  */
1826
2112
  switch() {
1827
- this._textStr = 'switch';
2113
+ this._textStr = '';
2114
+ this._textStr += 'switch';
1828
2115
  return new FluentFiltersOrRelationsGetter(this);
1829
2116
  }
1830
2117
  /**
@@ -1833,7 +2120,8 @@ class FluentFiltersGetter extends FluentBase {
1833
2120
  * @return {FluentFiltersOrRelationsGetter}
1834
2121
  */
1835
2122
  container() {
1836
- this._textStr = 'container';
2123
+ this._textStr = '';
2124
+ this._textStr += 'container';
1837
2125
  return new FluentFiltersOrRelationsGetter(this);
1838
2126
  }
1839
2127
  /**
@@ -1842,7 +2130,8 @@ class FluentFiltersGetter extends FluentBase {
1842
2130
  * @return {FluentFiltersOrRelationsGetter}
1843
2131
  */
1844
2132
  checkbox() {
1845
- this._textStr = 'checkbox';
2133
+ this._textStr = '';
2134
+ this._textStr += 'checkbox';
1846
2135
  return new FluentFiltersOrRelationsGetter(this);
1847
2136
  }
1848
2137
  /**
@@ -1856,11 +2145,18 @@ class FluentFiltersGetter extends FluentBase {
1856
2145
  * @return {FluentFiltersOrRelationsGetter}
1857
2146
  */
1858
2147
  element() {
1859
- this._textStr = 'element';
2148
+ this._textStr = '';
2149
+ this._textStr += 'element';
1860
2150
  return new FluentFiltersOrRelationsGetter(this);
1861
2151
  }
1862
2152
  /**
1863
- * Filters special elements
2153
+ * Filters special elements defined over a specifically trained custom element descriptor.
2154
+ *
2155
+ * Custom element descriptors are trained on your elements that were not detected with our
2156
+ * default models. Please contact us for further details on how to do this. We are working on
2157
+ * a solution to provide this in our User Portal.
2158
+ *
2159
+ * In the example below circle refers to a circle shaped icon with specific properties.
1864
2160
  *
1865
2161
  * **Examples:**
1866
2162
  * ```typescript
@@ -1872,7 +2168,9 @@ class FluentFiltersGetter extends FluentBase {
1872
2168
  * @return {FluentFiltersOrRelationsGetter}
1873
2169
  */
1874
2170
  special(text) {
1875
- this._textStr = `special ${Separators.STRING}${text}${Separators.STRING}`;
2171
+ this._textStr = '';
2172
+ this._textStr += 'special';
2173
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1876
2174
  return new FluentFiltersOrRelationsGetter(this);
1877
2175
  }
1878
2176
  /**
@@ -1886,7 +2184,41 @@ class FluentFiltersGetter extends FluentBase {
1886
2184
  * @return {FluentFiltersOrRelationsGetter}
1887
2185
  */
1888
2186
  button() {
1889
- this._textStr = 'button';
2187
+ this._textStr = '';
2188
+ this._textStr += 'button';
2189
+ return new FluentFiltersOrRelationsGetter(this);
2190
+ }
2191
+ /**
2192
+ *
2193
+ * @param {number} index - element index
2194
+ *
2195
+ * @return {FluentFiltersOrRelationsGetter}
2196
+ */
2197
+ row(index) {
2198
+ this._textStr = '';
2199
+ this._textStr += 'row';
2200
+ this._textStr += ` ${index}`;
2201
+ return new FluentFiltersOrRelationsGetter(this);
2202
+ }
2203
+ /**
2204
+ *
2205
+ * @param {number} index - element index
2206
+ *
2207
+ * @return {FluentFiltersOrRelationsGetter}
2208
+ */
2209
+ col(index) {
2210
+ this._textStr = '';
2211
+ this._textStr += 'col';
2212
+ this._textStr += ` ${index}`;
2213
+ return new FluentFiltersOrRelationsGetter(this);
2214
+ }
2215
+ /**
2216
+ *
2217
+ * @return {FluentFiltersOrRelationsGetter}
2218
+ */
2219
+ table() {
2220
+ this._textStr = '';
2221
+ this._textStr += 'table';
1890
2222
  return new FluentFiltersOrRelationsGetter(this);
1891
2223
  }
1892
2224
  /**
@@ -1904,8 +2236,12 @@ class FluentFiltersGetter extends FluentBase {
1904
2236
  *
1905
2237
  * @return {FluentFiltersOrRelationsGetter}
1906
2238
  */
1907
- text() {
1908
- this._textStr = 'text';
2239
+ text(text) {
2240
+ this._textStr = '';
2241
+ this._textStr += 'text';
2242
+ if (text !== undefined) {
2243
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2244
+ }
1909
2245
  return new FluentFiltersOrRelationsGetter(this);
1910
2246
  }
1911
2247
  /**
@@ -1923,7 +2259,8 @@ class FluentFiltersGetter extends FluentBase {
1923
2259
  * @return {FluentFiltersOrRelationsGetter}
1924
2260
  */
1925
2261
  icon() {
1926
- this._textStr = 'icon';
2262
+ this._textStr = '';
2263
+ this._textStr += 'icon';
1927
2264
  return new FluentFiltersOrRelationsGetter(this);
1928
2265
  }
1929
2266
  /**
@@ -1964,7 +2301,9 @@ class FluentFiltersGetter extends FluentBase {
1964
2301
  * @return {FluentFiltersOrRelationsGetter}
1965
2302
  */
1966
2303
  customElement(customElement) {
1967
- this._textStr = 'custom element';
2304
+ this._textStr = '';
2305
+ this._textStr += 'custom';
2306
+ this._textStr += ' element';
1968
2307
  this._params.set('customElement', customElement);
1969
2308
  return new FluentFiltersOrRelationsGetter(this);
1970
2309
  }
@@ -1984,7 +2323,8 @@ class FluentFiltersGetter extends FluentBase {
1984
2323
  * @return {FluentFiltersOrRelationsGetter}
1985
2324
  */
1986
2325
  image() {
1987
- this._textStr = 'image';
2326
+ this._textStr = '';
2327
+ this._textStr += 'image';
1988
2328
  return new FluentFiltersOrRelationsGetter(this);
1989
2329
  }
1990
2330
  /**
@@ -2003,7 +2343,8 @@ class FluentFiltersGetter extends FluentBase {
2003
2343
  * @return {FluentFiltersOrRelationsGetter}
2004
2344
  */
2005
2345
  textfield() {
2006
- this._textStr = 'textfield';
2346
+ this._textStr = '';
2347
+ this._textStr += 'textfield';
2007
2348
  return new FluentFiltersOrRelationsGetter(this);
2008
2349
  }
2009
2350
  /**
@@ -2030,7 +2371,10 @@ class FluentFiltersGetter extends FluentBase {
2030
2371
  * @return {FluentFiltersOrRelationsGetter}
2031
2372
  */
2032
2373
  withText(text) {
2033
- this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
2374
+ this._textStr = '';
2375
+ this._textStr += 'with';
2376
+ this._textStr += ' text';
2377
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2034
2378
  return new FluentFiltersOrRelationsGetter(this);
2035
2379
  }
2036
2380
  /**
@@ -2051,7 +2395,11 @@ class FluentFiltersGetter extends FluentBase {
2051
2395
  * @return {FluentFiltersOrRelationsGetter}
2052
2396
  */
2053
2397
  withTextRegex(regex_pattern) {
2054
- this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
2398
+ this._textStr = '';
2399
+ this._textStr += 'match';
2400
+ this._textStr += ' regex';
2401
+ this._textStr += ' pattern';
2402
+ this._textStr += ` ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
2055
2403
  return new FluentFiltersOrRelationsGetter(this);
2056
2404
  }
2057
2405
  /**
@@ -2075,7 +2423,10 @@ class FluentFiltersGetter extends FluentBase {
2075
2423
  * @return {FluentFiltersOrRelationsGetter}
2076
2424
  */
2077
2425
  withExactText(text) {
2078
- this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
2426
+ this._textStr = '';
2427
+ this._textStr += 'equals';
2428
+ this._textStr += ' text';
2429
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2079
2430
  return new FluentFiltersOrRelationsGetter(this);
2080
2431
  }
2081
2432
  /**
@@ -2094,18 +2445,36 @@ class FluentFiltersGetter extends FluentBase {
2094
2445
  * @return {FluentFiltersOrRelationsGetter}
2095
2446
  */
2096
2447
  containsText(text) {
2097
- this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
2448
+ this._textStr = '';
2449
+ this._textStr += 'contain';
2450
+ this._textStr += ' text';
2451
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2098
2452
  return new FluentFiltersOrRelationsGetter(this);
2099
2453
  }
2100
2454
  /**
2101
2455
  * Filters elements based on a textual description.
2102
2456
  *
2457
+ * ## What Should I Write as Matching Text
2458
+ * The text description inside the `matching()` should describe the element visually.
2459
+ * It understands color, some famous company/product names, general descriptions.
2460
+ *
2461
+ * It sometimes requires a bit of playing to find a matching description:
2462
+ * E.g. `puzzle piece` can fail here while `an icon showing a puzzle piece` might work.
2463
+ * Generally the more detail the better.
2464
+ *
2465
+ * **Examples:**
2466
+ * ```typescript
2467
+ * await aui.click().matching('a mask on purple background and a firefox logo').exec()
2468
+ * ```
2469
+ *
2103
2470
  * @param {string} text - A description of the target element.
2104
2471
  *
2105
2472
  * @return {FluentFiltersOrRelationsGetter}
2106
2473
  */
2107
2474
  matching(text) {
2108
- this._textStr = `matching ${Separators.STRING}${text}${Separators.STRING}`;
2475
+ this._textStr = '';
2476
+ this._textStr += 'matching';
2477
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
2109
2478
  return new FluentFiltersOrRelationsGetter(this);
2110
2479
  }
2111
2480
  }
@@ -2153,7 +2522,8 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2153
2522
  * @return {FluentFiltersGetter}
2154
2523
  */
2155
2524
  or() {
2156
- this._textStr = 'or';
2525
+ this._textStr = '';
2526
+ this._textStr += 'or';
2157
2527
  return new FluentFiltersGetter(this);
2158
2528
  }
2159
2529
  /**
@@ -2219,7 +2589,8 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2219
2589
  * @return {FluentFiltersGetter}
2220
2590
  */
2221
2591
  and() {
2222
- this._textStr = 'and';
2592
+ this._textStr = '';
2593
+ this._textStr += 'and';
2223
2594
  return new FluentFiltersGetter(this);
2224
2595
  }
2225
2596
  /**
@@ -2245,7 +2616,8 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2245
2616
  * @return {FluentFiltersGetter}
2246
2617
  */
2247
2618
  in() {
2248
- this._textStr = 'in';
2619
+ this._textStr = '';
2620
+ this._textStr += 'in';
2249
2621
  return new FluentFiltersGetter(this);
2250
2622
  }
2251
2623
  /**
@@ -2266,8 +2638,13 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2266
2638
  *
2267
2639
  * @return {FluentFiltersGetter}
2268
2640
  */
2269
- rightOf() {
2270
- this._textStr = 'right of';
2641
+ rightOf(optionalIndex = 0) {
2642
+ this._textStr = '';
2643
+ if (optionalIndex !== undefined) {
2644
+ this._textStr += `index ${optionalIndex}`;
2645
+ }
2646
+ this._textStr += ' right';
2647
+ this._textStr += ' of';
2271
2648
  return new FluentFiltersGetter(this);
2272
2649
  }
2273
2650
  /**
@@ -2288,8 +2665,13 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2288
2665
  *
2289
2666
  * @return {FluentFiltersGetter}
2290
2667
  */
2291
- leftOf() {
2292
- this._textStr = 'left of';
2668
+ leftOf(optionalIndex = 0) {
2669
+ this._textStr = '';
2670
+ if (optionalIndex !== undefined) {
2671
+ this._textStr += `index ${optionalIndex}`;
2672
+ }
2673
+ this._textStr += ' left';
2674
+ this._textStr += ' of';
2293
2675
  return new FluentFiltersGetter(this);
2294
2676
  }
2295
2677
  /**
@@ -2313,8 +2695,12 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2313
2695
  *
2314
2696
  * @return {FluentFiltersGetter}
2315
2697
  */
2316
- below() {
2317
- this._textStr = 'below';
2698
+ below(optionalIndex = 0) {
2699
+ this._textStr = '';
2700
+ if (optionalIndex !== undefined) {
2701
+ this._textStr += `index ${optionalIndex}`;
2702
+ }
2703
+ this._textStr += ' below';
2318
2704
  return new FluentFiltersGetter(this);
2319
2705
  }
2320
2706
  /**
@@ -2338,8 +2724,12 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2338
2724
  *
2339
2725
  * @return {FluentFiltersGetter}
2340
2726
  */
2341
- above() {
2342
- this._textStr = 'above';
2727
+ above(optionalIndex = 0) {
2728
+ this._textStr = '';
2729
+ if (optionalIndex !== undefined) {
2730
+ this._textStr += `index ${optionalIndex}`;
2731
+ }
2732
+ this._textStr += ' above';
2343
2733
  return new FluentFiltersGetter(this);
2344
2734
  }
2345
2735
  /**
@@ -2368,7 +2758,9 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2368
2758
  * @return {FluentFiltersGetter}
2369
2759
  */
2370
2760
  nearestTo() {
2371
- this._textStr = 'nearest to';
2761
+ this._textStr = '';
2762
+ this._textStr += 'nearest';
2763
+ this._textStr += ' to';
2372
2764
  return new FluentFiltersGetter(this);
2373
2765
  }
2374
2766
  /**
@@ -2394,7 +2786,8 @@ class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
2394
2786
  * @return {FluentFiltersGetter}
2395
2787
  */
2396
2788
  contains() {
2397
- this._textStr = 'contains';
2789
+ this._textStr = '';
2790
+ this._textStr += 'contains';
2398
2791
  return new FluentFiltersGetter(this);
2399
2792
  }
2400
2793
  /**
@@ -2439,7 +2832,9 @@ class Getter extends FluentCommand {
2439
2832
  * @return {FluentFiltersGetter}
2440
2833
  */
2441
2834
  get() {
2442
- this._textStr = 'get element';
2835
+ this._textStr = '';
2836
+ this._textStr += 'get';
2837
+ this._textStr += ' element';
2443
2838
  return new FluentFiltersGetter(this);
2444
2839
  }
2445
2840
  /**
@@ -2482,7 +2877,10 @@ class Getter extends FluentCommand {
2482
2877
  * @return {ExecGetter}
2483
2878
  */
2484
2879
  getAll() {
2485
- this._textStr = 'get all elements';
2880
+ this._textStr = '';
2881
+ this._textStr += 'get';
2882
+ this._textStr += ' all';
2883
+ this._textStr += ' elements';
2486
2884
  return new ExecGetter(this);
2487
2885
  }
2488
2886
  }