wait_for
Wait for an element or text to reach a specified state (present, visible, not visible, or absent) within a configurable timeout, raising an exception if the condition isn't met before proceeding.
Instructions
Wait for an element or text to reach a given state before returning.
If no timeout given (0 or None), then SeleniumBase uses 7 seconds.
Raises an exception if the state isn't reached within the timeout.
Args:
state: 'present', 'visible', 'not_visible', or 'absent' — describes
what selector should reach. Ignored if text is given.
selector: Element to wait on.
Defaults to 'body' when waiting on text.
text: If given, waits for this text to appear within selector
instead of waiting on the element's presence/visibility.
timeout: Seconds to wait.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| state | No | visible | |
| timeout | No | ||
| selector | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |