difference between GetRoProperry and GetToProperty.and
where we've to use exactly those properties

Answer Posted / sandeep guttikonda

GetROProperty and GetTOProperty both comes under methods in
QTP.

1) GetROProperty: We can you this method to capture runtime
property value into variable.
OR
We can use this method to capture the object property value
from the application

Code:
For window Application:
Variable = Window("Window Name").Dialog("Dialog
Name").Object("Object Name").GetROProperty("Property Name")

For Web Application:
Variable = Browser("Browser Name").Page("Page Name").Frame
("Frame Name").Object("Object Name").GetROProperty
("Property Name")

Example: To know the whether the push button is enabled or
not during runtime.

Variable = Window("Flight").Dialog("Login").Winbutton
("Start").GetROProperty("Enabled")

Here if the button is Enabled during runtime the Variable
is asgined with "True" else "False".

2) GetTOProperty: We can you this method to capture Test
Object property value into variable.
OR
We can use this method to capture the object property value
from the Object Repository.

Code:
For window Application:
Variable = Window("Window Name").Dialog("Dialog
Name").Object("Object Name").GetTOProperty("Property Name")

For Web Application:
Variable = Browser("Browser Name").Page("Page Name").Frame
("Frame Name").Object("Object Name").GetTOProperty
("Property Name")

Example: To know the value of Push button Enabled propety
from the Object Repository.

Variable = Window("Flight").Dialog("Login").Winbutton
("Start").GetTOProperty("Enabled")

Here it will give the value of the property that is stored
in the object repository.

Please le me know if you need further info.

Thanks.

Regards,
Sandeep Guttikonda.

Is This Answer Correct ?    19 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the differences between table and db checkpoints?

574


Dis advantages of XML checkpoint ?

1579


i'm testing the webpage with QTP, in this wabpage i have to choose the CV from the window, but QTP can't recognize the object, so i used the Low LEvel Recording, but every time i run the test, QTP go to halt when it gets to the Recorded part, any solution for that?( except puting delay in the script and manuall selecting, because i've did that)

1551


What is the qtp testing process?

594


Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points

1625






How can you pass value one action to another action?

553


Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?

1682


What are the challenges u faced in testing with crm domain? How u overcome with?

1483


Who uses qtp tool?

572


I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error

2347


Suppose I created one object as virtual object? That object is applicable to that test? Or all the tests?

562


How can you handle exceptions in qtp?

533


What phases are involved in testing an application in qtp?

558


How you can make an action as re-usable action?

649


Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations

1760