rendercheck

v0.6.0
io.github.ParthibanRajasekaran/rendercheck Checked 4 days ago Published 1 month ago

Check 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.

ParameterTypeDescription
expected *stringThe text a user should be able to read
exactbooleanRequire the region text to equal the expected text
ignore_caseboolean
image_base64stringBase64 PNG or JPEG, if there is no file path
image_pathstringPath to a PNG or JPEG screenshot on this machine
min_confidencenumberOCR confidence, default 80
min_contrast_rationumberWCAG contrast ratio, e.g. 4.5
regionobjectOnly 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.

ParameterTypeDescription
image_base64stringBase64 PNG or JPEG, if there is no file path
image_pathstringPath to a PNG or JPEG screenshot on this machine
regionobjectOnly read this part of the screenshot (pixels from the top-left corner)