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

Answer Posted / noor

GetToProperty: Returns the value of a specified property
from the test object description.
Syntax: object.GetTOProperty (Property)
Example:
Sub GetTOProperty_Example()
'The following example uses the GetTOProperty method to
retrieve the
'RegExpWndClass property from the Object Repository.
Dim ObjectName
RegExpWndClass = Window("Test").GetTOProperty
("RegExpWndClass")
End Sub

SetToProperty: Sets the value of the specified property in
its test object description.
Syntax: object.SetTOProperty Property, Val
Example:
Sub SetTOProperty_Example()
'The following example uses the SetTOProperty method to set
the
'index of a window's description.
Window("Test").SetTOProperty "Index", 2
End Sub

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also

1869


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.

1727


What is the script for database check point, bitmapchek point, regular expression ?

1555


Discuss quicktest professional environment?

590


how will load the object during runtime?

1586






How to customize checkpoints with parameters?

3020


How will you check a web application for broken links using qtp?

554


Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work

1444


Limitations in QTP?

1746


How to find the path of folder in which the test is saved in qtp?

534


i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer

3497


If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?

4697


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

1701


Hi All, I need code for how to execute qtp scripts from excell sheet

1465


What is the difference between the design-time and run-time data tables?

560