assert_condition
Programmatically assert conditions on a webpage—text, elements, URL, title, or attributes—and get instant pass/fail results without screenshots.
Instructions
Programmatic assertion — check a condition on the page and return pass/fail instantly without needing a screenshot. Supports: text_contains, text_equals, element_exists, element_visible, element_count, url_contains, title_contains, attribute_equals.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expected | No | Expected value (text, count as string, URL substring, attribute value) | |
| selector | No | CSS selector (for element-based assertions) | |
| assertion | Yes | Type of assertion | |
| attribute | No | Attribute name (for attribute_equals) | |
| session_id | Yes | Session ID |