OCR showing different text when recording vs. running it
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022
10:48 AM
11-08-2022
10:48 AM
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?
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022
06:57 AM
11-29-2022
06:57 AM
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;
Log.Message(objText);
var newObjText = aqString.Replace(objText, "*", "");
Log.Message(newObjText);
...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 ]]
