assert_text
Check that specified text exists in a given element on a webpage, ignoring surrounding whitespace, within a configurable timeout. Defaults to the full page and throws an error if not found.
Instructions
Assert that the text substring appears within the given element
(with the matching selector) in the given timeout (seconds),
with leading and trailing whitespace automatically ignored.
If no selector given, then it defaults to "html" (CSS selector).
If no timeout given (0 or None), then SeleniumBase uses 7 seconds.
Raises an exception if the element isn't found or assertion fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| timeout | No | ||
| selector | No | html |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |