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
Is text area check point supports for web applications?
For which type of projects the iterative model is not suitable?
How to create runtime property for an object?
What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?
What environment does qtp run in?
How to record a qtp script ?
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
what is the diff b/w assistive and mandatary rules of object repository in QTP???
How to use debug tools?
Explain the concept of object repository?
How to customize checkpoints with parameters?
What are the views available in qtp?
Have you used xml check point in your project? How?
What is qtpro?
What is qtpro? What is quick test pro?