OCR Support in AIQ Workflows
UsingLast reviewed: September 21, 2026
Use OCR requiresonly tesseractwhen installedtext incannot Linuxbe accessed through structured page, API, or Mac.document Seedata. ServiceOCR Suiteis useful for moreimage-based information.validation but should not replace stable selectors or APIs.
Recommended
guidance
- Prefer
extracteddoOcr(byte[]DOM,data)API,→database,StringorReadsdocumentantext when available. - Use OCR for image/PDF/screenshot content that has no structured source.
- Keep tolerances realistic because OCR can vary by image quality and
findsfont.
Validation workflow
- Capture or provide a clean image source with sufficient resolution.
- Limit the
stringOCRinregion to the smallest area thatimagecontains theexpected
text. - Normalize extracted
withdoOcr(InputStreamtextdata)before→comparingStringitReadsexpectedanvalues. - Use assertions that tolerate acceptable whitespace or punctuation differences.
- Review failures with the original image
andattachedfindsso false negatives can be diagnosed.
Note: OCR-based tests can be fragile. Use them as a fallback or targeted validation, not as the stringprimary inlocator that image
strategy.
doHtmlOcr(byte[] data) → HtmlPage
Reads an image and finds text and xy position of the texts
doHtmlOcr(InputStream data) → HtmlPage
Reads an image and finds text and XY position of the texts
Last updated: JulySeptember 03,21, 20232026
If you have any feedback on this topic, please contact us at documentation@appvance.ai.