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

Answers were Sorted based on User's Feedback



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

Answer / dhananjay vemuri

gettoproperty are the standard testobjectproperties that do
not chamnge during run time...In short Property whose value
is retrieved from the object description.
ObjectCount = Browser("Demo of Vo Object").Page("Demo of Vo
Object").ActiveX("VoDemoFormX").DROPDOWN
("FLIGHTS").GetTOProperty("itemscount")

SETOPROPERTY - Modifying Test Object Properties During a
Run Session

CHANGING THE NAME
Browser("Demo of Vo Object").Page("Demo of Vo
Object").ActiveX("VoDemoFormX").VirtualButton
("button").SetTOProperty "Name", 0

Is This Answer Correct ?    14 Yes 0 No

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

Answer / brinda

GetToProperty:
eg: a=window("Flight Reservation").WinRadioButton
("Business").GetToProperty("checked")
msgbox a

SetTOProperty:
Suppose in first build, it was "OK" button and now in the
modified buit it is "Yes" button.
you need to change the button name.
window("-----").WinButton("OK").SetTOProperty "Text", "Yes"

This will change the button name to "Yes".

Hope this helps....

Is This Answer Correct ?    6 Yes 0 No

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

Answer / siva reddy (us)

'The following example uses the GetTOProperties method to
retrieve
'the collection of properties and values used to identify
the Calendar
'ActiveX object.

Set col = Browser("Flight").Page("Flight").ActiveX
("Calendar").GetTOProperties()

setTOproperty:
You can modify the properties of the temporary version of
the object during the run session without affecting the
permanent values in the object repository by adding a
SetTOProperty statement in the Expert View.

Use the following syntax for the SetTOProperty method:

Object(description).SetTOProperty Property, Value

Is This Answer Correct ?    5 Yes 1 No

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

Answer / 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

More QTP Interview Questions

What is the virtual object?

0 Answers  


How do I modify a value of an elemnt which is not the first one in xml file? My sample XML file is like: <Environment> <Variable> <Name>Name</Name> <Value>Uday Kumar</Value> </Variable> <Variable> <Name>Designation</Name> <Value>Senior Software Engineer</Value> </Variable> </Environment> for example, I'd like to change the value 'Senior Software Engineer' to 'Student' in the second element. How do I do it in QTP?

3 Answers   QualiTest,


can u store QTp frame work folders in VSS? If Not where u store those?

1 Answers  


Wht is Smart Identification Mechanisam in QTP..Actually when do we this Technology means during Recording or running ....how is technology works. Anybody can expalin this .....Thanks in advacne

4 Answers   Siemens,


What is the new version of qtp which is recently released in the market?

0 Answers  






what is meant by descriptive programming?

2 Answers   Wipro,


Hi, My problem is as follows. I recorded a script that created Object repository of each action i recorded. But later I added one more step (which was to enter data in a textfield) into the script through expert view. But as no repository for this newly added step exists in the test, my script fails. So please help me to sort this problem that how can I create object repository of a new step in an existing test. Thanks everyone

1 Answers  


Give me exact application where we should use low level recording?

6 Answers   CTS,


how to capture data from images in QTP and produce them in excel sheet?

3 Answers  


Can you brief the hurdles you faced during Automation testing?

0 Answers  


what is aregular expression?

4 Answers   UHG,


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

0 Answers  


Categories