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
Copy file name to clipboardExpand all lines: goml-script.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,7 @@ Here's the command list:
115
115
*[`css`](#css)
116
116
*[`debug`](#debug)
117
117
*[`define-function`](#define-function)
118
+
*[`device-pixel-ratio`](#device-pixel-ratio)
118
119
*[`drag-and-drop`](#drag-and-drop)
119
120
*[`emulate`](#emulate)
120
121
*[`fail`](#fail)
@@ -959,6 +960,23 @@ So in this case, here is what will happen:
959
960
6.`assert-attribute` is called.
960
961
7.`assert-position` is called.
961
962
963
+
#### device-pixel-ratio
964
+
965
+
**device-pixel-ratio** commands allows you to change the device scale factor. You can find more information about it [here](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio). It expected a positive non-null number (can be a float). Example:
966
+
967
+
```
968
+
device-pixel-ratio: 1 // the default value
969
+
device-pixel-ratio: 0.5
970
+
```
971
+
972
+
You can check its value like this:
973
+
974
+
```
975
+
// We use `STARTS_WITH` because otherwise the check would very likely fail
**drag-and-drop** command allows to move an element to another place (assuming it implements the necessary JS and is draggable). It expects a tuple of two elements. Each element can be a position or a CSS selector or an XPath. Example:
0 commit comments