Forum Discussion
Rather than using screen resolution and click co-ordinates, there are other ways of getting this to work better.
1) There's a "Text Recognition" feeature of TestComplete that allows you to identify objects by the text string. (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/improving/using-text-recognition/about.html)
2) There's OCR (https://support.smartbear.com/testcomplete/docs/testing-with/advanced/ocr/index.html)
3) You can also try adding your component to TestComplete by modifying the Object Mapping of your project to include your class of object. (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/improving/mapping.html)
There are several other options available to you as well... I would suggest investigate these as relying on pixel location is, as you've noticed, very unreliable.
- forrestaustin8 years agoContributor
Hi Tristan, thanks for the response. What I meant by not supported by TC is that none of those options (besides optical character recognition worked for my control). I investigated mapping the class to a supported one and tried to use the text recognition method. Neither of them worked. I have not tried optical character recognition, but that sounded like it could have problems with different screens having different resolutions and is why I have refrained from trying.
I would like not to have to rely on pixel clicks, but I can't get the alternative ways to work.
- tristaanogre8 years agoEsteemed Contributor
I'm assuming this is a desktop application? If so, what platform is it written in? And what version of TestComplete are you running? And what is the class name that shows up for that larger component (your big box) when you look for it in Object Spy?
It MIGHT be that there are more native ways of getting to your desired components... or, perhaps, there's some preparation that needs to be done to your application to expose more components.
- forrestaustin8 years agoContributor
It is a desktop application written in .NET (Winforms). I am running TC 12. The control is a third party control called flex grid by componentone. It is essentially just a treeview.
The WndClass is: WindowsForms10.Window.8.app.0.33c0d9d
ClrClassName: AfwExplorerCtl