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 Debug view?

1 Answers  


What is AUT in object reposity in QTP? Why we use it in Object repository???What is full form???????

6 Answers  


This is Karthic and my mail id is karthic.venkitapathi@gmail.com, please give me an idea to crack qtp 10

0 Answers  


in a web page How to check and display a particular word from a paragraph?

0 Answers  


According to use, how virtual object is different from object spy? If Qtp is not learning a sub-menues. What should we done? how would we manage on the expert view too? alkaa.dugaal@gmail.com

1 Answers   HCL,






you are recording on "WINDOW 1", say it has a link if you click on that, that leads you to "WINDOW 2". If you do any manipulations on "WINDOW 2" that are automatically updated in to "WINDOW 1". But "WINDOW 1" is currently invisible. But the updations in "WINDOW 1" must also be recorded as a script in QTP. The best Example is if you update your resume in JOB STREET portal it actually happens in other window, but the previous window is automatically updated. Now does QTP help you in this types of situations? Any body can answer this question. please..... Siva

0 Answers   Covansys,


Which statement will use for close an action in QTP?

0 Answers  


hi i have one doubt is there any companies are taking correspandence courses plz leme know urjent

2 Answers  


Hi,The question is write a script for the following scenario. scenario:in a job portal i entered QTP 3yrs testing then click search button.then it displays results like Test lead bangalore (here is a checkbox). Test lead hyderabad check box so on... question is if test lead position in bangalore then checkbox shld be enabled automatically..

4 Answers   Thatavarti Technologies,


What are test settings and global settings?

0 Answers  


how to test background color and dynamic images during runtime

4 Answers   CTS,


Tell about descriptive programing in qtp8.2?

4 Answers   GE,


Categories