check_state
Check whether a page element is present, visible, or matches text, or count matching elements. Returns the result immediately without waiting or raising errors.
Instructions
Check the current state of the page or an element.
Unless setting 'count', where it may wait up to 1 second, this never waits.
Never raises exceptions — use wait_for if you want to wait for a state.
For 'count', if there are no matching elements, then it waits up to
1 second for a single match to appear. If no matches after 1 second,
then 'count' returns 0.
Args:
check: 'present', 'visible', 'count', 'text_visible'.
(text_visible requires value for text.)
selector: The CSS Selector for the chosen check.
text: The text to use for the text_visible check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| check | No | visible | |
| selector | No | body |