Not able to get text from picture using Object Character Recognition
Hi , I am trying to get the text from a field . But I am not sure what type of window object that application has.
I checked for all the properties and methods in the object browser of that application and I am not able to find out the text in object browser and not sure how that text is rendered in the desktop application.
So I tried to OCR functionality from testcomplete and it grabbed the picture with text but when I provide OCRObj.GetText(OCROptions) I am not able to fetch the text. Please find the javascript code I used below,
Rect = testObj.Picture();
Log.Picture(Rect, "Region with the text to be recognized");
OCRObj = OCR.CreateObject(Rect);
var OCROptions = OCRObj.CreateOptions();
OCROptions.ActiveRecognitionSet = 0;
Log.Message("Found characters:" + OCRObj.GetText(OCROptions));
// in logs the text is not printed only (. `) character is printed. Attached the picture of the text.