Micro Focus QTP (UFT) Forums
How to get runtime value into a variable - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to get runtime value into a variable (/Thread-How-to-get-runtime-value-into-a-variable)



How to get runtime value into a variable - sudhirzpatil - 01-30-2009

Hi can someone tell me how to put runtime property values of any objects into a varuable.
I have parameterize a weblist. This selected value of each iteration i want to put into a variable .
Suppose I parameterize a weblist which has following values

1 2000
2 3000
3 3000
4 4000

When it takes first value i want to perform some calculation which takes the value of current itteration add with another variable and dissplay the addition.

Thanks and Regards

Sudhir


RE: How to get runtime value into a variable - preeti.arora - 01-30-2009

Pick the run time value by their index#1/2/3 etc

Code:
Browser("Browser").Page("Page").WebList("ListName").GetItem(2)



RE: How to get runtime value into a variable - sudhirzpatil - 01-30-2009

Hi Preeti,
Thanks a lot.


RE: How to get runtime value into a variable - sreekanth chilam - 01-30-2009

Hi Sudhir & Preethi ,

For retrieving the run time property value of weblist or any object , we should use the "GetROProperty()"

Infact "GetItem(index)" is used for returning the value of item with specified Index.

So u can use the following way:

Code:
Browser("Browser").Page("Page").WebList("ListName").GetROProperty("Selection")
Try it out & see .....u will have clear picture.