I started work at a company that is using Visual Test 6.0. I am able to automate about 80% of the screens, but I have run into something that has me puzzled.
The application under test was developed using Visual C++. In the configuration settings the developers are using a CCheckListBox. It does not appear that they have added anything to the application code that will allow me to use a custom control.
Has anyone encountered this and found a work around?
One option is to try using MSAA if the control has an IAccessible interface. You could try operating it using low level key strokes with SendKey e.g. Space to set/unset check.
I have generated a lot of wrapper functions to do this kind of thing in the past, such as operating grid cells etc and it is amazing how easy it is to manipulate them with basic key strokes or accelerator keys.
If you had to identify, in one word, the reason
why the human race has not achieved, and never
will achieve, its full potential that word would be "meetings".
Rong is putting you on the right track. With non standard controls you often have to get creative.
In addition to the MSAA and key commands that Ron suggested I've also found that a lot of custom controls are made up of wrappers around standard controls. I've got several AUT's now with custom controls that I've been able to manipulate by using the GetWindow(hwnd, GW_CHILD)and GetWindow(hwnd, GW_HWNDNEXT) API calls to find the handle of the standard control embedded within the custom control.
Oh, and just on the off chance you haven't tried it (not sure how new to VT you are), you can sometimes manipulate custom controls with standard commands just by setting the class correctly with the WListSetClass or equivalent for whatever type of control the custom control most closely resembles.