Forum Discussion

sankar_k's avatar
sankar_k
Occasional Contributor
10 years ago
Solved

Clarification on FindAllChildrenMethod

Hi There I am trying to automate a .net application using Testcomplete.  I am refering one of the frame in the application as follows Set calc = Sys.Process("Client").WinFormsObject("Mai...
  • TanyaYatskovska's avatar
    10 years ago
    Hi Sankar,

     


    The FindAllChildren method searches for an object by its identification properties. For example, you could find the loginGroupWrapper object in the following way:


     




    Dim logCntrl, PropArray, ValuesArray, calc


    Set logCntrl = Sys.Process("Client").WinFormsObject("MainFrame").WinFormsObject("LoginBrowserControl")


     


    PropArray = Array("WndClass", "WndCaption")


    ValuesArray = Array("<Value of WndClass>", "<Value of WndCaption>")


     


    calc = logCntrl.FindAllChildren(PropArray, ValuesArray, 5)


     


    If UBound(calc)>= 0 Then


    ....


    End If