Skip to content

Commit

Permalink
Update documentation for null attribute for `assert-document-proper…
Browse files Browse the repository at this point in the history
…ty*` and `assert-window-property*` commands
  • Loading branch information
GuillaumeGomez committed Mar 31, 2023
1 parent aa5f204 commit f32d1f9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions goml-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,13 @@ assert-document-property: ({"URL": "https://some.where", "title": "a title"})
assert-document-property: {"URL": "https://some.where", "title": "a title"}
```

If you want to check that a property doesn't exist, you can use `null`:

```
// Checking that "property-name" doesn't exist.
assert-document-property: {"property-name": null}
```

You can use more specific checks as well by using one of the following identifiers: "CONTAINS", "ENDS_WITH", "STARTS_WITH", or "NEAR".

```
Expand All @@ -357,6 +364,13 @@ assert-document-property-false: ({"URL": "https://some.where", "title": "a title
assert-document-property-false: {"URL": "https://some.where", "title": "a title"}
```

If you want to check that a property does exist, you can use `null`:

```
// Checking that "property-name" does exist.
assert-document-property-false: {"property-name": null}
```

You can use more specific checks as well by using one of the following identifiers: "CONTAINS", "ENDS_WITH",
"STARTS_WITH" or "NEAR".

Expand Down Expand Up @@ -625,6 +639,13 @@ assert-window-property: ({"pageYOffset": "0", "location": "https://some.where"})
assert-window-property: {"pageYOffset": "0", "location": "https://some.where"}
```

If you want to check that a property doesn't exist, you can use `null`:

```
// Checking that "property-name" doesn't exist.
assert-window-property-false: {"property-name": null}
```

You can use more specific checks as well by using one of the following identifiers: "CONTAINS", "ENDS_WITH", "STARTS_WITH", or "NEAR".

```
Expand Down Expand Up @@ -653,6 +674,13 @@ assert-window-property-false: ({"location": "https://some.where", "pageYOffset":
assert-window-property-false: {"location": "https://some.where", "pageYOffset": "10"}
```

If you want to check that a property does exist, you can use `null`:

```
// Checking that "property-name" does exist.
assert-window-property-false: {"property-name": null}
```

You can use more specific checks as well by using one of the following identifiers: "CONTAINS", "ENDS_WITH", "STARTS_WITH" or "NEAR".

```
Expand Down

0 comments on commit f32d1f9

Please sign in to comment.