Skip to main content

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.

  • Prefer

    doOcr(byte[]DOM, data)API, →database, Stringor

    extracted

    Readsdocument antext 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

  1. Capture or provide a clean image source with sufficient resolution.
  2. Limit the stringOCR inregion to the smallest area that imagecontains the

    expected
    text.

  3. Normalize extracted

    doOcr(InputStreamtext data)before →comparing Stringit

    with

    Readsexpected anvalues.

  4. Use assertions that tolerate acceptable whitespace or punctuation differences.
  5. Review failures with the original image andattached findsso 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.