ui_assert
ui_assertEvaluates a JavaScript expression against the current page and permanently fails the test session if false, enforcing strict assertions for application claims.
Instructions
Assert a JS expression against the current page. This is a HARD check: if it evaluates false the whole session is marked failed. Use it only for claims about the application under test. To wait for the page to become ready use ui_wait_for, and for a non-fatal observation use ui_check — do not call ui_assert in a retry loop, as the first false result permanently fails the run.
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": {
"condition": "<condition>"
},
"name": "ui_assert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| condition | Yes | JS expression evaluated in the page context | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |