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

I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1713


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1699


Where to use Property Let, Property Get, Property Set in UFT

364


Where we can use the synchronization?

564


How to add synchronisation points in qtp?

571






what r the main attributes of test automation?

1467


I have created 3 actions in test action1, action2, action3 but I want run action 1,action 3,action2 how can you change in the actions in keyword view?

600


why you have standardized functions? plzzz guys with real time exp. do answer

1425


How does you pass optional arguments in qtp?

554


How to call a test from another test?

671


if mandatory and Assitive propertys are shows same how will u write skript in QTP window

1613


How to use debug tools?

2186


what is stepin & stepout?

1409


How do you do batch testing in wr & is it possible to do in qtp, if so explain?

610


I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.

1294