Wednesday, April 20, 2011

QTP GetTOProperties for Page Object

Set Pg=Browser("Login").Page("Login")
MsgBox typename(Pg)
Set toPg=Pg.GetTOProperties()

'Dim i,icount
icount=toPg.Count-1

For i=0 to iCount
     sName=toPg(i).Name
     sValue=toPg(i).Value
 Reporter.ReportEvent micPass,"Property:=" & sName & " Value :="&sValue,""
Next

No comments:

Post a Comment

Please add value. Sharing is caring