How to create runtime property for an object?
Answers were Sorted based on User's Feedback
Answer / arunsingh
Hello Mr Jaydev,
There is no such kind of method (Set ROProperty)in QTP.
| Is This Answer Correct ? | 7 Yes | 0 No |
By using "SetToProperty" you can do that
for example if any object property is changing during runtime our test will fail, to avoid that we can use SetToProperty.
e.g. if any WebEdit "name" property is changing then
Browser("xxx").Page("yyy").WebEdit("zzz").SetToProperty("name", "new value of name")
and this value is valid for that run session only (during runtime) after that that property will remain the property in the object repository
if any queries plz mail me
a.thirumalareddy@gmail.com
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / prasad
there are three Methods like
For Test Object(TO)
1. GetToProperty()
2. SetToProperty()
For Runtime Object
1.GetRoProperty()
First thing is that every object are treated as the Test
Object(TO) by QTP.
ex.
Suppose u r working with "OK" button. so all the properties
and logical name of the "OK" button will be Stored in
OR(Obj. Repos.)Here it will be treated as TO.When QTP
execute the script it will search the "Ok" button based on
its properties and logical name.In this case it will be
treated as RO. So i don't this that it is needed to create a RO.
Please make me Clarify against it........if any
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vistaraj
i agree to thirumala reddy.
to create runtime property for an object, we have to use
SETTOPROPERTY as following
'Set the Text property for 7 as Server
Window("Calculator").WinButton("7").SetToProperty
("text","Server")
Now check if the object has created runtime property or not
by GETTOPROPERTY
strText=Window("Calculator").Winbutton("7").GetToProperty
("Text")
msgbox "strText"
See that "Server" is displayed
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / narendra
we can use
browse().page().setToproperties().
we can set property and a value to an object
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / jayadev acharam
Example:
Browser("abcd").SetROProperty("abs_x",158)
| Is This Answer Correct ? | 0 Yes | 8 No |
We have an application which generates links( more than thousand) based on the time stamp dynmically.Each link will download an xls file. we are supposed to click a particular link (which link to click will be obtained thru some buisiness logic).Now the issue is QTP is not recogniging the link(say Var1) though its properties showed mandatory fields text=xyz and html tag=A.I used following code to do this. Browser("ABC").Page("123").Link("text:=" &Var1,"html tag:=A").click, can any one suggest why this is not recognised by QTP though syntax is correct?(Is there any sync issue to be considered?Because on clicking the link it will take 5 mins to open that file)
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.
Up to how much VB scripting knowledge and what type of VB script knowledge is required for a QTP test engineer for real time to work ?
What is Object Spy in QTP?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
What is Virtual Object? Plz Explain me with an example?
How to indentify MS-Word objects like Menubar, Toolbar, table/columns/rows/cells etc within Word document, using QTP?
How to record objects of Windows taskbar
Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.
Describe how Smart Identification is used
How to test login page by using QTP
what is output value in QTP and how it can be used in automation testing