Skip to content

Commit

Permalink
Add documentation for wait-for-document-property-false and `wait-fo…
Browse files Browse the repository at this point in the history
…r-window-property-false` commands
  • Loading branch information
GuillaumeGomez committed Sep 26, 2024
1 parent cb9f3a8 commit d83d59a
Showing 1 changed file with 58 additions and 2 deletions.
60 changes: 58 additions & 2 deletions goml-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,14 @@ Here's the command list:
* [`wait-for-css`](#wait-for-css)
* [`wait-for-css-false`](#wait-for-css-false)
* [`wait-for-document-property`](#wait-for-document-property)
* [`wait-for-document-property-false`](#wait-for-document-property-false)
* [`wait-for-local-storage`](#wait-for-local-storage)
* [`wait-for-position`](#wait-for-position)
* [`wait-for-property`](#wait-for-property)
* [`wait-for-text`](#wait-for-text)
* [`wait-for-size`](#wait-for-size)
* [`wait-for-window-property`](#wait-for-window-property)
* [`wait-for-window-property-false`](#wait-for-window-property-false)
* [`write`](#write)
* [`write-into`](#write-into)

Expand Down Expand Up @@ -2053,7 +2055,7 @@ wait-for-document-property: {"key": "value", "key2": "value2"}
wait-for-document-property: {"key"."sub-key": "value"}
```

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

Examples:

Expand All @@ -2062,6 +2064,33 @@ wait-for-document-property: ({"key": "value"}, ENDS_WITH)
wait-for-document-property: ({"key": "value", "key2": "value2"}, [ENDS_WITH, STARTS_WITH])
```

If you want to wait for at least one of the properties to not have the expected value, take a look at [`wait-for-document-property-false`](#wait-for-document-property-false).

#### wait-for-document-property-false

**wait-for-document-property-false** command waits for at least one of the document objects properties to not have the expected values. It'll wait up to 30 seconds by default before failing (can be changed with the [`timeout`](#timeout) command).

Examples:

```
wait-for-document-property-false: {"key": "value"}
wait-for-document-property-false: {"key": "value", "key2": "value2"}
// You can also use object-paths:
wait-for-document-property-false: {"key"."sub-key": "value"}
```

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

Examples:

```
wait-for-document-property-false: ({"key": "value"}, ENDS_WITH)
wait-for-document-property-false: ({"key": "value", "key2": "value2"}, [ENDS_WITH, STARTS_WITH])
```

If you want to wait for all properties to have the expected value, take a look at [`wait-for-document-property`](#wait-for-document-property).

#### wait-for-local-storage

**wait-for-local-storage** command waits for the local storage keys to have the expected values. It'll wait up to 30 seconds by default before failing (can be changed with the [`timeout`](#timeout) command).
Expand Down Expand Up @@ -2192,7 +2221,7 @@ wait-for-window-property: {"key": "value", "key2": "value2"}
wait-for-window-property: {"key"."sub-key": "value"}
```

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

Examples:

Expand All @@ -2201,6 +2230,33 @@ wait-for-window-property: ({"key": "value"}, ENDS_WITH)
wait-for-window-property: ({"key": "value", "key2": "value2"}, [ENDS_WITH, STARTS_WITH])
```

If you want to wait for at least one of the properties to not have the expected value, take a look at [`wait-for-window-property-false`](#wait-for-window-property-false).

#### wait-for-window-property-false

**wait-for-window-property-false** command waits for at least one of the window objects properties to not have the expected values. It'll wait up to 30 seconds by default before failing (can be changed with the [`timeout`](#timeout) command).

Examples:

```
wait-for-window-property-false: {"key": "value"}
wait-for-window-property-false: {"key": "value", "key2": "value2"}
// You can also use object-paths:
wait-for-window-property-false: {"key"."sub-key": "value"}
```

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

Examples:

```
wait-for-window-property-false: ({"key": "value"}, ENDS_WITH)
wait-for-window-property-false: ({"key": "value", "key2": "value2"}, [ENDS_WITH, STARTS_WITH])
```

If you want to wait for all properties to have the expected value, take a look at [`wait-for-window-property`](#wait-for-window-property).

#### write

**write** command sends keyboard inputs on the currently focused element. Examples:
Expand Down

0 comments on commit d83d59a

Please sign in to comment.