--> Working with Predefined Objects and Methods

Methods common to various objects:
GetROProperty:
This method is used to get any one standard property or physical property of the GUI object.
Eg: Dialog(“login”).Winbutton(“OK”).GetROProperty(“Enabled”)
Note: To insert standard checkpoint we can use this method
ExpVal = False
ActVal = Dialog (“login”).win button (“ok”).GetRoProperty (“Enabled”)
Msgbox ActVal
If ExpVal = ActVal then
Msgbox ”Pass”
Else
Msgbox ”Fail”
End If

GetTOProperties:
This method is used to get the property value of a test object (An object learned by QTP and available in OR).

Difference between GetROProperty and GetTOProperty
GetROProperty is used to get any standard property, physical property of the Run Object (Object against which the script is expected to playback).
Where as GetTOProperty can get a property value of a test object (Object in Object Repository)
Note: Control space will give you all keywords

GetTOProperties:
This method is used to get all the properties of the Test Object.
Set Props = Vbwindow (“customer name”).GetTOProperties
PropsCnt = Props.Count( )
Msgbox PropsCnt
For i = 0 to PropsCnt-1
PropsName = props(i).Name
PropsVal = Props(i).Value
Msgbox PropsName & “=” & PropsVal
Next