GetTOProperty
The GetTOProperty returns the value of the property from the test object's description, i.e., the value used by QTP to identify the object. It returns the value of a property for a test object which QTP recorded to identify during the recording (run time).
The GetTOProperty command will retrieve the value as it was originally recorded (or created via DP). It does not matter if the corresponding runtime object exists, or if that value was updated in "the real world" since the object was recorded.
SetTOProperty
The SetTOProperty changes the value of a test object property. Changing the property doesn't affect the OR or Active Screen, but just the way QTP identifies the object during runtime. Actually, this changes the properties of the temporary copy of the object stored in RAM by QTP.
Any changes you make using the SetTOProperty method apply only during the course of the run session, and do not affect the values stored in the test object repository.
Summary :
-> Using GetToProperty you can retrieve the value of a property of Test Object
-> Using SetToProperty you can change the property value of a Test Object
-> You can consider using GetToProperty and SetToProperty when your test script has multiple lines of codes and your environment is sporadic. Suppose the Environment is changing or OS is changing continuously , then we can use these properties in out script to get the system information.
The GetTOProperty returns the value of the property from the test object's description, i.e., the value used by QTP to identify the object. It returns the value of a property for a test object which QTP recorded to identify during the recording (run time).
The GetTOProperty command will retrieve the value as it was originally recorded (or created via DP). It does not matter if the corresponding runtime object exists, or if that value was updated in "the real world" since the object was recorded.
SetTOProperty
The SetTOProperty changes the value of a test object property. Changing the property doesn't affect the OR or Active Screen, but just the way QTP identifies the object during runtime. Actually, this changes the properties of the temporary copy of the object stored in RAM by QTP.
Any changes you make using the SetTOProperty method apply only during the course of the run session, and do not affect the values stored in the test object repository.
Summary :
-> Using GetToProperty you can retrieve the value of a property of Test Object
-> Using SetToProperty you can change the property value of a Test Object
-> You can consider using GetToProperty and SetToProperty when your test script has multiple lines of codes and your environment is sporadic. Suppose the Environment is changing or OS is changing continuously , then we can use these properties in out script to get the system information.
No comments:
Post a Comment