askui 0.3.2 → 0.4.0
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/README.md +6 -12
- package/dist/cjs/core/annotation/annotation-writer.js +2 -4
- package/dist/cjs/core/annotation/annotation.d.ts +3 -4
- package/dist/cjs/core/annotation/annotation.js +5 -4
- package/dist/cjs/core/inference-response/inference-response.d.ts +15 -0
- package/dist/cjs/core/inference-response/inference-response.js +25 -0
- package/dist/cjs/core/model/annotation-result/boundary-box.d.ts +23 -0
- package/dist/cjs/core/model/annotation-result/boundary-box.js +27 -0
- package/dist/cjs/core/model/annotation-result/detected-element.d.ts +9 -3
- package/dist/cjs/core/model/annotation-result/detected-element.js +10 -4
- package/dist/cjs/core/ui-control-commands/control-command.d.ts +1 -1
- package/dist/cjs/core/ui-control-commands/control-command.js +2 -1
- package/dist/cjs/core/ui-control-commands/index.d.ts +1 -0
- package/dist/cjs/core/ui-control-commands/index.js +3 -1
- package/dist/cjs/execution/dsl.d.ts +691 -2
- package/dist/cjs/execution/dsl.js +968 -7
- package/dist/cjs/execution/dsl.spec.js +4 -4
- package/dist/cjs/execution/execution-runtime.d.ts +2 -0
- package/dist/cjs/execution/execution-runtime.js +11 -1
- package/dist/cjs/execution/inference-client.d.ts +3 -0
- package/dist/cjs/execution/inference-client.js +28 -12
- package/dist/cjs/execution/inference-response-error.d.ts +2 -0
- package/dist/cjs/execution/inference-response-error.js +6 -0
- package/dist/cjs/execution/ui-control-client.d.ts +5 -3
- package/dist/cjs/execution/ui-control-client.js +10 -2
- package/dist/cjs/utils/http/http-client-got.js +5 -1
- package/dist/esm/core/annotation/annotation-writer.js +2 -4
- package/dist/esm/core/annotation/annotation.d.ts +3 -4
- package/dist/esm/core/annotation/annotation.js +5 -4
- package/dist/esm/core/inference-response/inference-response.d.ts +15 -0
- package/dist/esm/core/inference-response/inference-response.js +21 -0
- package/dist/esm/core/model/annotation-result/boundary-box.d.ts +23 -0
- package/dist/esm/core/model/annotation-result/boundary-box.js +27 -0
- package/dist/esm/core/model/annotation-result/detected-element.d.ts +9 -3
- package/dist/esm/core/model/annotation-result/detected-element.js +10 -4
- package/dist/esm/core/ui-control-commands/control-command.d.ts +1 -1
- package/dist/esm/core/ui-control-commands/control-command.js +2 -1
- package/dist/esm/core/ui-control-commands/index.d.ts +1 -0
- package/dist/esm/core/ui-control-commands/index.js +1 -0
- package/dist/esm/execution/dsl.d.ts +691 -2
- package/dist/esm/execution/dsl.js +962 -6
- package/dist/esm/execution/dsl.spec.js +4 -4
- package/dist/esm/execution/execution-runtime.d.ts +2 -0
- package/dist/esm/execution/execution-runtime.js +11 -1
- package/dist/esm/execution/inference-client.d.ts +3 -0
- package/dist/esm/execution/inference-client.js +29 -13
- package/dist/esm/execution/inference-response-error.d.ts +2 -0
- package/dist/esm/execution/inference-response-error.js +2 -0
- package/dist/esm/execution/ui-control-client.d.ts +5 -3
- package/dist/esm/execution/ui-control-client.js +11 -3
- package/dist/esm/utils/http/http-client-got.js +5 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomElementJson } from '../core/model/test-case-dto';
|
|
2
|
+
import { DetectedElement } from '../core/model/annotation-result/detected-element';
|
|
2
3
|
export declare enum Separators {
|
|
3
4
|
STRING = "<|string|>"
|
|
4
5
|
}
|
|
@@ -13,7 +14,8 @@ declare abstract class FluentBase {
|
|
|
13
14
|
protected _textStr: string;
|
|
14
15
|
protected _params: Map<string, unknown>;
|
|
15
16
|
protected static addParams(paramsList: Map<string, unknown[]>, params: Map<string, unknown>): Map<string, unknown[]>;
|
|
16
|
-
protected
|
|
17
|
+
protected fluentCommandStringBuilder(currentInstruction?: string, paramsList?: Map<string, unknown[]>): Promise<void>;
|
|
18
|
+
protected getterStringBuilder(currentInstruction?: string, paramsList?: Map<string, unknown[]>): Promise<DetectedElement[]>;
|
|
17
19
|
protected get textStr(): string;
|
|
18
20
|
protected get params(): Map<string, unknown>;
|
|
19
21
|
}
|
|
@@ -1558,6 +1560,693 @@ export declare abstract class FluentCommand extends FluentBase {
|
|
|
1558
1560
|
* @return {Exec}
|
|
1559
1561
|
*/
|
|
1560
1562
|
pressAndroidKey(key: ANDROID_KEY): Exec;
|
|
1561
|
-
abstract
|
|
1563
|
+
abstract fluentCommandExecutor(instruction: string, customElements: CustomElementJson[]): Promise<void>;
|
|
1564
|
+
}
|
|
1565
|
+
export interface ExecutableGetter {
|
|
1566
|
+
exec(): Promise<DetectedElement[]>;
|
|
1567
|
+
}
|
|
1568
|
+
export declare class ExecGetter extends FluentBase implements ExecutableGetter {
|
|
1569
|
+
exec(): Promise<DetectedElement[]>;
|
|
1570
|
+
}
|
|
1571
|
+
export declare class FluentFiltersGetter extends FluentBase {
|
|
1572
|
+
/**
|
|
1573
|
+
* Filters for a UI element 'wizard item active'.
|
|
1574
|
+
*
|
|
1575
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1576
|
+
*/
|
|
1577
|
+
wizardItemActive(): FluentFiltersOrRelationsGetter;
|
|
1578
|
+
/**
|
|
1579
|
+
* Filters for a UI element 'wizard item'.
|
|
1580
|
+
*
|
|
1581
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1582
|
+
*/
|
|
1583
|
+
wizardItem(): FluentFiltersOrRelationsGetter;
|
|
1584
|
+
/**
|
|
1585
|
+
* Filters for a UI element 'wizard'.
|
|
1586
|
+
*
|
|
1587
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1588
|
+
*/
|
|
1589
|
+
wizard(): FluentFiltersOrRelationsGetter;
|
|
1590
|
+
/**
|
|
1591
|
+
* Filters for a UI element 'windows bar'.
|
|
1592
|
+
*
|
|
1593
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1594
|
+
*/
|
|
1595
|
+
windowsBar(): FluentFiltersOrRelationsGetter;
|
|
1596
|
+
/**
|
|
1597
|
+
* Filters for a UI element 'window'.
|
|
1598
|
+
*
|
|
1599
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1600
|
+
*/
|
|
1601
|
+
window(): FluentFiltersOrRelationsGetter;
|
|
1602
|
+
/**
|
|
1603
|
+
* Filters for a UI element 'video'.
|
|
1604
|
+
*
|
|
1605
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1606
|
+
*/
|
|
1607
|
+
video(): FluentFiltersOrRelationsGetter;
|
|
1608
|
+
/**
|
|
1609
|
+
* Filters for a UI element 'url'.
|
|
1610
|
+
*
|
|
1611
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1612
|
+
*/
|
|
1613
|
+
url(): FluentFiltersOrRelationsGetter;
|
|
1614
|
+
/**
|
|
1615
|
+
* Filters for a UI element 'tooltip'.
|
|
1616
|
+
*
|
|
1617
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1618
|
+
*/
|
|
1619
|
+
tooltip(): FluentFiltersOrRelationsGetter;
|
|
1620
|
+
/**
|
|
1621
|
+
* Filters for a UI element 'textfield'.
|
|
1622
|
+
*
|
|
1623
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1624
|
+
*/
|
|
1625
|
+
textfield(): FluentFiltersOrRelationsGetter;
|
|
1626
|
+
/**
|
|
1627
|
+
* Filters for a UI element 'textarea'.
|
|
1628
|
+
*
|
|
1629
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1630
|
+
*/
|
|
1631
|
+
textarea(): FluentFiltersOrRelationsGetter;
|
|
1632
|
+
/**
|
|
1633
|
+
* Filters for a UI element 'table row'.
|
|
1634
|
+
*
|
|
1635
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1636
|
+
*/
|
|
1637
|
+
tableRow(): FluentFiltersOrRelationsGetter;
|
|
1638
|
+
/**
|
|
1639
|
+
* Filters for a UI element 'table header'.
|
|
1640
|
+
*
|
|
1641
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1642
|
+
*/
|
|
1643
|
+
tableHeader(): FluentFiltersOrRelationsGetter;
|
|
1644
|
+
/**
|
|
1645
|
+
* Filters for a UI element 'table column'.
|
|
1646
|
+
*
|
|
1647
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1648
|
+
*/
|
|
1649
|
+
tableColumn(): FluentFiltersOrRelationsGetter;
|
|
1650
|
+
/**
|
|
1651
|
+
* Filters for a UI element 'table'.
|
|
1652
|
+
*
|
|
1653
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1654
|
+
*/
|
|
1655
|
+
table(): FluentFiltersOrRelationsGetter;
|
|
1656
|
+
/**
|
|
1657
|
+
* Filters for a UI element 'tab selected'.
|
|
1658
|
+
*
|
|
1659
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1660
|
+
*/
|
|
1661
|
+
tabSelected(): FluentFiltersOrRelationsGetter;
|
|
1662
|
+
/**
|
|
1663
|
+
* Filters for a UI element 'tab bar'.
|
|
1664
|
+
*
|
|
1665
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1666
|
+
*/
|
|
1667
|
+
tabBar(): FluentFiltersOrRelationsGetter;
|
|
1668
|
+
/**
|
|
1669
|
+
* Filters for a UI element 'tab active'.
|
|
1670
|
+
*
|
|
1671
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1672
|
+
*/
|
|
1673
|
+
tabActive(): FluentFiltersOrRelationsGetter;
|
|
1674
|
+
/**
|
|
1675
|
+
* Filters for a UI element 'tab'.
|
|
1676
|
+
*
|
|
1677
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1678
|
+
*/
|
|
1679
|
+
tab(): FluentFiltersOrRelationsGetter;
|
|
1680
|
+
/**
|
|
1681
|
+
* Filters for a UI element 'switch enabled'.
|
|
1682
|
+
*
|
|
1683
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1684
|
+
*/
|
|
1685
|
+
switchEnabled(): FluentFiltersOrRelationsGetter;
|
|
1686
|
+
/**
|
|
1687
|
+
* Filters for a UI element 'switch disabled'.
|
|
1688
|
+
*
|
|
1689
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1690
|
+
*/
|
|
1691
|
+
switchDisabled(): FluentFiltersOrRelationsGetter;
|
|
1692
|
+
/**
|
|
1693
|
+
* Filters for a UI element 'status bar'.
|
|
1694
|
+
*
|
|
1695
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1696
|
+
*/
|
|
1697
|
+
statusBar(): FluentFiltersOrRelationsGetter;
|
|
1698
|
+
/**
|
|
1699
|
+
* Filters for a UI element 'slider indicator'.
|
|
1700
|
+
*
|
|
1701
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1702
|
+
*/
|
|
1703
|
+
sliderIndicator(): FluentFiltersOrRelationsGetter;
|
|
1704
|
+
/**
|
|
1705
|
+
* Filters for a UI element 'slider'.
|
|
1706
|
+
*
|
|
1707
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1708
|
+
*/
|
|
1709
|
+
slider(): FluentFiltersOrRelationsGetter;
|
|
1710
|
+
/**
|
|
1711
|
+
* Filters for a UI element 'sidebar'.
|
|
1712
|
+
*
|
|
1713
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1714
|
+
*/
|
|
1715
|
+
sidebar(): FluentFiltersOrRelationsGetter;
|
|
1716
|
+
/**
|
|
1717
|
+
* Filters for a UI element 'scroll bar'.
|
|
1718
|
+
*
|
|
1719
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1720
|
+
*/
|
|
1721
|
+
scrollBar(): FluentFiltersOrRelationsGetter;
|
|
1722
|
+
/**
|
|
1723
|
+
* Filters for a UI element 'rect'.
|
|
1724
|
+
*
|
|
1725
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1726
|
+
*/
|
|
1727
|
+
rect(): FluentFiltersOrRelationsGetter;
|
|
1728
|
+
/**
|
|
1729
|
+
* Filters for a UI element 'recaptcha'.
|
|
1730
|
+
*
|
|
1731
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1732
|
+
*/
|
|
1733
|
+
recaptcha(): FluentFiltersOrRelationsGetter;
|
|
1734
|
+
/**
|
|
1735
|
+
* Filters for a UI element 'rate'.
|
|
1736
|
+
*
|
|
1737
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1738
|
+
*/
|
|
1739
|
+
rate(): FluentFiltersOrRelationsGetter;
|
|
1740
|
+
/**
|
|
1741
|
+
* Filters for a UI element 'radio button unselected'.
|
|
1742
|
+
*
|
|
1743
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1744
|
+
*/
|
|
1745
|
+
radioButtonUnselected(): FluentFiltersOrRelationsGetter;
|
|
1746
|
+
/**
|
|
1747
|
+
* Filters for a UI element 'radio button selected'.
|
|
1748
|
+
*
|
|
1749
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1750
|
+
*/
|
|
1751
|
+
radioButtonSelected(): FluentFiltersOrRelationsGetter;
|
|
1752
|
+
/**
|
|
1753
|
+
* Filters for a UI element 'progressbar'.
|
|
1754
|
+
*
|
|
1755
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1756
|
+
*/
|
|
1757
|
+
progressbar(): FluentFiltersOrRelationsGetter;
|
|
1758
|
+
/**
|
|
1759
|
+
* Filters for a UI element 'progress bar'.
|
|
1760
|
+
*
|
|
1761
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1762
|
+
*/
|
|
1763
|
+
progressBar(): FluentFiltersOrRelationsGetter;
|
|
1764
|
+
/**
|
|
1765
|
+
* Filters for a UI element 'popover'.
|
|
1766
|
+
*
|
|
1767
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1768
|
+
*/
|
|
1769
|
+
popover(): FluentFiltersOrRelationsGetter;
|
|
1770
|
+
/**
|
|
1771
|
+
* Filters for a UI element 'pil'.
|
|
1772
|
+
*
|
|
1773
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1774
|
+
*/
|
|
1775
|
+
pil(): FluentFiltersOrRelationsGetter;
|
|
1776
|
+
/**
|
|
1777
|
+
* Filters for a UI element 'password'.
|
|
1778
|
+
*
|
|
1779
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1780
|
+
*/
|
|
1781
|
+
password(): FluentFiltersOrRelationsGetter;
|
|
1782
|
+
/**
|
|
1783
|
+
* Filters for a UI element 'pager'.
|
|
1784
|
+
*
|
|
1785
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1786
|
+
*/
|
|
1787
|
+
pager(): FluentFiltersOrRelationsGetter;
|
|
1788
|
+
/**
|
|
1789
|
+
* Filters for a UI element 'navigation bar'.
|
|
1790
|
+
*
|
|
1791
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1792
|
+
*/
|
|
1793
|
+
navigationBar(): FluentFiltersOrRelationsGetter;
|
|
1794
|
+
/**
|
|
1795
|
+
* Filters for a UI element 'mouse text'.
|
|
1796
|
+
*
|
|
1797
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1798
|
+
*/
|
|
1799
|
+
mouseText(): FluentFiltersOrRelationsGetter;
|
|
1800
|
+
/**
|
|
1801
|
+
* Filters for a UI element 'mouse pointer'.
|
|
1802
|
+
*
|
|
1803
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1804
|
+
*/
|
|
1805
|
+
mousePointer(): FluentFiltersOrRelationsGetter;
|
|
1806
|
+
/**
|
|
1807
|
+
* Filters for a UI element 'mouse cursor'.
|
|
1808
|
+
*
|
|
1809
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1810
|
+
*/
|
|
1811
|
+
mouseCursor(): FluentFiltersOrRelationsGetter;
|
|
1812
|
+
/**
|
|
1813
|
+
* Filters for a UI element 'modal'.
|
|
1814
|
+
*
|
|
1815
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1816
|
+
*/
|
|
1817
|
+
modal(): FluentFiltersOrRelationsGetter;
|
|
1818
|
+
/**
|
|
1819
|
+
* Filters for a UI element 'message box'.
|
|
1820
|
+
*
|
|
1821
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1822
|
+
*/
|
|
1823
|
+
messageBox(): FluentFiltersOrRelationsGetter;
|
|
1824
|
+
/**
|
|
1825
|
+
* Filters for a UI element 'map'.
|
|
1826
|
+
*
|
|
1827
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1828
|
+
*/
|
|
1829
|
+
map(): FluentFiltersOrRelationsGetter;
|
|
1830
|
+
/**
|
|
1831
|
+
* Filters for a UI element 'logo'.
|
|
1832
|
+
*
|
|
1833
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1834
|
+
*/
|
|
1835
|
+
logo(): FluentFiltersOrRelationsGetter;
|
|
1836
|
+
/**
|
|
1837
|
+
* Filters for a UI element 'link'.
|
|
1838
|
+
*
|
|
1839
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1840
|
+
*/
|
|
1841
|
+
link(): FluentFiltersOrRelationsGetter;
|
|
1842
|
+
/**
|
|
1843
|
+
* Filters for a UI element 'keyboard'.
|
|
1844
|
+
*
|
|
1845
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1846
|
+
*/
|
|
1847
|
+
keyboard(): FluentFiltersOrRelationsGetter;
|
|
1848
|
+
/**
|
|
1849
|
+
* Filters for a UI element 'image'.
|
|
1850
|
+
*
|
|
1851
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1852
|
+
*/
|
|
1853
|
+
image(): FluentFiltersOrRelationsGetter;
|
|
1854
|
+
/**
|
|
1855
|
+
* Filters for a UI element 'header'.
|
|
1856
|
+
*
|
|
1857
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1858
|
+
*/
|
|
1859
|
+
header(): FluentFiltersOrRelationsGetter;
|
|
1860
|
+
/**
|
|
1861
|
+
* Filters for a UI element 'footer'.
|
|
1862
|
+
*
|
|
1863
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1864
|
+
*/
|
|
1865
|
+
footer(): FluentFiltersOrRelationsGetter;
|
|
1866
|
+
/**
|
|
1867
|
+
* Filters for a UI element 'flag'.
|
|
1868
|
+
*
|
|
1869
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1870
|
+
*/
|
|
1871
|
+
flag(): FluentFiltersOrRelationsGetter;
|
|
1872
|
+
/**
|
|
1873
|
+
* Filters for a UI element 'dropdown menu'.
|
|
1874
|
+
*
|
|
1875
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1876
|
+
*/
|
|
1877
|
+
dropdownMenu(): FluentFiltersOrRelationsGetter;
|
|
1878
|
+
/**
|
|
1879
|
+
* Filters for a UI element 'divider'.
|
|
1880
|
+
*
|
|
1881
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1882
|
+
*/
|
|
1883
|
+
divider(): FluentFiltersOrRelationsGetter;
|
|
1884
|
+
/**
|
|
1885
|
+
* Filters for a UI element 'circle'.
|
|
1886
|
+
*
|
|
1887
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1888
|
+
*/
|
|
1889
|
+
circle(): FluentFiltersOrRelationsGetter;
|
|
1890
|
+
/**
|
|
1891
|
+
* Filters for a UI element 'checkbox unchecked'.
|
|
1892
|
+
*
|
|
1893
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1894
|
+
*/
|
|
1895
|
+
checkboxUnchecked(): FluentFiltersOrRelationsGetter;
|
|
1896
|
+
/**
|
|
1897
|
+
* Filters for a UI element 'checkbox checked'.
|
|
1898
|
+
*
|
|
1899
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1900
|
+
*/
|
|
1901
|
+
checkboxChecked(): FluentFiltersOrRelationsGetter;
|
|
1902
|
+
/**
|
|
1903
|
+
* Filters for a UI element 'chart pie'.
|
|
1904
|
+
*
|
|
1905
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1906
|
+
*/
|
|
1907
|
+
chartPie(): FluentFiltersOrRelationsGetter;
|
|
1908
|
+
/**
|
|
1909
|
+
* Filters for a UI element 'chart'.
|
|
1910
|
+
*
|
|
1911
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1912
|
+
*/
|
|
1913
|
+
chart(): FluentFiltersOrRelationsGetter;
|
|
1914
|
+
/**
|
|
1915
|
+
* Filters for a UI element 'card'.
|
|
1916
|
+
*
|
|
1917
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1918
|
+
*/
|
|
1919
|
+
card(): FluentFiltersOrRelationsGetter;
|
|
1920
|
+
/**
|
|
1921
|
+
* Filters for a UI element 'browser bar'.
|
|
1922
|
+
*
|
|
1923
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1924
|
+
*/
|
|
1925
|
+
browserBar(): FluentFiltersOrRelationsGetter;
|
|
1926
|
+
/**
|
|
1927
|
+
* Filters for a UI element 'breadcrumb'.
|
|
1928
|
+
*
|
|
1929
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1930
|
+
*/
|
|
1931
|
+
breadcrumb(): FluentFiltersOrRelationsGetter;
|
|
1932
|
+
/**
|
|
1933
|
+
* Filters for a UI element 'banner'.
|
|
1934
|
+
*
|
|
1935
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1936
|
+
*/
|
|
1937
|
+
banner(): FluentFiltersOrRelationsGetter;
|
|
1938
|
+
/**
|
|
1939
|
+
* Filters for a UI element 'badge'.
|
|
1940
|
+
*
|
|
1941
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1942
|
+
*/
|
|
1943
|
+
badge(): FluentFiltersOrRelationsGetter;
|
|
1944
|
+
/**
|
|
1945
|
+
* Filters for a UI element 'alert'.
|
|
1946
|
+
*
|
|
1947
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1948
|
+
*/
|
|
1949
|
+
alert(): FluentFiltersOrRelationsGetter;
|
|
1950
|
+
/**
|
|
1951
|
+
* Filters for a UI element 'unknown'.
|
|
1952
|
+
*
|
|
1953
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1954
|
+
*/
|
|
1955
|
+
unknown(): FluentFiltersOrRelationsGetter;
|
|
1956
|
+
/**
|
|
1957
|
+
* Filters for an UI element 'button'.
|
|
1958
|
+
*
|
|
1959
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1960
|
+
*/
|
|
1961
|
+
button(): FluentFiltersOrRelationsGetter;
|
|
1962
|
+
/**
|
|
1963
|
+
* Filters for an UI element 'text'.
|
|
1964
|
+
*
|
|
1965
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1966
|
+
*/
|
|
1967
|
+
text(): FluentFiltersOrRelationsGetter;
|
|
1968
|
+
/**
|
|
1969
|
+
* Filters for an UI element 'dropdown'.
|
|
1970
|
+
*
|
|
1971
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1972
|
+
*/
|
|
1973
|
+
dropdown(): FluentFiltersOrRelationsGetter;
|
|
1974
|
+
/**
|
|
1975
|
+
* Filters for an UI element 'icon'.
|
|
1976
|
+
*
|
|
1977
|
+
* You can combine it with the 'withText' command to look for a specific icon.
|
|
1978
|
+
*
|
|
1979
|
+
* **Examples:**
|
|
1980
|
+
* ```typescript
|
|
1981
|
+
* icon().withText('plus')
|
|
1982
|
+
* ```
|
|
1983
|
+
*
|
|
1984
|
+
* Note: This is an alpha feature. The prediction of the icon name is sometimes unstable. Use custom elements as an alternative.
|
|
1985
|
+
*
|
|
1986
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1987
|
+
*/
|
|
1988
|
+
icon(): FluentFiltersOrRelationsGetter;
|
|
1989
|
+
/**
|
|
1990
|
+
* Filters for a custom UI element (see {@link CustomElementJson}).
|
|
1991
|
+
*
|
|
1992
|
+
* **Important**: This increases the runtime quite a bit. So
|
|
1993
|
+
* only use it when absolutely necessary.
|
|
1994
|
+
*
|
|
1995
|
+
* @param {CustomElementJson} customElement - The custom element to filter for.
|
|
1996
|
+
*
|
|
1997
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
1998
|
+
*/
|
|
1999
|
+
customElement(customElement: CustomElementJson): FluentFiltersOrRelationsGetter;
|
|
2000
|
+
/**
|
|
2001
|
+
* Filters for a UI element 'checkbox' checked or unchecked.
|
|
2002
|
+
*
|
|
2003
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
2004
|
+
*/
|
|
2005
|
+
checkbox(): FluentFiltersOrRelationsGetter;
|
|
2006
|
+
/**
|
|
2007
|
+
* Filters for similar (doesn't need to be a 100% equal) text.
|
|
2008
|
+
*
|
|
2009
|
+
* **Examples:**
|
|
2010
|
+
* ```typescript
|
|
2011
|
+
* 'text' === withText('text') => true
|
|
2012
|
+
* 'test' === withText('text') => true
|
|
2013
|
+
* 'other' === withText('text') => false
|
|
2014
|
+
* ```
|
|
2015
|
+
*
|
|
2016
|
+
* @param {string} text - A text to be matched.
|
|
2017
|
+
*
|
|
2018
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
2019
|
+
*/
|
|
2020
|
+
withText(text: string): FluentFiltersOrRelationsGetter;
|
|
2021
|
+
/**
|
|
2022
|
+
* Filters for texts, which match the regex pattern.
|
|
2023
|
+
*
|
|
2024
|
+
* **Examples:**
|
|
2025
|
+
*
|
|
2026
|
+
* ```typescript
|
|
2027
|
+
* 'The rain in Spain' === withTextRegex('\b[Ss]\w+') => true
|
|
2028
|
+
* 'The rain in Portugal' === withTextRegex('\b[Ss]\w+') => false
|
|
2029
|
+
* 'The rain in switzerland' === withTextRegex('\b[Ss]\w+') => true
|
|
2030
|
+
* ```
|
|
2031
|
+
*
|
|
2032
|
+
* @param {string} regex_pattern - An regex pattern
|
|
2033
|
+
*
|
|
2034
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
2035
|
+
*/
|
|
2036
|
+
withTextRegex(regex_pattern: string): FluentFiltersOrRelationsGetter;
|
|
2037
|
+
/**
|
|
2038
|
+
* Filters for equal text.
|
|
2039
|
+
*
|
|
2040
|
+
* **Note:** This should be only used in cases where the similarity
|
|
2041
|
+
* comparison of {@link FluentFilters.withText()} allows not for
|
|
2042
|
+
* specific enough filtering (too many elements).
|
|
2043
|
+
*
|
|
2044
|
+
* **Examples:**
|
|
2045
|
+
* ```typescript
|
|
2046
|
+
* 'text' === withExactText('text') => true
|
|
2047
|
+
* 'test' === withExactText('text') => false
|
|
2048
|
+
* 'other' === withExactText('text') => false
|
|
2049
|
+
* ```
|
|
2050
|
+
*
|
|
2051
|
+
* @param {string} text - A text to be matched.
|
|
2052
|
+
*
|
|
2053
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
2054
|
+
*/
|
|
2055
|
+
withExactText(text: string): FluentFiltersOrRelationsGetter;
|
|
2056
|
+
/**
|
|
2057
|
+
* Filters for text containing the text provided as an argument.
|
|
2058
|
+
*
|
|
2059
|
+
* **Examples:**
|
|
2060
|
+
* ```typescript
|
|
2061
|
+
* 'This is an text' === containsText('text') => true
|
|
2062
|
+
* 'This is an text' === containsText('other text') => false
|
|
2063
|
+
* 'This is an text' === containsText('other') => false
|
|
2064
|
+
* ```
|
|
2065
|
+
*
|
|
2066
|
+
* @param {string} text - A text to be matched.
|
|
2067
|
+
*
|
|
2068
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
2069
|
+
*/
|
|
2070
|
+
containsText(text: string): FluentFiltersOrRelationsGetter;
|
|
2071
|
+
/**
|
|
2072
|
+
* Filters for elements having a specific color.
|
|
2073
|
+
*
|
|
2074
|
+
* @param {COLOR} color - A color to match
|
|
2075
|
+
*
|
|
2076
|
+
* @return {FluentFiltersOrRelationsGetter}
|
|
2077
|
+
*/
|
|
2078
|
+
colored(color: COLOR): FluentFiltersOrRelationsGetter;
|
|
2079
|
+
}
|
|
2080
|
+
export declare class FluentFiltersOrRelationsGetter extends FluentFiltersGetter {
|
|
2081
|
+
/**
|
|
2082
|
+
* Filters for an element inside another element.
|
|
2083
|
+
*
|
|
2084
|
+
* **Examples:**
|
|
2085
|
+
* ```typescript
|
|
2086
|
+
* --------------------
|
|
2087
|
+
* | outerEl |
|
|
2088
|
+
* | -------------- |
|
|
2089
|
+
* | | innerEl | |
|
|
2090
|
+
* | -------------- |
|
|
2091
|
+
* | |
|
|
2092
|
+
* --------------------
|
|
2093
|
+
*
|
|
2094
|
+
* // Returns innerEl because innerEl is inside outerEl
|
|
2095
|
+
* ...innerEl().in().outerEl()
|
|
2096
|
+
* // Returns nothing because innerEl is not inside outerEl
|
|
2097
|
+
* ...outerEl().in().innerEl()
|
|
2098
|
+
* ```
|
|
2099
|
+
*
|
|
2100
|
+
* @return {FluentFiltersGetter}
|
|
2101
|
+
*/
|
|
2102
|
+
in(): FluentFiltersGetter;
|
|
2103
|
+
/**
|
|
2104
|
+
* Filters for an element right of another element.
|
|
2105
|
+
*
|
|
2106
|
+
* **Examples:**
|
|
2107
|
+
* ```typescript
|
|
2108
|
+
* -------------- --------------
|
|
2109
|
+
* | leftEl | | rightEl |
|
|
2110
|
+
* -------------- --------------
|
|
2111
|
+
*
|
|
2112
|
+
* // Returns rightEl because rightEl is right of leftEl
|
|
2113
|
+
* ...rightEl().rightOf().leftEl()
|
|
2114
|
+
* // Returns no element because leftEl is left of rightEl
|
|
2115
|
+
* ...leftEl().rightOf().rightEl()
|
|
2116
|
+
* ```
|
|
2117
|
+
*
|
|
2118
|
+
* @return {FluentFiltersGetter}
|
|
2119
|
+
*/
|
|
2120
|
+
rightOf(): FluentFiltersGetter;
|
|
2121
|
+
/**
|
|
2122
|
+
* Filters for an element left of another element.
|
|
2123
|
+
*
|
|
2124
|
+
* **Examples:**
|
|
2125
|
+
* ```typescript
|
|
2126
|
+
* -------------- --------------
|
|
2127
|
+
* | leftEl | | rightEl |
|
|
2128
|
+
* -------------- --------------
|
|
2129
|
+
*
|
|
2130
|
+
* // Returns leftEl because leftEl is left of rightEl
|
|
2131
|
+
* ...leftEl().leftOf().rightEl()
|
|
2132
|
+
* // Returns no element because rightEl is left of leftEl
|
|
2133
|
+
* ...rightEl().leftOf().leftEl()
|
|
2134
|
+
* ```
|
|
2135
|
+
*
|
|
2136
|
+
* @return {FluentFiltersGetter}
|
|
2137
|
+
*/
|
|
2138
|
+
leftOf(): FluentFiltersGetter;
|
|
2139
|
+
/**
|
|
2140
|
+
* Filters for an element below another element.
|
|
2141
|
+
*
|
|
2142
|
+
* **Examples:**
|
|
2143
|
+
* ```typescript
|
|
2144
|
+
* --------------
|
|
2145
|
+
* | text |
|
|
2146
|
+
* --------------
|
|
2147
|
+
* --------------
|
|
2148
|
+
* | button |
|
|
2149
|
+
* --------------
|
|
2150
|
+
*
|
|
2151
|
+
* // Returns button because button is below text
|
|
2152
|
+
* ...button().below().text()
|
|
2153
|
+
* // Returns no element because text is above button
|
|
2154
|
+
* ...text().below().button()
|
|
2155
|
+
* ```
|
|
2156
|
+
*
|
|
2157
|
+
* @return {FluentFiltersGetter}
|
|
2158
|
+
*/
|
|
2159
|
+
below(): FluentFiltersGetter;
|
|
2160
|
+
/**
|
|
2161
|
+
* Filters for an element above another element.
|
|
2162
|
+
*
|
|
2163
|
+
* **Examples:**
|
|
2164
|
+
* ```typescript
|
|
2165
|
+
* --------------
|
|
2166
|
+
* | text |
|
|
2167
|
+
* --------------
|
|
2168
|
+
* --------------
|
|
2169
|
+
* | button |
|
|
2170
|
+
* --------------
|
|
2171
|
+
*
|
|
2172
|
+
* // Returns text because text is above button
|
|
2173
|
+
* ...text().above().button()
|
|
2174
|
+
* // Returns no element because button is below text
|
|
2175
|
+
* ...button().above().text()
|
|
2176
|
+
* ```
|
|
2177
|
+
*
|
|
2178
|
+
* @return {FluentFiltersGetter}
|
|
2179
|
+
*/
|
|
2180
|
+
above(): FluentFiltersGetter;
|
|
2181
|
+
/**
|
|
2182
|
+
* Filters for an element nearest to another element.
|
|
2183
|
+
*
|
|
2184
|
+
* **Examples:**
|
|
2185
|
+
* ```typescript
|
|
2186
|
+
* --------------
|
|
2187
|
+
* | button 1 |
|
|
2188
|
+
* --------------
|
|
2189
|
+
* --------------
|
|
2190
|
+
* | text |
|
|
2191
|
+
* --------------
|
|
2192
|
+
*
|
|
2193
|
+
*
|
|
2194
|
+
*
|
|
2195
|
+
* --------------
|
|
2196
|
+
* | button 2 |
|
|
2197
|
+
* --------------
|
|
2198
|
+
*
|
|
2199
|
+
* // Returns button 1 because button 1 is nearer to the text than button 2
|
|
2200
|
+
* ...button().nearestTo().text()
|
|
2201
|
+
* ```
|
|
2202
|
+
*
|
|
2203
|
+
* @return {FluentFiltersGetter}
|
|
2204
|
+
*/
|
|
2205
|
+
nearestTo(): FluentFiltersGetter;
|
|
2206
|
+
/**
|
|
2207
|
+
* Filters for an element containing another element.
|
|
2208
|
+
*
|
|
2209
|
+
* **Example:**
|
|
2210
|
+
* ```typescript
|
|
2211
|
+
* --------------------
|
|
2212
|
+
* | outerEl |
|
|
2213
|
+
* | -------------- |
|
|
2214
|
+
* | | innerEl | |
|
|
2215
|
+
* | -------------- |
|
|
2216
|
+
* | |
|
|
2217
|
+
* --------------------
|
|
2218
|
+
*
|
|
2219
|
+
* // Returns outerEl because outerEl contains innerEl
|
|
2220
|
+
* ...outerEl().contains().innerEl()
|
|
2221
|
+
* // Returns no element because innerEl contains no outerEl
|
|
2222
|
+
* ...innerEl().contains().outerEl()
|
|
2223
|
+
* ```
|
|
2224
|
+
*
|
|
2225
|
+
* @return {FluentFiltersGetter}
|
|
2226
|
+
*/
|
|
2227
|
+
contains(): FluentFiltersGetter;
|
|
2228
|
+
/**
|
|
2229
|
+
* Returns a list of detected elements
|
|
2230
|
+
*
|
|
2231
|
+
* @return {DetectedElement[]}
|
|
2232
|
+
*/
|
|
2233
|
+
exec(): Promise<DetectedElement[]>;
|
|
2234
|
+
}
|
|
2235
|
+
export declare abstract class Getter extends FluentCommand {
|
|
2236
|
+
/**
|
|
2237
|
+
* Returns the filtered element
|
|
2238
|
+
*
|
|
2239
|
+
* @return {FluentFiltersGetter}
|
|
2240
|
+
*/
|
|
2241
|
+
get(): FluentFiltersGetter;
|
|
2242
|
+
/**
|
|
2243
|
+
* Returns all detected elements
|
|
2244
|
+
*
|
|
2245
|
+
* @return {ExecGetter}
|
|
2246
|
+
*/
|
|
2247
|
+
getAll(): ExecGetter;
|
|
2248
|
+
abstract getterExecutor(instruction: string, customElements: CustomElementJson[]): Promise<DetectedElement[]>;
|
|
2249
|
+
}
|
|
2250
|
+
export declare abstract class ApiCommands extends Getter {
|
|
1562
2251
|
}
|
|
1563
2252
|
export {};
|