How to count the no of web links in a web page?

How to count the no of web links in a web page?
I used the following script but i am getting zero as output.
plz help me out.

Dim objlink
systemutil.Run"iexplore.exe","www.yahoo.com"

Set objlink=description.Create
objlink("micclass").value="webLink"
Set i=desktop.ChildObjects(objlink)
msgbox i.count

thanks in advance

Questions by kishchilukuri   answers by kishchilukuri

Showing Answers 1 - 18 of 18 Answers

kumar2309

  • Apr 15th, 2008
 

Check its working
Set objLink=description.Create
objLink("micclass").value="Link"
Set webLink=Desktop.ChildObjects(objLink)
linkCount = webLink.count
msgbox linkCount

  Was this answer useful?  Yes

goldvels

  • Apr 18th, 2008
 

Eg:

set objLnks = Br("...").Page("...").Object.GetElementsByTagName("A")

                                                                               'get the collections of links


msgbox objlnks.length                        '\ It will display the total no.of links in that page

  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