Assert visible
assert_visibleVerify an element is visible or hidden within a timeout during browser QA tests. Returns PASS or FAIL with a clear verdict, supporting CSS, text, role, and XPath selectors.
Instructions
Test assertion: PASS if the element is visible (or, with visible=false, hidden/absent) within the timeout, otherwise FAIL (isError).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 | |
| visible | No | false asserts the element is hidden or absent | |
| selector | Yes | 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") |