ghost_assert
Verify UI state by asserting predicates such as text presence, element existence, or value equality. Fails the check when the condition is unmet, providing clear pass/fail validation.
Instructions
Assert a predicate about screen state. Fails (error) if not satisfied. text-present/text-absent: OCR text check. element-exists: element found. value-equals/value-contains: the element's actual value (ValuePattern) equals/contains 'text' - the fill-then-verify check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Element name (element-exists|value-*) | |
| role | No | Element role (element-exists|value-*) | |
| text | No | Text to check (text-present/absent) or expected value (value-equals/contains) | |
| window | No | Title substring of the window to check (anchors it). Omit to use the anchor. text-present/absent then OCR THAT window by handle, never the foreground. | |
| predicate | Yes | ||
| foreground | No | Only without a window/anchor: OCR the foreground window (true) or the whole screen |