Count Links in Webpage

How to count Links in Webpage by using QTP?

Questions by rsbkfamily

Showing Answers 1 - 3 of 3 Answers

akothuru

  • Sep 2nd, 2008
 

Code to Count Links in Webpage

Set oDesc = Description.Create()
oDesc("html tag").Value = "A" ' Get a collection of linksSet oLinkCollection = Browser(“name:=test”).Page(“title:=test”).ChildObjects(oDesc)ItemCnt = oLinkCollection.Count-1

      Reporter.ReportEvent micPass, "No of Links in the wabpage: " & ItemCnt, "passed"

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions