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.
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
- AlexKaras8 years agoCommunity Hero
Hi,
It is really strange that .Net-based control is not recognized at all...
Just to be on the safe side: I am pretty sure that you have ComponentOne Control Support extension installed and enabled in TestComplete (File|Install Extension...), don't you?
And one more thing to check: is the mentioned flex grid control a 'native' control provided by ComponentOne and used 'as is' or was it somehow enchanced by your developers? In the latter case you may talk to them and ask if they are using composite control based on flex grid or redefined some of itsnative classes. If they did, then you may need to properly adjust the relevant settings in your TestComplete project (Object Identification and https://support.smartbear.com/testcomplete/docs/app-testing/desktop/wpf/template-support.html)
P.S.
> sending them the test application (which is 100% not possible)
You may consider to ask SmartBear to sign an NDA if really needed. This is pretty usual practice.