I'm testing a program written in Borland C++Builder with Test Complete 6.20. My test scripts are written in Delphi Script. Sometimes the Objects would not be found. I can see the object that cannot be found on a Screenshot in the Log.
I tried to add some Refresh command for the parent object of the object that cannot be found. This seems to have no real effect.
If I make a Breakpoint on Error and look in the Object Browser the Object is listed under his Grandparent. If I selected it, TC refresh the tree and put it in the right place.
Is this a known problem? Is there a work-around available?
to Child_3 it works fine, but if i try to get Child_4 it becomes a non_existed_object because the ObjectTree is not correct.
It looks like this Sys.Process('MYApp').VCLObject('Child_1').VCLObjec t('Child_2').VCLObject('Child_4')
If I try to get Child_4 from the wrong Tree over Child_3.Parent.VCLObject(Child_4) it seems to work, but the Object is invalid.
Now the ObjectTree refresh itself and is now correct at this node. A simple call of obj.Refresh does not work :-(
This is not a timing issue indeed. The problem is likely to occur because the parent of the problematic object is not initialized properly. This can happen if, for example, the object is located under a tab that hasn't been activated yet. Such problems are common for VCL applications.
Solution: activate the parent tab at least once before accessing the object.