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
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.
what difference between runtime object and text object and what property they have. whether they have same properties or different properties.
Where to use Property Let, Property Get, Property Set in UFT
Where we can use the synchronization?
How to add synchronisation points in qtp?
what r the main attributes of test automation?
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?
why you have standardized functions? plzzz guys with real time exp. do answer
How does you pass optional arguments in qtp?
How to call a test from another test?
if mandatory and Assitive propertys are shows same how will u write skript in QTP window
How to use debug tools?
what is stepin & stepout?
How do you do batch testing in wr & is it possible to do in qtp, if so explain?
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.