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 |
We are using the QTP version 9.0 where we want to call objects from global repository for a particular function at runtime for increasing the performance of framework.We are actually looking for loading the objects under test (OAT) dynamically when script runs and would like to unload the same once the execution of the script is completed.
Hi, Is there any function or vbscript in QTP to clear the cookies,sessions. Please help me in this.
QTP identified the object but not performing the desired action???what could be the reason?????
What the differences are and best practical application of Object Repository?
hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com
Hi All, I need code for how to execute qtp scripts from excell sheet
how many wayes we do the parameterization?
several browsers opened. write QTP script to close all browsers except gmail.
How to get Links count in an web application,without descriptive programming?
Why do we use breakpoints in QTP?
How the exception handling can be done using quicktest professional (qtp)?
Can objects recognised without repository?