Micro Focus QTP (UFT) Forums
please help for no of links - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: please help for no of links (/Thread-please-help-for-no-of-links)



please help for no of links - excellentpawan - 06-14-2013

this code does not give total no of links on some websites like flipkart.com
Code:
Dim des, obrowser, opage,a
Set des = description.Create
des("micclass").value = "Link"

Set obrowser = description.Create
obrowser("micclass").value = "Browser"

Set opage = description.Create
opage("micclass").value = "Page"

set a = browser(obrowser).page(opage).ChildObjects(des)
val = a.count
print "total no of link = "&val

For i=1 to val-1
print a(i).getROProperty("name") & vbnewline
Next



RE: please help for no of links - ssvali - 06-14-2013

Above code is perfectly working.

Can you please confirm what error message you are getting ?


RE: please help for no of links - vinod123 - 06-14-2013

Code:
Set des_obj = Description.Create
des_obj("micclass").value = "Link"
Set link_col = Browser("micclass:=Browser").Page("micclass:=Page").ChildObjects(des_obj)
msgbox link_col.count
Just Check the code which i am sending


RE: please help for no of links - excellentpawan - 06-14-2013

hi ssvali first thanks for your answer i have attached an image please see it.


RE: please help for no of links - Staff - 07-05-2013

Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.