rendercheck
v0.6.0Check from a screenshot that text is really visible to users.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
verify_text Verify text is visible on screen
Check from a screenshot that expected text is really visible to a user (not just in the DOM). Runs local OCR, offline. Returns pass/fail, what was read, confidence and, on failure, the reason (NOT_FOUND, LOW_CONFIDENCE, INSUFFICIENT_CONTRAST) and where on the screenshot. Use it after changing UI to confirm the change rendered.
| Parameter | Type | Description |
|---|---|---|
expected * | string | The text a user should be able to read |
exact | boolean | Require the region text to equal the expected text |
ignore_case | boolean | |
image_base64 | string | Base64 PNG or JPEG, if there is no file path |
image_path | string | Path to a PNG or JPEG screenshot on this machine |
min_confidence | number | OCR confidence, default 80 |
min_contrast_ratio | number | WCAG contrast ratio, e.g. 4.5 |
region | object | Only read this part of the screenshot (pixels from the top-left corner) |
read_text Read the text visible in a screenshot
OCR a screenshot locally and return the text a user would see, line by line with confidence and position. Use it to see what actually rendered when you do not know what to expect.
| Parameter | Type | Description |
|---|---|---|
image_base64 | string | Base64 PNG or JPEG, if there is no file path |
image_path | string | Path to a PNG or JPEG screenshot on this machine |
region | object | Only read this part of the screenshot (pixels from the top-left corner) |