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
How to remove associated function library?
write script for bitmap image?
In qtp, how you can get the last character from a string?
Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.
Does QTP record on Objects created on XWindows Environment?
what is object and child object.. explain ..if possible give some example for better understanding ..
In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer
What is the extension of the qtp local repository? If it is .mtr then what is .bdb extension stands for?
What is the differences between image check point and bit map check point?
Does quicktest professional (qtp) is unicode compatible?
can test automation improve test effectiveness?
In the website, the protocol has been changed http: to https what you will do? Tell me your approach?
Explain types of output values?
How to customize qtp?
When to use shared and local object repository?