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

How does you pass optional arguments in qtp?

558


What is expert view and keyword view?

621


What is meant by Output Value in UFT?

556


How to export quicktest professional (qtp) results to an .xls file?

592


What are some test assets and related extensions of qtp?

544






How to test fly out menu in qtp?

514


How to import a test case present in ".xls" file to TD under a Test set?

735


Did QTP prove efficient for your project? Yes or No, explain?

6112


Explain different types of action in qtp?

568


Is qtp supports uni-code?

601


Explain qtp(quick test professional)?

570


What is action?

569


I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible

1440


What is meant by a Check Point in UFT? Also, explain the applicable Check Points.

701


Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain

1452