What is the difference between gettoproperty and
settoproperty?Explain with an example?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
1. I have asked the same question for the third time, but i am getting wrong answers. Pls give me the script to count the number of edit boxes or checkboxes in an windows application screen. In windows application childobject is not working, anyone very urgent
An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?
Pls explain me the difference between ........ Description.Create and CreateObject
Which scripting language used by quicktest professional (qtp)?
results.xls file is automatically generated while running the script in QTP.But it is showing error to open the file
what is output value in QTP and how it can be used in automation testing
What does VBS file contain?
How we can add actions in the test using QTP?
Give me some scripts for 1). checking webpage links (counting links,opening web pages,counting child elements)
how many script you will wright in a year ? i told it's depends on the proj..and 'n.no of ... but he forced me to tell some num. or avg .....how many i suppose to tell..??and do a favor per day how many script don't thing it's repeated question or common ...help me post a ans...thanks for advance
what is the difference between action and function
11 Answers AppLabs, BirlaSoft, Infosys,
In VSS, HoW the documents send to local folder? copy paste or any other? plz explain about VSS TOOL kit?