QTP Object Repository : How to Retreive Child Values from Object Repository of a Parent Object and display Child Objects in Excel.

Public Function FetchAllChildProperties(Root)
'The following function recursively enumerates all the test objects directly under
'a specified parent object. For each test object, the Value is displayed on the excel Sheet.I have commented 'the Message Box , you can uncomment this but i use excel for displaying the value.

    Dim TOCollection, TestObject, PropertiesCollection, Property, Msg

    Set TOCollection = RepositoryFrom.GetChildren(Root)

    For i = 0 To TOCollection.Count - 1

            Set TestObject = TOCollection.Item(i)
            component_name = RepositoryFrom.GetLogicalName(TestObject) & vbNewLine
            start_row = Application.WorksheetFunction.CountA(Range("A:A"))
            Cells(start_row + 1, 1).Value = component_name
            Set PropertiesCollection = TestObject.GetTOProperties()

            For n = 0 To PropertiesCollection.Count - 1
                Set Property = PropertiesCollection.Item(n)
                Cells(start_row + 1, n + 3).Value = Property.Name
                Cells(start_row + 1, n + 4).Value = Property.Value
                'Msg = Msg & Property.Name & "-" & Property.Value & vbNewLine
            'Cells(i + 1, 2).Value = Msg
           ' MsgBox Msg
'i = i + 1

        EnumerateAllChildProperties TestObject


End Function


  1. Thanks for your informative article on UFT automation testing tool. Your post helped me to understand the features and functionality of QTP automation testing tool. QTP training in Chennai

  2. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

  3. Object repository is a collection of object program and priorities with QTP is will be able to recognize UFT object act it.The user record to the test objective properties it will understand the QTP Scripting properties.Selenium Training in Chennai
    Selenium Automation Testing Training in Chennai

  4. Candid institute Spring and Hibernate course provides a comprehensive introduction to Spring and Hibernate open source frameworks as well as Web Services and AJAX. Suitable for both Spring3/Hibernate3 and Spring4/Hibernate4, the course includes coverage of the core Spring and Hibernate capabilities, as well as the integration capabilities provided by Spring.
    spring hibernate training institutes in chennai