Set TO and RO Property in QTP

January 03, 2009

Most of the time while we do descriptive programming we press Object spy and see the Object Property of the Object under test.There it is found two type of Properties.
1.TO Property
2. RO property
The TO-Test Object and RO-Runtime Object . Test objects are the objects in your test that represent the objects in your website or application. Runtime objects are the objects in your application during the test run.
Generally we follow Test Object Property while designing the test Script (but last time in a .net based project even i used RO Property as well)


Basically i do not understand too much of this.....while doing an r&D on this i found an Blog of Ankur...he described as ...
The Test object properties set is created and maintained by QuickTest.
The Runtime object property set is created and maintained by the object creator (Microsoft for Internet Explorer objects, Netscape for Netscape objects, the product developer for ActiveX objects, etc.).Similarly, Test object methods are methods that QuickTest recognizes and records when they are performed on an object while you are recording a test, and that QuickTest performs when your test runs. Runtime object methods are the methods of the object in your application as defined by the object creator(the developer!). You can access and perform runtime object methods using the Object property.


Ankur,I folow you bliendly since my testing career but pactically speaking I understood half.
(http://mercuryquicktestprofessional.blogspot.com/2006/11/understanding-enigmatic-to-and-ro.html)
The conclusion is while doing Descriptive Programming...try with TO property first ...just give two/three trial run to check if it is running fine.
Else you start working with RO Property.


Let me tell you the test object model:
This is a large set of object types or classes that QTP uses to idenfy in the application.Each test object class having a list of properties that can identify objects of a class and it is having set of methods which are relavant.


Test object is an object that QTP itself creates to represent the original object.
You can link with the above written points of Ankur now.
QTP stores the informations regarding the object to identify and check the object during run session.
A run object is an object that is present on the application on runtime.


Hope this will clear now the TO and RO differences.

You Might Also Like

3 comments

  1. good one....nice post dude

    ReplyDelete
  2. This is all fine,

    How do you change the property or even name of a Test object to identify a run time object. - may be conversion of the test obj to a 'Reg Exp' so it recognizes the run time object.

    Sara

    ReplyDelete
  3. by using SetTOproperty u can change logincal name of test
    object..

    For example..in first build there is a OK button..and u
    reorded on OK button..

    but in modified build it changed to Yes..and this
    modificatio is only for single build...in this situation u
    need to change that button name OK to Yes

    window("XXXX").winbutton("OK").SetTOProperty "Text","Yes"

    like this u can change any property of test object..and
    remember that u can not a property value of Run Time object.

    ReplyDelete