Count Links in Webpage

How to count Links in Webpage by using QTP?

Questions by rsbkfamily

Showing Answers 1 - 1 of 1 Answers


  • 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.

Answer Question

Click here to Login / Register your free account

Send   Reset


Related Answered Questions


Related Open Questions