9. What is the difference between SetToProperty and GetToProperty in qtp?

You can modify the properties of the temporary version of the object during the run session without affecting the permanent values in the object repository by adding a SetTOProperty statement in the Keyword View, Expert View, or in a user-defined function.

Use the following syntax for the SetTOProperty method:

Object(description).SetTOProperty Property, Value

Returns the value of a specified property for a test object. The value is taken from the Object Repository.

Note: You can use the GetTOProperty method to retrieve the values of only those properties that are included in the test object description. Specifying a property that is not included in the test object's description results in a warning status for the step and the test

Example to get the property value is:

Dim ObjectName

ObjectName = Browser("Demo of Vo Object").Page("Demo of Vo Object").ActiveX("VoDemoFormX").VirtualButton("button").GetTOProperty("Name")