You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command scrolls the `<body>` element. If you want to scroll another element, use the [`scroll-element-to`][#scroll-element-to] command instead.
1761
1762
1763
+
#### select-text
1764
+
1765
+
**select-text** command allows to select text. Nothing else. If you want to copy the selected text or something else, you'll another command.
1766
+
1767
+
It takes a tuple of two selectors as argument: the first one is where the text selection should start and the second one is where the selection should end. Example with this HTML code:
1768
+
1769
+
```html
1770
+
<div>
1771
+
<pid="a">hello</p>
1772
+
<pid="b">I'm</p>
1773
+
<pid="c">some</p>
1774
+
<pid="d">html</p>
1775
+
</div>
1776
+
```
1777
+
1778
+
If we only want "I'm some", we use:
1779
+
1780
+
```
1781
+
select-text: ("#b", "#c")
1782
+
```
1783
+
1784
+
If we only want "some", we use:
1785
+
1786
+
```
1787
+
select-text: ("#c", "#c")
1788
+
```
1789
+
1762
1790
#### set-attribute
1763
1791
1764
1792
**set-attribute** command allows to update an element's attribute. Example:
@@ -1775,6 +1803,16 @@ To remove an attribute, you can use the `null` ident:
1775
1803
set-attribute: ("a", {"href": null})
1776
1804
```
1777
1805
1806
+
#### set-clipboard
1807
+
1808
+
**set-clipboard** command allows to set the content of the clipboard. It needs the `clipboard-write` permission. Example:
1809
+
1810
+
```
1811
+
permissions: ["clipboard-write"]
1812
+
set-clipboard: "hello"
1813
+
set-clipboard: 112
1814
+
```
1815
+
1778
1816
#### set-css
1779
1817
1780
1818
**set-css** command allows to update an element's style. Example:
0 commit comments