How to create runtime property for an object?

Answers were Sorted based on User's Feedback



How to create runtime property for an object?..

Answer / arunsingh

Hello Mr Jaydev,

There is no such kind of method (Set ROProperty)in QTP.

Is This Answer Correct ?    7 Yes 0 No

How to create runtime property for an object?..

Answer / prasad

There is no such method like SetRoProperty()

Is This Answer Correct ?    2 Yes 0 No

How to create runtime property for an object?..

Answer / thirumala reddy

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

How to create runtime property for an object?..

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

How to create runtime property for an object?..

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

How to create runtime property for an object?..

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

How to create runtime property for an object?..

Answer / jayadev acharam

Example:
Browser("abcd").SetROProperty("abs_x",158)

Is This Answer Correct ?    0 Yes 8 No

Post New Answer

More QTP Interview Questions

I am in .Net development for past 3.5 years and want to enter in to automated testing and learn QTP. For this I need some good tutorial for beginners. I will be really greatful if any one has and they can send it to me on this address- ruchidureja@gmail.com

0 Answers  


How to fetch web elements count from Google Page which contains letter "e"

4 Answers  


What are the common defects found in your project? (in qtp interview)

0 Answers   TCS,


I want to test my vb.net solution file using qtp. Does Qtp test only .exe file?

0 Answers  


What is the diffrence bettween QTP 9.0 and QTP 9.1?

1 Answers  


In web page there is five OK buttons available, while recording i click on 3rd OK button, How QTP identify the 3rd OK button while running script? Is qtp identify 3rd ok button?

14 Answers   Polaris,


How to associate function library at a run time?

0 Answers  


By using QTP, How do you test a frame in a web page?

4 Answers   TCS,


Explain about Test Fusion Report of QTP?

0 Answers  


Hi Guys, here I am posting one question. Wen u r working with Notepad. If it is not responding in the middle of TEst...what u will do.

7 Answers  


How to swap two numbers by using parameter passing method byref in a fucntion and return the result to outside of the function?

1 Answers   CTS, IBM, London,


datatable.Import("E:\Programming Samples\QTP Samples\OrderNumbers.xls") Asume we have 4 records in datatable Code reads the 4 rows in the sheet ok, but does it 5 times? It doesn't sound like closing the datasheet is the problem Can we close the datasheet runtime ?

2 Answers  


Categories