Forum Discussion

szhang9300's avatar
szhang9300
New Contributor
11 years ago

Text Recognition and Object Finding


Dear SmartBear Support Team:



 



I am trying to find certain controls on a DevExpress form using its label name as an unique identifier, and then perform some actions on the control afterwards. However I am having a hard time in the object finding part: 



 



The control i am dealing with is a composite one:  an editor box of type DevExpress.XtraEditors added onto a editor row of type DevExpress.XtraVerticalGrid.Rows.EditorRow, where label information is found, As shown in the attached snapshot, object spy will only find the edit box part but not the the bigger one with label ("Note"), which later makes me hard to identify the editor box itself using the label strings. 



 



I tried to use some other static properties to idetifiy the control, however, since there are many similar controls like this one and each of them dont have a unique control name defined in the source code  so it is hard for me to distinguish them except the label text.   



 



Another ideal approach which I also tried is the text recoginition technique as provided in this link: http://support.smartbear.com/viewarticle/56486/   by trying to search for the text in the parent form (a custom WinFormsObject), but it seems like this technique wont recognize any non-window object?  I had the Text Recognition plug-in enabled and also have put the parent form's WndClass value into the Project Property|Open Applications|Text Recognition.  But it still shows no TextObject in the object browser under that parent window. I was wondering if I missed anything? 



 



Any advice in approaching this problem is welcome too! I am using TestComplete 10.



 



Thanks in advance!



 



Jenny



 




  • szhang9300's avatar
    szhang9300
    New Contributor


    Hi Tanya: 



    Thanks for your reply, I have tried the link you provided, I added the ClrFullClassName of the grid that contains all the composite controls, but unfortunately all the child objects still didn't show up in the Object Browser. Any other places that worth a try? 



     



    Besides the approaches I have mentioned, I recently tried out this Optical Character Recognition Technology[/url], which helped me recognized most of the controls on the form, I can simulate a mouse click action by the coordinates found too,  however, the accuracy was still not quite acceptable-- it still got 10% of the controls wrong (sometimes very wrong, for example, it only recognized a "H" from "Holiday Schedule" , I have disabled the font smoothing as suggested and my ORCOptions setting are like below: 



     



      OCROptions["ExactSearch"] = false;



      OCROptions["RecognitionRejection"] = 0.7; 



      OCROptions["SearchAccuracy"] = 1;



      OCROptions.ActiveRecognitionSet = 0



     



    Any suggestion on alternatives in recognizing the texts, or on improving the accuracy of this OCR approach is welcome! :)



     



    Thank you very much!



     



    Regards,



     



    Jenny