Wednesday, July 28, 2010

Sample code by using both Object Repository and Descriptive

systemutil.Run "iexplore", "www.google.com"

'* Using Descriptive Programming
msgbox Browser("Creationtime:=0").GetROProperty("name")

Dim des
Set des=description.Create()
des("micclass").value="Link"

Set val = Browser("Creationtime:=0").page("index:=0").ChildObjects(des)

For i=0 to val.count-1
res = val(i).getroproperty("name")
print res
If (res = "Sign in") Then
Browser("Creationtime:=0").page("index:=0").Link("name:="&res).Click
Exit For
End If
Next



'* Using Object Repository
Browser("Google").Page("Google").Link("Sign in").Click

No comments:

There was an error in this gadget