Pages

Saturday, November 27, 2010

Regular Expression which works for any webpage to count total links present on the page

Dim oLink,Links, TotLinks
Set oLink=Description.Create
oLink("micclass").value="Link"
Set Links=Browser("title:=.*").page("title:=.*").ChildObjects(oLink)
TotLinks=Links.count
Reporter.ReportEvent 2,"Res","Total Links are: "&TotLinks

No comments:

Post a Comment