Web Page Object
Methods & Properties that we can apply on Page object
------------------------------------
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","www.gcreddy.com"
Wait(10)
Methods & Properties that we can apply on Page object
------------------------------------
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","www.gcreddy.com"
Wait(10)
'Navigate Method:
Browser("CreationTime:=0").Navigate "http://www.google.co.in"
--------------------------------------------------------------------------
'Exist Property
If Browser("title:=Google").Page("url:=http://www.google.co.in").Exist(2) Then
Msgbox "Google page Launched Successfully"
End If
--------------------------------------------------------------------------
'ChildObjects method
Msgbox "Google page Launched Successfully"
End If
--------------------------------------------------------------------------
'ChildObjects method
Set obj = description.Create
Set Objects = Browser("title:=Google").Page("url:=http://www.google.co.in").ChildObjects(obj)
Msgbox Objects.count
--------------------------------------------------------------------------
'CheckProperty method for "title" property of Google Page
Browser("title:=Google").Page("url:=http://www.google.co.in").CheckProperty "title","Google"
--------------------------------------------------------------------------
'GetROProperty method for "openurl" property of Google Page
x =Browser("title:=Google").Page("url:=http://www.google.co.in").GetROProperty ("title")
Msgbox x
--------------------------------------------------------------------------
'GetToProperties method on Google Page
Set Gprops= Browser("title:=Google").Page("url:=http://www.google.co.in").GetTOProperties()
Msgbox Gprops.count
For i=0 to Gprops.Count-1
Gpropsname = Gprops(i).Name
Gpropsvalue = Gprops(i).value
Msgbox Gpropsname & "=" & Gpropsvalue
Next
Set Objects = Browser("title:=Google").Page("url:=http://www.google.co.in").ChildObjects(obj)
Msgbox Objects.count
--------------------------------------------------------------------------
'CheckProperty method for "title" property of Google Page
Browser("title:=Google").Page("url:=http://www.google.co.in").CheckProperty "title","Google"
--------------------------------------------------------------------------
'GetROProperty method for "openurl" property of Google Page
x =Browser("title:=Google").Page("url:=http://www.google.co.in").GetROProperty ("title")
Msgbox x
--------------------------------------------------------------------------
'GetToProperties method on Google Page
Set Gprops= Browser("title:=Google").Page("url:=http://www.google.co.in").GetTOProperties()
Msgbox Gprops.count
For i=0 to Gprops.Count-1
Gpropsname = Gprops(i).Name
Gpropsvalue = Gprops(i).value
Msgbox Gpropsname & "=" & Gpropsvalue
Next
--------------------------------------------------------------------------
'Close method
Browser("title:=Google").Close
'Close method
Browser("title:=Google").Close
0 comments:
Post a Comment