assert_condition
Verify page conditions with hard pass/fail results and actual values. Supports text, element, URL, title, and attribute assertions without screenshots.
Instructions
Assert a condition on the current page and get a hard pass/fail plus the actual value — no screenshot to interpret. Supports text_contains, text_equals, element_exists, element_visible, element_count, url_contains, title_contains, attribute_equals. Returns {passed, actual, expected}. The verification primitive — prefer it over screenshot-squinting.
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 |