Micro Focus QTP (UFT) Forums
Objects Count - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions)
+--- Thread: Objects Count (/Thread-Objects-Count)



Objects Count - Sathiya - 09-21-2011

Hi Friends
Kinldy tell me how to get the number of in the object repository?

or number of objects in the applciation?

the following code returns the count.
but i want the names of the objects.(whether they are flex box or panel or text area or button etc)

Code:
Set Links = Browser("Welcome to Global Center").FlexApplication("flashcontent").FlexCanvas("canvas").FlexBox("calendarSearch").ChildObjects
total=Links.Count
msgbox total
For i = 0 to total-1
    a=Links(i).GetROProperty("text")
    If a="" Then
        Exit For
        Else
        msgbox a
    End If

Next

a is null for all values...

Simply say i need the number of buttons,labels,panel,etc in the application or repository
kinldy help in this regard.....


RE: Objects Count - sandya.qtp - 09-22-2011

use obj.tostring