It seems we can’t assert text using OCR (correct me if I’m wrong)?
Anyone knows an elegant work-around?
It seems we can’t assert text using OCR (correct me if I’m wrong)?
Anyone knows an elegant work-around?
You can do this already with OCRExtract or ocrextractrelative. So you first scrape the text, then use Assert to check it:
Assert
can only do exact comparisons. If you need more flexibility, use executeScript_Sandbox with one of the many Javascript string comparison options, e. g. includes
OCRExtractRelative is a nice tool, works great.
But with OCRExtract, can it scan the entire webpage to search for a keyword, similar in concept to how SourceSearch works?
So you want to OCR a complete website? If so, only the part that is visible in the browser, or the complete page (including part below the fold)
The complete page, ideally.
What is the reason why you need OCR for it? (just trying to understand the challenge better)
Because if I can take capture the entire webpage and ocr it once, I don’t have to do this same multiple times as I scroll down the page.
Hi, this is an interesting challenge.
Can you attach a screenshot (= _last_screenshot.png result of captureEntirePageScreenshot) of the page you want to OCR? Then we can run a few tests and see if a " OCR the complete page at once" workaround is possible.