askui 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/annotation/template.html +11390 -1
- package/dist/cjs/core/model/annotation-result/detected-element.d.ts +3 -3
- package/dist/cjs/core/model/annotation-result/detected-element.js +4 -4
- package/dist/cjs/execution/dsl.d.ts +196 -81
- package/dist/cjs/execution/dsl.js +196 -90
- package/dist/cjs/execution/ui-controller-client-interface.d.ts +1 -1
- package/dist/cjs/lib/download-binaries.d.ts +1 -1
- package/dist/cjs/lib/download-binaries.js +42 -29
- package/dist/cjs/lib/ui-controller-darwin.js +3 -3
- package/dist/cjs/lib/ui-controller-facade.d.ts +1 -2
- package/dist/cjs/lib/ui-controller-facade.js +6 -11
- package/dist/cjs/lib/ui-controller-linux.js +1 -1
- package/dist/esm/core/annotation/template.html +11390 -1
- package/dist/esm/core/model/annotation-result/detected-element.d.ts +3 -3
- package/dist/esm/core/model/annotation-result/detected-element.js +4 -4
- package/dist/esm/execution/dsl.d.ts +196 -81
- package/dist/esm/execution/dsl.js +196 -90
- package/dist/esm/execution/ui-controller-client-interface.d.ts +1 -1
- package/dist/esm/lib/download-binaries.d.ts +1 -1
- package/dist/esm/lib/download-binaries.js +40 -27
- package/dist/esm/lib/ui-controller-darwin.js +3 -3
- package/dist/esm/lib/ui-controller-facade.d.ts +1 -2
- package/dist/esm/lib/ui-controller-facade.js +7 -12
- package/dist/esm/lib/ui-controller-linux.js +1 -1
- package/dist/example_projects_templates/typescript_jest/test/my-first-askui-test-suite.test.ts +5 -6
- package/package.json +1 -1
- package/dist/cjs/core/annotation/annotation-json.d.ts +0 -5
- package/dist/cjs/core/annotation/annotation-json.js +0 -2
- package/dist/cjs/core/model/test-case-dto/custom-element.spec.d.ts +0 -1
- package/dist/cjs/core/model/test-case-dto/custom-element.spec.js +0 -53
- package/dist/cjs/execution/dsl.spec.d.ts +0 -1
- package/dist/cjs/execution/dsl.spec.js +0 -75
- package/dist/cjs/execution/read-environment-credentials.spec.d.ts +0 -1
- package/dist/cjs/execution/read-environment-credentials.spec.js +0 -11
- package/dist/cjs/lib/ui-controller-args.spec.d.ts +0 -1
- package/dist/cjs/lib/ui-controller-args.spec.js +0 -23
- package/dist/cjs/utils/http/credentials.spec.d.ts +0 -1
- package/dist/cjs/utils/http/credentials.spec.js +0 -11
- package/dist/esm/core/annotation/annotation-json.d.ts +0 -5
- package/dist/esm/core/annotation/annotation-json.js +0 -1
- package/dist/esm/core/model/test-case-dto/custom-element.spec.d.ts +0 -1
- package/dist/esm/core/model/test-case-dto/custom-element.spec.js +0 -51
- package/dist/esm/execution/dsl.spec.d.ts +0 -1
- package/dist/esm/execution/dsl.spec.js +0 -73
- package/dist/esm/execution/read-environment-credentials.spec.d.ts +0 -1
- package/dist/esm/execution/read-environment-credentials.spec.js +0 -9
- package/dist/esm/lib/ui-controller-args.spec.d.ts +0 -1
- package/dist/esm/lib/ui-controller-args.spec.js +0 -21
- package/dist/esm/utils/http/credentials.spec.d.ts +0 -1
- package/dist/esm/utils/http/credentials.spec.js +0 -9
|
@@ -637,6 +637,11 @@ export class FluentFilters extends FluentBase {
|
|
|
637
637
|
/**
|
|
638
638
|
* Filters for an UI element 'button'.
|
|
639
639
|
*
|
|
640
|
+
* **Examples:**
|
|
641
|
+
* ```typescript
|
|
642
|
+
* await aui.moveMouseTo().button().exec()
|
|
643
|
+
* ```
|
|
644
|
+
*
|
|
640
645
|
* @return {FluentFiltersOrRelations}
|
|
641
646
|
*/
|
|
642
647
|
button() {
|
|
@@ -710,8 +715,17 @@ export class FluentFilters extends FluentBase {
|
|
|
710
715
|
* ```typescript
|
|
711
716
|
* 'text' === withText('text') => true
|
|
712
717
|
* 'test' === withText('text') => true
|
|
718
|
+
* 'Test' === withText('text') => true
|
|
719
|
+
* 'Text' === withText('text') => true
|
|
720
|
+
* 'TEXT' === withText('text') => true
|
|
721
|
+
* 'texst' === withText('text') => true
|
|
722
|
+
* 'texts' === withText('text') => true
|
|
723
|
+
*
|
|
724
|
+
* // usually false
|
|
725
|
+
* 'atebxtc' === withText('text') => false
|
|
713
726
|
* 'other' === withText('text') => false
|
|
714
727
|
* ```
|
|
728
|
+
* 
|
|
715
729
|
*
|
|
716
730
|
* @param {string} text - A text to be matched.
|
|
717
731
|
*
|
|
@@ -730,9 +744,11 @@ export class FluentFilters extends FluentBase {
|
|
|
730
744
|
* 'The rain in Spain' === withTextRegex('\b[Ss]\w+') => true
|
|
731
745
|
* 'The rain in Portugal' === withTextRegex('\b[Ss]\w+') => false
|
|
732
746
|
* 'The rain in switzerland' === withTextRegex('\b[Ss]\w+') => true
|
|
747
|
+
*
|
|
748
|
+
* await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
|
|
733
749
|
* ```
|
|
734
750
|
*
|
|
735
|
-
* @param {string} regex_pattern -
|
|
751
|
+
* @param {string} regex_pattern - A regex pattern
|
|
736
752
|
*
|
|
737
753
|
* @return {FluentFiltersOrRelations}
|
|
738
754
|
*/
|
|
@@ -752,6 +768,8 @@ export class FluentFilters extends FluentBase {
|
|
|
752
768
|
* 'text' === withExactText('text') => true
|
|
753
769
|
* 'test' === withExactText('text') => false
|
|
754
770
|
* 'other' === withExactText('text') => false
|
|
771
|
+
*
|
|
772
|
+
* await aui.moveMouseTo().text().withExactText('Password').exec()
|
|
755
773
|
* ```
|
|
756
774
|
*
|
|
757
775
|
* @param {string} text - A text to be matched.
|
|
@@ -771,6 +789,7 @@ export class FluentFilters extends FluentBase {
|
|
|
771
789
|
* 'This is an text' === containsText('other text') => false
|
|
772
790
|
* 'This is an text' === containsText('other') => false
|
|
773
791
|
* ```
|
|
792
|
+
* 
|
|
774
793
|
*
|
|
775
794
|
* @param {string} text - A text to be matched.
|
|
776
795
|
*
|
|
@@ -780,17 +799,6 @@ export class FluentFilters extends FluentBase {
|
|
|
780
799
|
this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
|
|
781
800
|
return new FluentFiltersOrRelations(this);
|
|
782
801
|
}
|
|
783
|
-
/**
|
|
784
|
-
* Filters for elements having a specific color.
|
|
785
|
-
*
|
|
786
|
-
* @param {COLOR} color - A color to match
|
|
787
|
-
*
|
|
788
|
-
* @return {FluentFiltersOrRelations}
|
|
789
|
-
*/
|
|
790
|
-
colored(color) {
|
|
791
|
-
this._textStr = `with color ${color}`;
|
|
792
|
-
return new FluentFiltersOrRelations(this);
|
|
793
|
-
}
|
|
794
802
|
}
|
|
795
803
|
// Relations
|
|
796
804
|
export class FluentFiltersOrRelations extends FluentFilters {
|
|
@@ -822,7 +830,6 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
822
830
|
* DetectedElement {
|
|
823
831
|
* name: 'BUTTON',
|
|
824
832
|
* text: 'button',
|
|
825
|
-
* colors: [ 'red', 'black', 'red' ],
|
|
826
833
|
* bndbox: BoundingBox {
|
|
827
834
|
* xmin: 900,
|
|
828
835
|
* ymin: 910,
|
|
@@ -845,21 +852,19 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
845
852
|
* **Examples:**
|
|
846
853
|
* ```text
|
|
847
854
|
* example scene:
|
|
848
|
-
*
|
|
849
|
-
* | icon user
|
|
850
|
-
*
|
|
851
|
-
* ```
|
|
855
|
+
* --------------- ----------------
|
|
856
|
+
* | icon user | | icon search |
|
|
857
|
+
* --------------- ---------------n```
|
|
852
858
|
* ```typescript
|
|
853
|
-
* const icons = await aui.get().icon().
|
|
859
|
+
* const icons = await aui.get().icon().exec();
|
|
854
860
|
* console.log(icons);
|
|
855
861
|
* ```
|
|
856
|
-
* Using only the filter
|
|
862
|
+
* Using only the filter icon, the get command will return both icons
|
|
857
863
|
* ```text
|
|
858
864
|
* console output: [
|
|
859
865
|
* DetectedElement {
|
|
860
866
|
* name: 'ICON',
|
|
861
867
|
* text: 'user',
|
|
862
|
-
* colors: [ 'black', 'black', 'black' ],
|
|
863
868
|
* bndbox: BoundingBox {
|
|
864
869
|
* xmin: 1000,
|
|
865
870
|
* ymin: 1010,
|
|
@@ -869,8 +874,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
869
874
|
* },
|
|
870
875
|
* DetectedElement {
|
|
871
876
|
* name: 'ICON',
|
|
872
|
-
* text: '
|
|
873
|
-
* colors: [ 'red', 'red', 'red' ],
|
|
877
|
+
* text: 'search',
|
|
874
878
|
* bndbox: BoundingBox {
|
|
875
879
|
* xmin: 900,
|
|
876
880
|
* ymin: 910,
|
|
@@ -882,16 +886,15 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
882
886
|
* ```
|
|
883
887
|
* You can combine filters with **the `and()` relation** and specify exactly which icon you want
|
|
884
888
|
* ```typescript
|
|
885
|
-
* const icons = await aui.get().icon().
|
|
889
|
+
* const icons = await aui.get().icon().and().withText('user').exec()
|
|
886
890
|
* console.log(icons)
|
|
887
891
|
* ```
|
|
888
|
-
* The get command returns only the
|
|
892
|
+
* The get command returns only the user icon although both elements are icons
|
|
889
893
|
* ```text
|
|
890
894
|
* console output: [
|
|
891
895
|
* DetectedElement {
|
|
892
896
|
* name: 'ICON',
|
|
893
897
|
* text: 'user',
|
|
894
|
-
* colors: [ 'red', 'red', 'red' ],
|
|
895
898
|
* bndbox: BoundingBox {
|
|
896
899
|
* xmin: 900,
|
|
897
900
|
* ymin: 910,
|
|
@@ -926,6 +929,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
926
929
|
* // Returns nothing because innerEl is not inside outerEl
|
|
927
930
|
* ...outerEl().in().innerEl()
|
|
928
931
|
* ```
|
|
932
|
+
* 
|
|
929
933
|
*
|
|
930
934
|
* @return {FluentFilters}
|
|
931
935
|
*/
|
|
@@ -947,6 +951,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
947
951
|
* // Returns no element because leftEl is left of rightEl
|
|
948
952
|
* ...leftEl().rightOf().rightEl()
|
|
949
953
|
* ```
|
|
954
|
+
* 
|
|
950
955
|
*
|
|
951
956
|
* @return {FluentFilters}
|
|
952
957
|
*/
|
|
@@ -968,6 +973,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
968
973
|
* // Returns no element because rightEl is left of leftEl
|
|
969
974
|
* ...rightEl().leftOf().leftEl()
|
|
970
975
|
* ```
|
|
976
|
+
* 
|
|
971
977
|
*
|
|
972
978
|
* @return {FluentFilters}
|
|
973
979
|
*/
|
|
@@ -992,6 +998,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
992
998
|
* // Returns no element because text is above button
|
|
993
999
|
* ...text().below().button()
|
|
994
1000
|
* ```
|
|
1001
|
+
* 
|
|
995
1002
|
*
|
|
996
1003
|
* @return {FluentFilters}
|
|
997
1004
|
*/
|
|
@@ -1016,6 +1023,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
1016
1023
|
* // Returns no element because button is below text
|
|
1017
1024
|
* ...button().above().text()
|
|
1018
1025
|
* ```
|
|
1026
|
+
* 
|
|
1019
1027
|
*
|
|
1020
1028
|
* @return {FluentFilters}
|
|
1021
1029
|
*/
|
|
@@ -1044,6 +1052,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
1044
1052
|
* // Returns button 1 because button 1 is nearer to the text than button 2
|
|
1045
1053
|
* ...button().nearestTo().text()
|
|
1046
1054
|
* ```
|
|
1055
|
+
* 
|
|
1047
1056
|
*
|
|
1048
1057
|
* @return {FluentFilters}
|
|
1049
1058
|
*/
|
|
@@ -1069,6 +1078,7 @@ export class FluentFiltersOrRelations extends FluentFilters {
|
|
|
1069
1078
|
* // Returns no element because innerEl contains no outerEl
|
|
1070
1079
|
* ...innerEl().contains().outerEl()
|
|
1071
1080
|
* ```
|
|
1081
|
+
* 
|
|
1072
1082
|
*
|
|
1073
1083
|
* @return {FluentFilters}
|
|
1074
1084
|
*/
|
|
@@ -1661,6 +1671,11 @@ export class FluentFiltersCondition extends FluentBase {
|
|
|
1661
1671
|
/**
|
|
1662
1672
|
* Filters for an UI element 'button'.
|
|
1663
1673
|
*
|
|
1674
|
+
* **Examples:**
|
|
1675
|
+
* ```typescript
|
|
1676
|
+
* await aui.moveMouseTo().button().exec()
|
|
1677
|
+
* ```
|
|
1678
|
+
*
|
|
1664
1679
|
* @return {FluentFiltersOrRelationsCondition}
|
|
1665
1680
|
*/
|
|
1666
1681
|
button() {
|
|
@@ -1734,8 +1749,17 @@ export class FluentFiltersCondition extends FluentBase {
|
|
|
1734
1749
|
* ```typescript
|
|
1735
1750
|
* 'text' === withText('text') => true
|
|
1736
1751
|
* 'test' === withText('text') => true
|
|
1752
|
+
* 'Test' === withText('text') => true
|
|
1753
|
+
* 'Text' === withText('text') => true
|
|
1754
|
+
* 'TEXT' === withText('text') => true
|
|
1755
|
+
* 'texst' === withText('text') => true
|
|
1756
|
+
* 'texts' === withText('text') => true
|
|
1757
|
+
*
|
|
1758
|
+
* // usually false
|
|
1759
|
+
* 'atebxtc' === withText('text') => false
|
|
1737
1760
|
* 'other' === withText('text') => false
|
|
1738
1761
|
* ```
|
|
1762
|
+
* 
|
|
1739
1763
|
*
|
|
1740
1764
|
* @param {string} text - A text to be matched.
|
|
1741
1765
|
*
|
|
@@ -1754,9 +1778,11 @@ export class FluentFiltersCondition extends FluentBase {
|
|
|
1754
1778
|
* 'The rain in Spain' === withTextRegex('\b[Ss]\w+') => true
|
|
1755
1779
|
* 'The rain in Portugal' === withTextRegex('\b[Ss]\w+') => false
|
|
1756
1780
|
* 'The rain in switzerland' === withTextRegex('\b[Ss]\w+') => true
|
|
1781
|
+
*
|
|
1782
|
+
* await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
|
|
1757
1783
|
* ```
|
|
1758
1784
|
*
|
|
1759
|
-
* @param {string} regex_pattern -
|
|
1785
|
+
* @param {string} regex_pattern - A regex pattern
|
|
1760
1786
|
*
|
|
1761
1787
|
* @return {FluentFiltersOrRelationsCondition}
|
|
1762
1788
|
*/
|
|
@@ -1776,6 +1802,8 @@ export class FluentFiltersCondition extends FluentBase {
|
|
|
1776
1802
|
* 'text' === withExactText('text') => true
|
|
1777
1803
|
* 'test' === withExactText('text') => false
|
|
1778
1804
|
* 'other' === withExactText('text') => false
|
|
1805
|
+
*
|
|
1806
|
+
* await aui.moveMouseTo().text().withExactText('Password').exec()
|
|
1779
1807
|
* ```
|
|
1780
1808
|
*
|
|
1781
1809
|
* @param {string} text - A text to be matched.
|
|
@@ -1795,6 +1823,7 @@ export class FluentFiltersCondition extends FluentBase {
|
|
|
1795
1823
|
* 'This is an text' === containsText('other text') => false
|
|
1796
1824
|
* 'This is an text' === containsText('other') => false
|
|
1797
1825
|
* ```
|
|
1826
|
+
* 
|
|
1798
1827
|
*
|
|
1799
1828
|
* @param {string} text - A text to be matched.
|
|
1800
1829
|
*
|
|
@@ -1804,17 +1833,6 @@ export class FluentFiltersCondition extends FluentBase {
|
|
|
1804
1833
|
this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
|
|
1805
1834
|
return new FluentFiltersOrRelationsCondition(this);
|
|
1806
1835
|
}
|
|
1807
|
-
/**
|
|
1808
|
-
* Filters for elements having a specific color.
|
|
1809
|
-
*
|
|
1810
|
-
* @param {COLOR} color - A color to match
|
|
1811
|
-
*
|
|
1812
|
-
* @return {FluentFiltersOrRelationsCondition}
|
|
1813
|
-
*/
|
|
1814
|
-
colored(color) {
|
|
1815
|
-
this._textStr = `with color ${color}`;
|
|
1816
|
-
return new FluentFiltersOrRelationsCondition(this);
|
|
1817
|
-
}
|
|
1818
1836
|
}
|
|
1819
1837
|
// Relations
|
|
1820
1838
|
export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
@@ -1846,7 +1864,6 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
1846
1864
|
* DetectedElement {
|
|
1847
1865
|
* name: 'BUTTON',
|
|
1848
1866
|
* text: 'button',
|
|
1849
|
-
* colors: [ 'red', 'black', 'red' ],
|
|
1850
1867
|
* bndbox: BoundingBox {
|
|
1851
1868
|
* xmin: 900,
|
|
1852
1869
|
* ymin: 910,
|
|
@@ -1869,21 +1886,19 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
1869
1886
|
* **Examples:**
|
|
1870
1887
|
* ```text
|
|
1871
1888
|
* example scene:
|
|
1872
|
-
*
|
|
1873
|
-
* | icon user
|
|
1874
|
-
*
|
|
1875
|
-
* ```
|
|
1889
|
+
* --------------- ----------------
|
|
1890
|
+
* | icon user | | icon search |
|
|
1891
|
+
* --------------- ---------------n```
|
|
1876
1892
|
* ```typescript
|
|
1877
|
-
* const icons = await aui.get().icon().
|
|
1893
|
+
* const icons = await aui.get().icon().exec();
|
|
1878
1894
|
* console.log(icons);
|
|
1879
1895
|
* ```
|
|
1880
|
-
* Using only the filter
|
|
1896
|
+
* Using only the filter icon, the get command will return both icons
|
|
1881
1897
|
* ```text
|
|
1882
1898
|
* console output: [
|
|
1883
1899
|
* DetectedElement {
|
|
1884
1900
|
* name: 'ICON',
|
|
1885
1901
|
* text: 'user',
|
|
1886
|
-
* colors: [ 'black', 'black', 'black' ],
|
|
1887
1902
|
* bndbox: BoundingBox {
|
|
1888
1903
|
* xmin: 1000,
|
|
1889
1904
|
* ymin: 1010,
|
|
@@ -1893,8 +1908,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
1893
1908
|
* },
|
|
1894
1909
|
* DetectedElement {
|
|
1895
1910
|
* name: 'ICON',
|
|
1896
|
-
* text: '
|
|
1897
|
-
* colors: [ 'red', 'red', 'red' ],
|
|
1911
|
+
* text: 'search',
|
|
1898
1912
|
* bndbox: BoundingBox {
|
|
1899
1913
|
* xmin: 900,
|
|
1900
1914
|
* ymin: 910,
|
|
@@ -1906,16 +1920,15 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
1906
1920
|
* ```
|
|
1907
1921
|
* You can combine filters with **the `and()` relation** and specify exactly which icon you want
|
|
1908
1922
|
* ```typescript
|
|
1909
|
-
* const icons = await aui.get().icon().
|
|
1923
|
+
* const icons = await aui.get().icon().and().withText('user').exec()
|
|
1910
1924
|
* console.log(icons)
|
|
1911
1925
|
* ```
|
|
1912
|
-
* The get command returns only the
|
|
1926
|
+
* The get command returns only the user icon although both elements are icons
|
|
1913
1927
|
* ```text
|
|
1914
1928
|
* console output: [
|
|
1915
1929
|
* DetectedElement {
|
|
1916
1930
|
* name: 'ICON',
|
|
1917
1931
|
* text: 'user',
|
|
1918
|
-
* colors: [ 'red', 'red', 'red' ],
|
|
1919
1932
|
* bndbox: BoundingBox {
|
|
1920
1933
|
* xmin: 900,
|
|
1921
1934
|
* ymin: 910,
|
|
@@ -1950,6 +1963,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
1950
1963
|
* // Returns nothing because innerEl is not inside outerEl
|
|
1951
1964
|
* ...outerEl().in().innerEl()
|
|
1952
1965
|
* ```
|
|
1966
|
+
* 
|
|
1953
1967
|
*
|
|
1954
1968
|
* @return {FluentFiltersCondition}
|
|
1955
1969
|
*/
|
|
@@ -1971,6 +1985,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
1971
1985
|
* // Returns no element because leftEl is left of rightEl
|
|
1972
1986
|
* ...leftEl().rightOf().rightEl()
|
|
1973
1987
|
* ```
|
|
1988
|
+
* 
|
|
1974
1989
|
*
|
|
1975
1990
|
* @return {FluentFiltersCondition}
|
|
1976
1991
|
*/
|
|
@@ -1992,6 +2007,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
1992
2007
|
* // Returns no element because rightEl is left of leftEl
|
|
1993
2008
|
* ...rightEl().leftOf().leftEl()
|
|
1994
2009
|
* ```
|
|
2010
|
+
* 
|
|
1995
2011
|
*
|
|
1996
2012
|
* @return {FluentFiltersCondition}
|
|
1997
2013
|
*/
|
|
@@ -2016,6 +2032,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
2016
2032
|
* // Returns no element because text is above button
|
|
2017
2033
|
* ...text().below().button()
|
|
2018
2034
|
* ```
|
|
2035
|
+
* 
|
|
2019
2036
|
*
|
|
2020
2037
|
* @return {FluentFiltersCondition}
|
|
2021
2038
|
*/
|
|
@@ -2040,6 +2057,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
2040
2057
|
* // Returns no element because button is below text
|
|
2041
2058
|
* ...button().above().text()
|
|
2042
2059
|
* ```
|
|
2060
|
+
* 
|
|
2043
2061
|
*
|
|
2044
2062
|
* @return {FluentFiltersCondition}
|
|
2045
2063
|
*/
|
|
@@ -2068,6 +2086,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
2068
2086
|
* // Returns button 1 because button 1 is nearer to the text than button 2
|
|
2069
2087
|
* ...button().nearestTo().text()
|
|
2070
2088
|
* ```
|
|
2089
|
+
* 
|
|
2071
2090
|
*
|
|
2072
2091
|
* @return {FluentFiltersCondition}
|
|
2073
2092
|
*/
|
|
@@ -2093,6 +2112,7 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
2093
2112
|
* // Returns no element because innerEl contains no outerEl
|
|
2094
2113
|
* ...innerEl().contains().outerEl()
|
|
2095
2114
|
* ```
|
|
2115
|
+
* 
|
|
2096
2116
|
*
|
|
2097
2117
|
* @return {FluentFiltersCondition}
|
|
2098
2118
|
*/
|
|
@@ -2103,6 +2123,11 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
2103
2123
|
/**
|
|
2104
2124
|
* Expects that filtered element exists.
|
|
2105
2125
|
*
|
|
2126
|
+
* **Examples:**
|
|
2127
|
+
* ```typescript
|
|
2128
|
+
* await aui.expect().text().withText('Login').exists().exec()
|
|
2129
|
+
* ```
|
|
2130
|
+
*
|
|
2106
2131
|
* @return {ExecCondition}
|
|
2107
2132
|
*/
|
|
2108
2133
|
exists() {
|
|
@@ -2112,6 +2137,11 @@ export class FluentFiltersOrRelationsCondition extends FluentFiltersCondition {
|
|
|
2112
2137
|
/**
|
|
2113
2138
|
* Expects that filtered element does not exist.
|
|
2114
2139
|
*
|
|
2140
|
+
* **Examples:**
|
|
2141
|
+
* ```typescript
|
|
2142
|
+
* await aui.expect().text().withText('Login').notExists().exec()
|
|
2143
|
+
* ```
|
|
2144
|
+
*
|
|
2115
2145
|
* @return {ExecCondition}
|
|
2116
2146
|
*/
|
|
2117
2147
|
notExists() {
|
|
@@ -2127,8 +2157,13 @@ export class FluentCommand extends FluentBase {
|
|
|
2127
2157
|
super(undefined);
|
|
2128
2158
|
}
|
|
2129
2159
|
/**
|
|
2130
|
-
* Expects a condition, e.g., `exists()` or `notExits()
|
|
2131
|
-
*
|
|
2160
|
+
* Expects a condition, e.g., `exists()` or `notExits()`.
|
|
2161
|
+
*
|
|
2162
|
+
* **Examples:**
|
|
2163
|
+
* ```typescript
|
|
2164
|
+
* await aui.expect().text().withText('Login').exists().exec()
|
|
2165
|
+
* await aui.expect().text().withText('Login').notExists().exec()
|
|
2166
|
+
* ```
|
|
2132
2167
|
*
|
|
2133
2168
|
* @return {FluentFiltersCondition}
|
|
2134
2169
|
*/
|
|
@@ -2139,6 +2174,11 @@ export class FluentCommand extends FluentBase {
|
|
|
2139
2174
|
/**
|
|
2140
2175
|
* Clicks on the filtered element.
|
|
2141
2176
|
*
|
|
2177
|
+
* **Example:**
|
|
2178
|
+
* ```typescript
|
|
2179
|
+
* await aui.click().button().withText('Submit').exec()
|
|
2180
|
+
* ```
|
|
2181
|
+
*
|
|
2142
2182
|
* @return {FluentFilters}
|
|
2143
2183
|
*/
|
|
2144
2184
|
click() {
|
|
@@ -2148,6 +2188,11 @@ export class FluentCommand extends FluentBase {
|
|
|
2148
2188
|
/**
|
|
2149
2189
|
* Move mouse over the filtered element.
|
|
2150
2190
|
*
|
|
2191
|
+
* **Example:**
|
|
2192
|
+
* ```typescript
|
|
2193
|
+
* await aui.moveMouseTo().button().withText('Submit').exec()
|
|
2194
|
+
* ```
|
|
2195
|
+
*
|
|
2151
2196
|
* @return {FluentFilters}
|
|
2152
2197
|
*/
|
|
2153
2198
|
moveMouseTo() {
|
|
@@ -2155,7 +2200,16 @@ export class FluentCommand extends FluentBase {
|
|
|
2155
2200
|
return new FluentFilters(this);
|
|
2156
2201
|
}
|
|
2157
2202
|
/**
|
|
2158
|
-
*
|
|
2203
|
+
* Puts the focus on the filtered element and types in the text.
|
|
2204
|
+
*
|
|
2205
|
+
* **Examples:**
|
|
2206
|
+
* ```typescript
|
|
2207
|
+
* await aui.typeIn('Type some text').textfield().exec()
|
|
2208
|
+
*
|
|
2209
|
+
* // mask the text so it is not send to the askui-inference server
|
|
2210
|
+
* await aui.typeIn('Type some text', { isSecret: true, secretMask: '**' }).textfield().exec()
|
|
2211
|
+
* ```
|
|
2212
|
+
* 
|
|
2159
2213
|
*
|
|
2160
2214
|
* @param {string} text - A text to type
|
|
2161
2215
|
*
|
|
@@ -2168,6 +2222,13 @@ export class FluentCommand extends FluentBase {
|
|
|
2168
2222
|
/**
|
|
2169
2223
|
* Moves mouse to the filtered element and scrolls in the x and y direction.
|
|
2170
2224
|
*
|
|
2225
|
+
* **macOS**: May not work as expected!
|
|
2226
|
+
*
|
|
2227
|
+
* **Example:**
|
|
2228
|
+
* ```typescript
|
|
2229
|
+
* await aui.scroll(0, 10).textarea().exec()
|
|
2230
|
+
* ```
|
|
2231
|
+
*
|
|
2171
2232
|
* @param {number} x_offset - A (positive/negative) x direction.
|
|
2172
2233
|
* @param {number} y_offset - A (positive/negative) y direction.
|
|
2173
2234
|
*
|
|
@@ -2179,7 +2240,14 @@ export class FluentCommand extends FluentBase {
|
|
|
2179
2240
|
}
|
|
2180
2241
|
/**
|
|
2181
2242
|
* Moves the mouse relatively to an element in the direction.
|
|
2182
|
-
* This can be used when the mouse should not hover over
|
|
2243
|
+
* This can be used when the mouse should not hover over an element anymore.
|
|
2244
|
+
*
|
|
2245
|
+
* **Examples:**
|
|
2246
|
+
* ```typescript
|
|
2247
|
+
* // Move mouse 30 pixels below button
|
|
2248
|
+
* await aui.moveMouseRelativelyTo(0, 30).button().withText('Submit').exec()
|
|
2249
|
+
* ```
|
|
2250
|
+
* 
|
|
2183
2251
|
*
|
|
2184
2252
|
* @param {number} x_offset - A (positive/negative) x direction.
|
|
2185
2253
|
* @param {number} y_offset - A (positive/negative) y direction.
|
|
@@ -2191,10 +2259,19 @@ export class FluentCommand extends FluentBase {
|
|
|
2191
2259
|
return new FluentFilters(this);
|
|
2192
2260
|
}
|
|
2193
2261
|
/**
|
|
2194
|
-
* Swipe an element in the x and y direction
|
|
2262
|
+
* Swipe an element in the x and y direction.
|
|
2263
|
+
* Holds the left mouse button down on Windows, Linux and macOS and drags the element.
|
|
2264
|
+
* On touch devices it taps the element and then drags it.
|
|
2195
2265
|
*
|
|
2196
|
-
*
|
|
2197
|
-
*
|
|
2266
|
+
* **Example:**
|
|
2267
|
+
* ```typescript
|
|
2268
|
+
* // Swipe the element 500 to the right
|
|
2269
|
+
* await aui.swipe(500, 0).image().exec()
|
|
2270
|
+
* ```
|
|
2271
|
+
* 
|
|
2272
|
+
*
|
|
2273
|
+
* @param {number} x_offset - A x direction. positive and negative values are accepted
|
|
2274
|
+
* @param {number} y_offset - A y direction. positive and negative values are accepted
|
|
2198
2275
|
*
|
|
2199
2276
|
* @return {FluentFilters}
|
|
2200
2277
|
*/
|
|
@@ -2204,6 +2281,14 @@ export class FluentCommand extends FluentBase {
|
|
|
2204
2281
|
}
|
|
2205
2282
|
/**
|
|
2206
2283
|
* Types a text at the current position.
|
|
2284
|
+
* If you need to focus the element first, use typeIn()
|
|
2285
|
+
*
|
|
2286
|
+
* **Examples:**
|
|
2287
|
+
* ```typescript
|
|
2288
|
+
* await aui.type('Type some text').exec()
|
|
2289
|
+
*
|
|
2290
|
+
* // mask the text so it is not send to the askui-inference serverawait aui.type('Type some text', { isSecret: true, secretMask: '**' }).exec()
|
|
2291
|
+
* ```
|
|
2207
2292
|
*
|
|
2208
2293
|
* @param {string} text - A text to type
|
|
2209
2294
|
*
|
|
@@ -2242,6 +2327,14 @@ export class FluentCommand extends FluentBase {
|
|
|
2242
2327
|
*
|
|
2243
2328
|
* **Important**: Mouse must be positioned in a scrollable area.
|
|
2244
2329
|
*
|
|
2330
|
+
* **macOS**: May not work as expected!
|
|
2331
|
+
*
|
|
2332
|
+
* **Example:**
|
|
2333
|
+
* ```typescript
|
|
2334
|
+
* // Scroll 10 up in y direction
|
|
2335
|
+
* await aui.scroll(0, 10).exec()
|
|
2336
|
+
* ```
|
|
2337
|
+
*
|
|
2245
2338
|
* @param {number} x_offset - A (positive/negative) x direction.
|
|
2246
2339
|
* @param {number} y_offset - A (positive/negative) y direction.
|
|
2247
2340
|
*
|
|
@@ -2252,7 +2345,13 @@ export class FluentCommand extends FluentBase {
|
|
|
2252
2345
|
return new Exec(this);
|
|
2253
2346
|
}
|
|
2254
2347
|
/**
|
|
2255
|
-
* Executes a shell command.
|
|
2348
|
+
* Executes a shell command on the device.
|
|
2349
|
+
*
|
|
2350
|
+
* **Example:**
|
|
2351
|
+
* ```typescript
|
|
2352
|
+
* // Open the lastpass app
|
|
2353
|
+
* await aui.execOnShell('monkey -p com.lastpass.authenticator 1').exec()
|
|
2354
|
+
* ```
|
|
2256
2355
|
*
|
|
2257
2356
|
* @param {string} shell_command - A shell command which is executed.
|
|
2258
2357
|
*
|
|
@@ -2317,7 +2416,7 @@ export class FluentCommand extends FluentBase {
|
|
|
2317
2416
|
return new Exec(this);
|
|
2318
2417
|
}
|
|
2319
2418
|
/**
|
|
2320
|
-
* Toggles mouse down.
|
|
2419
|
+
* Toggles mouse down (Left mouse key).
|
|
2321
2420
|
*
|
|
2322
2421
|
* @return {Exec}
|
|
2323
2422
|
*/
|
|
@@ -2326,7 +2425,7 @@ export class FluentCommand extends FluentBase {
|
|
|
2326
2425
|
return new Exec(this);
|
|
2327
2426
|
}
|
|
2328
2427
|
/**
|
|
2329
|
-
* Toggles mouse up.
|
|
2428
|
+
* Toggles mouse up (Left mouse key).
|
|
2330
2429
|
*
|
|
2331
2430
|
* @return {Exec}
|
|
2332
2431
|
*/
|
|
@@ -2993,6 +3092,11 @@ export class FluentFiltersGetter extends FluentBase {
|
|
|
2993
3092
|
/**
|
|
2994
3093
|
* Filters for an UI element 'button'.
|
|
2995
3094
|
*
|
|
3095
|
+
* **Examples:**
|
|
3096
|
+
* ```typescript
|
|
3097
|
+
* await aui.moveMouseTo().button().exec()
|
|
3098
|
+
* ```
|
|
3099
|
+
*
|
|
2996
3100
|
* @return {FluentFiltersOrRelationsGetter}
|
|
2997
3101
|
*/
|
|
2998
3102
|
button() {
|
|
@@ -3066,8 +3170,17 @@ export class FluentFiltersGetter extends FluentBase {
|
|
|
3066
3170
|
* ```typescript
|
|
3067
3171
|
* 'text' === withText('text') => true
|
|
3068
3172
|
* 'test' === withText('text') => true
|
|
3173
|
+
* 'Test' === withText('text') => true
|
|
3174
|
+
* 'Text' === withText('text') => true
|
|
3175
|
+
* 'TEXT' === withText('text') => true
|
|
3176
|
+
* 'texst' === withText('text') => true
|
|
3177
|
+
* 'texts' === withText('text') => true
|
|
3178
|
+
*
|
|
3179
|
+
* // usually false
|
|
3180
|
+
* 'atebxtc' === withText('text') => false
|
|
3069
3181
|
* 'other' === withText('text') => false
|
|
3070
3182
|
* ```
|
|
3183
|
+
* 
|
|
3071
3184
|
*
|
|
3072
3185
|
* @param {string} text - A text to be matched.
|
|
3073
3186
|
*
|
|
@@ -3086,9 +3199,11 @@ export class FluentFiltersGetter extends FluentBase {
|
|
|
3086
3199
|
* 'The rain in Spain' === withTextRegex('\b[Ss]\w+') => true
|
|
3087
3200
|
* 'The rain in Portugal' === withTextRegex('\b[Ss]\w+') => false
|
|
3088
3201
|
* 'The rain in switzerland' === withTextRegex('\b[Ss]\w+') => true
|
|
3202
|
+
*
|
|
3203
|
+
* await aui.get().text().withTextRegex('\b[Ss]\w+').exec()
|
|
3089
3204
|
* ```
|
|
3090
3205
|
*
|
|
3091
|
-
* @param {string} regex_pattern -
|
|
3206
|
+
* @param {string} regex_pattern - A regex pattern
|
|
3092
3207
|
*
|
|
3093
3208
|
* @return {FluentFiltersOrRelationsGetter}
|
|
3094
3209
|
*/
|
|
@@ -3108,6 +3223,8 @@ export class FluentFiltersGetter extends FluentBase {
|
|
|
3108
3223
|
* 'text' === withExactText('text') => true
|
|
3109
3224
|
* 'test' === withExactText('text') => false
|
|
3110
3225
|
* 'other' === withExactText('text') => false
|
|
3226
|
+
*
|
|
3227
|
+
* await aui.moveMouseTo().text().withExactText('Password').exec()
|
|
3111
3228
|
* ```
|
|
3112
3229
|
*
|
|
3113
3230
|
* @param {string} text - A text to be matched.
|
|
@@ -3127,6 +3244,7 @@ export class FluentFiltersGetter extends FluentBase {
|
|
|
3127
3244
|
* 'This is an text' === containsText('other text') => false
|
|
3128
3245
|
* 'This is an text' === containsText('other') => false
|
|
3129
3246
|
* ```
|
|
3247
|
+
* 
|
|
3130
3248
|
*
|
|
3131
3249
|
* @param {string} text - A text to be matched.
|
|
3132
3250
|
*
|
|
@@ -3136,17 +3254,6 @@ export class FluentFiltersGetter extends FluentBase {
|
|
|
3136
3254
|
this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
|
|
3137
3255
|
return new FluentFiltersOrRelationsGetter(this);
|
|
3138
3256
|
}
|
|
3139
|
-
/**
|
|
3140
|
-
* Filters for elements having a specific color.
|
|
3141
|
-
*
|
|
3142
|
-
* @param {COLOR} color - A color to match
|
|
3143
|
-
*
|
|
3144
|
-
* @return {FluentFiltersOrRelationsGetter}
|
|
3145
|
-
*/
|
|
3146
|
-
colored(color) {
|
|
3147
|
-
this._textStr = `with color ${color}`;
|
|
3148
|
-
return new FluentFiltersOrRelationsGetter(this);
|
|
3149
|
-
}
|
|
3150
3257
|
}
|
|
3151
3258
|
// Relations
|
|
3152
3259
|
export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
@@ -3178,7 +3285,6 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3178
3285
|
* DetectedElement {
|
|
3179
3286
|
* name: 'BUTTON',
|
|
3180
3287
|
* text: 'button',
|
|
3181
|
-
* colors: [ 'red', 'black', 'red' ],
|
|
3182
3288
|
* bndbox: BoundingBox {
|
|
3183
3289
|
* xmin: 900,
|
|
3184
3290
|
* ymin: 910,
|
|
@@ -3201,21 +3307,19 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3201
3307
|
* **Examples:**
|
|
3202
3308
|
* ```text
|
|
3203
3309
|
* example scene:
|
|
3204
|
-
*
|
|
3205
|
-
* | icon user
|
|
3206
|
-
*
|
|
3207
|
-
* ```
|
|
3310
|
+
* --------------- ----------------
|
|
3311
|
+
* | icon user | | icon search |
|
|
3312
|
+
* --------------- ---------------n```
|
|
3208
3313
|
* ```typescript
|
|
3209
|
-
* const icons = await aui.get().icon().
|
|
3314
|
+
* const icons = await aui.get().icon().exec();
|
|
3210
3315
|
* console.log(icons);
|
|
3211
3316
|
* ```
|
|
3212
|
-
* Using only the filter
|
|
3317
|
+
* Using only the filter icon, the get command will return both icons
|
|
3213
3318
|
* ```text
|
|
3214
3319
|
* console output: [
|
|
3215
3320
|
* DetectedElement {
|
|
3216
3321
|
* name: 'ICON',
|
|
3217
3322
|
* text: 'user',
|
|
3218
|
-
* colors: [ 'black', 'black', 'black' ],
|
|
3219
3323
|
* bndbox: BoundingBox {
|
|
3220
3324
|
* xmin: 1000,
|
|
3221
3325
|
* ymin: 1010,
|
|
@@ -3225,8 +3329,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3225
3329
|
* },
|
|
3226
3330
|
* DetectedElement {
|
|
3227
3331
|
* name: 'ICON',
|
|
3228
|
-
* text: '
|
|
3229
|
-
* colors: [ 'red', 'red', 'red' ],
|
|
3332
|
+
* text: 'search',
|
|
3230
3333
|
* bndbox: BoundingBox {
|
|
3231
3334
|
* xmin: 900,
|
|
3232
3335
|
* ymin: 910,
|
|
@@ -3238,16 +3341,15 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3238
3341
|
* ```
|
|
3239
3342
|
* You can combine filters with **the `and()` relation** and specify exactly which icon you want
|
|
3240
3343
|
* ```typescript
|
|
3241
|
-
* const icons = await aui.get().icon().
|
|
3344
|
+
* const icons = await aui.get().icon().and().withText('user').exec()
|
|
3242
3345
|
* console.log(icons)
|
|
3243
3346
|
* ```
|
|
3244
|
-
* The get command returns only the
|
|
3347
|
+
* The get command returns only the user icon although both elements are icons
|
|
3245
3348
|
* ```text
|
|
3246
3349
|
* console output: [
|
|
3247
3350
|
* DetectedElement {
|
|
3248
3351
|
* name: 'ICON',
|
|
3249
3352
|
* text: 'user',
|
|
3250
|
-
* colors: [ 'red', 'red', 'red' ],
|
|
3251
3353
|
* bndbox: BoundingBox {
|
|
3252
3354
|
* xmin: 900,
|
|
3253
3355
|
* ymin: 910,
|
|
@@ -3282,6 +3384,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3282
3384
|
* // Returns nothing because innerEl is not inside outerEl
|
|
3283
3385
|
* ...outerEl().in().innerEl()
|
|
3284
3386
|
* ```
|
|
3387
|
+
* 
|
|
3285
3388
|
*
|
|
3286
3389
|
* @return {FluentFiltersGetter}
|
|
3287
3390
|
*/
|
|
@@ -3303,6 +3406,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3303
3406
|
* // Returns no element because leftEl is left of rightEl
|
|
3304
3407
|
* ...leftEl().rightOf().rightEl()
|
|
3305
3408
|
* ```
|
|
3409
|
+
* 
|
|
3306
3410
|
*
|
|
3307
3411
|
* @return {FluentFiltersGetter}
|
|
3308
3412
|
*/
|
|
@@ -3324,6 +3428,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3324
3428
|
* // Returns no element because rightEl is left of leftEl
|
|
3325
3429
|
* ...rightEl().leftOf().leftEl()
|
|
3326
3430
|
* ```
|
|
3431
|
+
* 
|
|
3327
3432
|
*
|
|
3328
3433
|
* @return {FluentFiltersGetter}
|
|
3329
3434
|
*/
|
|
@@ -3348,6 +3453,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3348
3453
|
* // Returns no element because text is above button
|
|
3349
3454
|
* ...text().below().button()
|
|
3350
3455
|
* ```
|
|
3456
|
+
* 
|
|
3351
3457
|
*
|
|
3352
3458
|
* @return {FluentFiltersGetter}
|
|
3353
3459
|
*/
|
|
@@ -3372,6 +3478,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3372
3478
|
* // Returns no element because button is below text
|
|
3373
3479
|
* ...button().above().text()
|
|
3374
3480
|
* ```
|
|
3481
|
+
* 
|
|
3375
3482
|
*
|
|
3376
3483
|
* @return {FluentFiltersGetter}
|
|
3377
3484
|
*/
|
|
@@ -3400,6 +3507,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3400
3507
|
* // Returns button 1 because button 1 is nearer to the text than button 2
|
|
3401
3508
|
* ...button().nearestTo().text()
|
|
3402
3509
|
* ```
|
|
3510
|
+
* 
|
|
3403
3511
|
*
|
|
3404
3512
|
* @return {FluentFiltersGetter}
|
|
3405
3513
|
*/
|
|
@@ -3425,6 +3533,7 @@ export class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
|
3425
3533
|
* // Returns no element because innerEl contains no outerEl
|
|
3426
3534
|
* ...innerEl().contains().outerEl()
|
|
3427
3535
|
* ```
|
|
3536
|
+
* 
|
|
3428
3537
|
*
|
|
3429
3538
|
* @return {FluentFiltersGetter}
|
|
3430
3539
|
*/
|
|
@@ -3448,8 +3557,8 @@ export class Getter extends FluentCommand {
|
|
|
3448
3557
|
* A detected element has the following properties:
|
|
3449
3558
|
* - `name` of the element
|
|
3450
3559
|
* - `text` content of element
|
|
3451
|
-
* - `colors` of element
|
|
3452
3560
|
* - `bndbox`: location of element described with coordinates of a bounding box
|
|
3561
|
+
*
|
|
3453
3562
|
* **Examples:**
|
|
3454
3563
|
* ```typescript
|
|
3455
3564
|
* const text = await aui.get().text().withText('Sign').exec();
|
|
@@ -3460,7 +3569,6 @@ export class Getter extends FluentCommand {
|
|
|
3460
3569
|
* DetectedElement {
|
|
3461
3570
|
* name: 'TEXT',
|
|
3462
3571
|
* text: 'Sign In',
|
|
3463
|
-
* colors: [ 'black', 'gray', 'gray' ],
|
|
3464
3572
|
* bndbox: BoundingBox {
|
|
3465
3573
|
* xmin: 1128.2720982142857,
|
|
3466
3574
|
* ymin: 160.21332310267857,
|
|
@@ -3482,8 +3590,8 @@ export class Getter extends FluentCommand {
|
|
|
3482
3590
|
* A detected element has the following properties:
|
|
3483
3591
|
* - `name` of the element
|
|
3484
3592
|
* - `text` content of element
|
|
3485
|
-
* - `colors` of element
|
|
3486
3593
|
* - `bndbox`: location of element described with coordinates of a bounding box
|
|
3594
|
+
*
|
|
3487
3595
|
* **Examples:**
|
|
3488
3596
|
* ```typescript
|
|
3489
3597
|
* const detectedElements = await aui.getAll().exec();
|
|
@@ -3494,7 +3602,6 @@ export class Getter extends FluentCommand {
|
|
|
3494
3602
|
* DetectedElement {
|
|
3495
3603
|
* name: 'TEXT',
|
|
3496
3604
|
* text: 'Sign In',
|
|
3497
|
-
* colors: [ 'black', 'gray', 'gray' ],
|
|
3498
3605
|
* bndbox: BoundingBox {
|
|
3499
3606
|
* xmin: 1128.2720982142857,
|
|
3500
3607
|
* ymin: 160.21332310267857,
|
|
@@ -3504,7 +3611,6 @@ export class Getter extends FluentCommand {
|
|
|
3504
3611
|
* DetectedElement {
|
|
3505
3612
|
* name: 'ICON',
|
|
3506
3613
|
* text: 'search',
|
|
3507
|
-
* colors: [ 'black', 'red', 'gray' ],
|
|
3508
3614
|
* bndbox: BoundingBox {
|
|
3509
3615
|
* xmin: 250.8204241071428,
|
|
3510
3616
|
* ymin: 300.21332310267857,
|