Ask a Question

OCR showing different text when recording vs. running it

Occasional Contributor

OCR showing different text when recording vs. running it

Currently I'm setting up an OCR check to see if everything I expect in my Edits dropdown shows up. When I record the drop down I use the following text in my OCR check (screenshot 1) and when I run this test it fails and the text is now in a different order and fails (screenshot 1). Any idea why these get different results between recording the test and running it?

Regular Contributor

That is interesting, and I'm not super familiar with OCR so take my advice with a grain of salt. You could try to replace the wildcard before you verify the contents with something like:


var objText = OCRObject.GetText; 
var newObjText = aqString.Replace(objText, "*", "");



...but that doesn't solve for the sorting issue, maybe look [here].


I would also recommend reviewing TestComplete's OCR tips [here] and full OCR guide [here] to see if that gets you anywhere.

[[ kITt: keep IT testing ]]
Showing results for 
Search instead for 
Did you mean: