Skip to content

Commit

Permalink
Add documentation for property command
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 31, 2023
1 parent 45fe811 commit aef56e3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions goml-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ Here's the command list:
* [`pause-on-error`](#pause-on-error)
* [`permissions`](#permissions)
* [`press-key`](#press-key)
* [`property`](#property)
* [`reload`](#reload)
* [`screenshot`](#screenshot)
* [`screenshot-comparison`](#screenshot-comparison)
Expand Down Expand Up @@ -1279,6 +1280,24 @@ press-key: 27 // Same but with an integer
press-key: ('Escape', 1000) // The keyup event will be send after 1000 ms.
```

#### property

**property** command allows to update an element's property. Example:

```
property: ("details", "open", "false")
// Same but with a XPath:
property: ("//details", "attribute-name", "attribute-value")
```

To set multiple properties at a time, you can use a JSON object:

```
property: ("details", {"open": "false", "another": "x"})
// Same but with a XPath:
property: ("//details", {"open": "false", "another": "x"})
```

#### reload

**reload** command reloads the current page. Example:
Expand Down

0 comments on commit aef56e3

Please sign in to comment.