Wednesday, February 25, 2009

Find the Links Count in a Web Page

Hi All,
Here i am posting a User defined function for finding number of objects of required object Type/Class in a Google Web Page (i.e Link,Image,Web button,Web Edit...So on So forth)










'*********************************************
' Function Defination :
'*********************************************
Function objects_count_in_Page(Req_obj)
Dim obj
Set obj=Description.Create
obj("micclass").Value=Req_obj
Set x=Browser("Google").Page("Google").ChildObjects(obj)
Req_obj_count= x.count()
msgbox Req_obj&"s"&" in WebPage : "&Req_obj_count
End Function
'*********************************************
Function Declarations/Function Calls of above Function:
'*********************************************
Call objects_count_in_Page("Link")
Call objects_count_in_Page("WebButton") :
Call objects_count_in_Page("WebEdit")
Output will be :




No comments:

Post a Comment