Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to get all the objects count and objects names in webpage using QTP ?




273
views
asked marvit August 20, 2014 12:29 AM  

How to get all the objects count and objects names in webpage using QTP ?


           

1 Answers



 
answered By Dharma   0  
Using this Script we can get all the objects counts
Dim a(100)

set p=Browser("Home").Page("Home").ChildObjects
cnt=0
For i=0 to p.count-1
b=p(i).GetTOProperty("micclass")
If i<1 Then
a(0)=b
Else
For j=0 to Ubound(a)-1
If a(j)<>b Then
cnt=cnt+1
a(cnt)=b
End If
Next
End If
Next 


flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert