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

How i can test the background color of the records displayed in a Table. Eg i have a .net desktop application and there is a Table(swftable) with records displayed in the grids. i have to validate whether the 1st record is displayed in white background color and 2nd record in light blue background color...But the constraints is that once user click on the first record...the background color changes to grey.......Plze let me now how to validate this with QTP 9.2.

9 Answers   Accenture,


in Qtp,how to display user name and pwd (script)in data table(global sheet).

2 Answers  


How you test the object which is dynamically changes its location?

7 Answers   Wipro,


How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?

0 Answers  


what is the difference between data table and spread sheet?

1 Answers  


3. How to handle the exceptions using recovery secnario manager in Qtp?

2 Answers   Wipro,


Hi,will U Please Provide me details certification for QTP &QC and also please provide me the Material also. Send to mail:jjaanu2mail@gmail.com

0 Answers  


How can you capture(Read) the values from a Table?

1 Answers  


Can we create user defined functions in qtp?

0 Answers  


How to recognise the webelement and verifying that webelement is enabled?

0 Answers  


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

0 Answers  


can u please explain what r the challenges u faced in ur automation testing

2 Answers   Genpact,


Categories