Forum Discussion

e_lock's avatar
e_lock
Occasional Contributor
12 years ago

Child Objects won't refresh

Hi there,



I have a property grid which renders all information other than the current control.  I am activating that control, but I don't know the name of it.  I would like to get a handle to it by using findallchildern.  The parent property should only have one child at any one time as all other information is rendered.  I therefore use the FindChildOf keyword test, specifying the property grid as the parent, and some general non specific properties (wndCaption=*, enabled=true) for the child to find.



This works in the first iteration, however, when I move to the next iteration, I activate the second control, but the test fails telling me that the object in question is not invisible and thus cannot be activated, and giving me the wndCaption properites for the first object.   I have not specified these properties anywhere.



I have tried to refresh the object mapping by calling two code snippets, one calling a refresh on the parent object, the other calling a refreshMappingInfo.



What else can I try?
  • e_lock's avatar
    e_lock
    Occasional Contributor
    Ok, so I've just added a small piece of script to return the child count, and it's two on the second iteration.  I think if I could add VisibleOnScreen as one of the properties I'd be fine, but it's only visible as I run it, so TestComplete doesn't let me add it....