Assert text
assert_textVerify that expected text appears on a page or within a selected element within a timeout, returning a pass/fail result with the actual text found.
Instructions
Test assertion: PASS if the text is visible on the page (or inside the element matched by selector) within the timeout, otherwise FAIL (isError) with the text that was actually there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Expected text | |
| exact | No | Require the whole text to match instead of a substring | |
| frame | No | CSS selector of the iframe containing the element (e.g. "iframe[name^=__privateStripeFrame]"), or a list for nested iframes, outermost first. Not needed with aria-ref selectors. | |
| label | No | Name for this check in the test report, e.g. "Login shows welcome message" | |
| timeout | No | Timeout in milliseconds | |
| selector | No | Selector: "aria-ref=e5" from get_page_snapshot (preferred; also reaches into iframes), CSS ("#email", "button.submit"), text ("text=Sign in"), role ("role=button[name=/save/i]") or XPath ("xpath=//a") |