Custom Draw Controls
We have a 10 year-old application with several custom draw controls, which I believe were developed in Visual C++.
Test Complete does not recognize them, so we are trying to find a workaround. One of the ideas we have is to develop APIs for our controls and somehow expose them to Test Complete.
We have a tab list that Test Complete does not recognize.
We want to develop an API openTab(tabName).
Has anyone done something like this before?
How can you expose this openTab method of TabList object to Test Complete?
Re: Custom Draw Controls
Though the situation is complex for test automation, there are some approaches you may find useful:
1. Custom window messages.
TestComplete can send window messages from script by using the Win32API.SendMessage function. So, if you implement a number of custom messages that wrap the required functions of the custom controls, you will be able to write scripts that trigger the appropriate functions in your application by sending the appropriate window messages.
2. A COM server in the tested application.
It is possible to work with COM objects from TestComplete's script. So, you can create a COM server in your application and implement a number of service functions that will be accessible for TestComplete's scripts.
3. Using the MSAA functionality.
For a start, try enabling the MSAA feature of TestComplete to check whether the custom controls implement this feature. If they do, TestComplete will be able to recognize more objects in the tested application. If it appears that the controls do not expose their object via MSAA, you can try using the approach described in the "Using MSAA With Windows That Do Not Implement IAccessible" TestComplete help topic.
4. Using the Text Recognition feature.
To learn more about this functionality, go through the "Text Recognition Technology Support" help topic.
I hope this helps.