| || |
Why objects have Name property as VBObject(\"xxx\")?
If you look at the Name property of any control in VB application they are named as VBObject("xxx") where xxx is the actual name of control.
Same the Window objects have Name property as Window("xxx").
Why cant the Name property have the PURE name of a component ?
Look at this statement
<font class="small">Code:</font><hr /><pre> parent.VBObject("xxx");
At first glance WHat I can understand is VBObjcet is a member function of a parent, which could retrieve a child of it with the name "xxx".
But when you browse the object you find that the Name of of an object is VBObject("xxx") and NOT xxx.
I think the same is applicable for java applications where we have SwingObject instead of VBObject.
Can anybody explain a logic behind this ?
Re: Why objects have Name property as VBObject(\"xxx\")?
The Name property added by TestComplete is not equal to the object's native Name property. TestComplete uses this additional property to use its own way of addressing objects. In TestComplete 5, you can use the 'Record short names when possible' option to make object names in your script shorter. Let me quote the description of the 'Record short names when possible' option from the 'Recording Options Dialog' help topic of the TestComplete 5 help file:
[ QUOTE ]
Windows and controls of Open Applications are addressed with special methods like WinForms, VBObject, SwingObject, VCLObject and others. TestComplete uses these special methods to avoid possible naming conflicts with properties and methods of parent objects. However, in some rare cases it is possible to name objects of Open Applications without using special methods and by just using their actual name. So, if this option is enabled, when possible, TestComplete will not use special methods to form object names. If the option is disabled, TestComplete uses special methods to address objects of Open Applications.
[/ QUOTE ]
Please let me know if you have any additional questions.