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

Write a command for setvalue function in a webedit

3 Answers   Wipro,


If you entered into yahoo mail with your valid user name and password , then you will get " welcome , username " (for example you will see , “welcome, Krishna” ) text on the top of the Inbox page , how can you test the user name is correct or not using QTP?

3 Answers   CTS,


I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2

0 Answers   Livetek,


get the order no from the following orderdetails orderstring="ORD13456PNR" eg:13456

10 Answers   Oracle,


WE ARE PLANING TO DESIGN AUTOMATION FRAME WORK. HOW TO CALL CONFIGURATION SCRIPT FILE(.VBS) FROM DRIVE SCRIPT FILE(.VBS)

1 Answers  






What is the limitation to XML Checkpoints?

4 Answers   CTS,


How to handle recovery scenario for a application crash.write script for this.

2 Answers   Polaris, TCS,


What is QTP and the use of QTP in TD?

0 Answers   MaxSolPro,


Hi Samrat, Thank u very much, what u said it is right.

0 Answers  


How will you set a unique four digit number in an edit field in QTP?

2 Answers   IBM,


how to retrive that the number of spaces are in a string ????

2 Answers   Liquid Hub,


Brief the process of testing with UFT?

0 Answers  


Categories