Ask a Question

Can someone please explain me the below FindChild method.


Can someone please explain me the below FindChild method.

Hi can anyone please explain how does this work .


Aliases.PM.PopupWindow.FindChild(Array("ClrClassName","ToolTip"), Array("Button",KeywordTests.ClickButtonOnWindow.Parameters.ButtonName), 50, True)





Community Hero

Hi Ashish,


Something like this:

-- TestComplete checks if  both PM and PopupWindow objects can be found in the tested application's objects tree according to their search criteria defined in the NameMapping (Aliases.PM.PopupWindow). An error is posted to the test log if any of the sought for object is not found;

-- TestComplete gets the keyword test named ClickButtonOnWindow (KeywordTests.ClickButtonOnWindow), gets list of its parameters and gets the value of the ButtonName one (KeywordTests.ClickButtonOnWindow.Parameters.ButtonName);

-- Finally, using the PopupWindow as an initial search root, TestComplete searches down through the list of PopupWindow's child objects and tries to find an object whos "ClrClassName" and "ToolTip" property values are equal to "Button" and the value of the ButtonName parameter correspondingly (.FindChild(Array("ClrClassName","ToolTip"), Array("Button",KeywordTests.ClickButtonOnWindow.Parameters.ButtonName) ... ). Search depth is not more than 50 levels down (.FindChild(..., 50) ). The found object is returned as a search result. An empty stub object that contains the only Exists property set to False is returned if no object is found during the search.


Does this help ?

  /Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.

Thanks Alex

Showing results for 
Search instead for 
Did you mean: