I am new to Test Complete 6, and I am testing an application developed using Visual Basic 6.0. I am encountering a problem while recording actions on a custom control that my company wrote for our software.
When using the Test Complete recorder the following lines are created (NOTE: w2 is the form object):
Set w1 = w2.Text1
Call w1.Click(20, 11)
When I run the test script, the behavior is not the same as what occurred when recording. I can manually change the above lines to the following and it will work:
call w2.vbobject("atmSingleMeter").Click(32, 10)
Is there any way to make the recorder recognize the custom control name so I don't have to change the script any time I use our control?
TC only has support for standardized controls built in. Custom controls have to be handled differently because TC doesn't have the knowledge.
One of the things you can do is change your obeject mapping. If the Text1 control is an edit box, you can go to your project properties, select object mapping, and add your class into the Edit Box list of classes. TC will then assign your class many of the standard parameters and such typically used by such a control.
This is one way of doing it and there may be others, but this is what has typically worked for us.