Explain GetRoProperty and GetTOProperty & SetTOProperty?

Answer

GetRoProperty

  • GetRoProperty - is an in-built method used to retrieve runtime value of an object property.
  • There are 4 steps involved in using the GetRoProperty
  • Step 1)  Record the Object on which you want to use the GetRoProperty in Object Repository
  • Step 2) For the recorded object identify the run-time property which could be used. You may use Object Spy.
  • Step 3) Use GetRoProperty method to retrieve the identified Run-time property and store the value in a variable
  • Step 4) Use this value for further deductions

SetToProperty & GetToProperty

  • Consider a Web Button stored in the Object Repository
  • When the test is run QTP creates a copy of this object  called Test Object and compares it with the Run Time Object
  • 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
  • When the test is completed, this test object is discarded and so are any modifications you made in the object properties using the SetToProperty
  • When the test is re-run, a new copy of the test object is created with original property values stored in the object repository
  • You can consider using GetToProperty and SetToProperty when your test script has multiple lines of codes and your environment is sporadic
  • For a note ,there is no SetRoProperty

All qtp Questions

Ask your interview questions on qtp

Write Your comment or Questions if you want the answers on qtp from qtp Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---