Skip to content

Commit aef56e3

Browse files
Add documentation for property command
1 parent 45fe811 commit aef56e3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

goml-script.md

+19
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ Here's the command list:
134134
* [`pause-on-error`](#pause-on-error)
135135
* [`permissions`](#permissions)
136136
* [`press-key`](#press-key)
137+
* [`property`](#property)
137138
* [`reload`](#reload)
138139
* [`screenshot`](#screenshot)
139140
* [`screenshot-comparison`](#screenshot-comparison)
@@ -1279,6 +1280,24 @@ press-key: 27 // Same but with an integer
12791280
press-key: ('Escape', 1000) // The keyup event will be send after 1000 ms.
12801281
```
12811282

1283+
#### property
1284+
1285+
**property** command allows to update an element's property. Example:
1286+
1287+
```
1288+
property: ("details", "open", "false")
1289+
// Same but with a XPath:
1290+
property: ("//details", "attribute-name", "attribute-value")
1291+
```
1292+
1293+
To set multiple properties at a time, you can use a JSON object:
1294+
1295+
```
1296+
property: ("details", {"open": "false", "another": "x"})
1297+
// Same but with a XPath:
1298+
property: ("//details", {"open": "false", "another": "x"})
1299+
```
1300+
12821301
#### reload
12831302

12841303
**reload** command reloads the current page. Example:

0 commit comments

Comments
 (0)