Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - What is the difference between gettoproperty and settoproperty?Explain with an example?




247
views
asked marvit August 20, 2014 02:17 AM  

What is the difference between gettoproperty and settoproperty?Explain with an example?


           

1 Answers



 
answered By Dharma   0  
GetTOProperties : Return multiple properties which stores in the “Object Repository”
SetTOProperty: User can change some properties with “SetToProperty”.
When you have multiple object with same type then use SetToProperty to work on the object. There is no need of adding all object to the object repository.
Ex : I have 500 check box on page to provide access right for different modules in my ERP application.Adding 500 objects to the repository is time consuming task and any changes to them also effect the script.
Brower().page().frame().checkbox(“”).SetToProperty “text” ,”PO Creation”
A single object added to the repository and use SetToProperty to (read from xls) or assign the value to the check box and continue with click
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert