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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"assertion": "<assertion>"
},
"name": "assert_condition"
}
}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 |