Predicate¶
A predicate is used to select one or more element on the page.
name¶
| required | false |
| type | string |
| default | “” |
The name of the predicate. This will be output for reference of the current predicate being run.
Example¶
predicate:
name: "Find element with name 'q'"
type: "by_name"
selector: "q"
multi: true
type¶
| required | false |
| type | string |
| default | “default” |
The type of predicate.
Options¶
| Type | find (default) | multi | first |
|---|---|---|---|
| default | ✓ | ✓ | ✓ |
| by_button | ✓ | ✓ | ✓ |
| by_class | ✓ | ✓ | ✓ |
| by_id | ✓ | ✓ | |
| by_label | ✓ | ✓ | ✓ |
| by_link | ✓ | ✓ | ✓ |
| by_name | ✓ | ✓ | ✓ |
| by_xpath | ✓ | ✓ | ✓ |
| for_appium | ✓ |
Example¶
predicate:
name: "Find element with name 'q'"
type: "by_name"
selector: "q"
multi: true
selector¶
| required | true |
| type | string |
| default | “” |
The selector for finding the element.
Example¶
predicate:
name: "Find element with name 'q'"
type: "by_name"
selector: "q"
multi: true
text¶
| required | type == by_appium |
| type | string |
| default | “” |
The text to select with. Only used for by_appium type.
Example¶
predicate:
type: "for_appium"
selector: ""
text: ""