Shilpa:

If you need to keep adding values to an array, take a look at using an
arrayList in dotnetfactory.  An excellent article can be found at
http://www.learnqtp.com/dotnetfactory-qtp-part7-arraylist/ .  You do
not have worry about ReDim.  You can sort ascending or descending by
writing one line of code.

The ArrayList is a hugh improvement over the old vbscript array and it
is worth the time to learn.

hth,

Parke

On Sep 11, 10:15 am, shilpa gupta <[email protected]> wrote:
> HI, pls see beliw query
>
> In an application, at one time only 3 objects are visisble.  Initially i am
> seeing 3 objects (obj1, obj2, obj3). after clicking Forward button, new
> object obj 4 is visible.
> objects now visible are obj2, obj3, obj4 and so on
> Suppose there are total 20 objects, how can i save name of these in an array
> how can i save all the values in an array. I am using childobjects to get
> name of the objects. issue is in array formation
> For i=0 to 19
>  If i<3 Then
>   For j=0 to 2
>   Arr(i)=obj(j).GetROProperty("text")
>   i=i+1
>   Else
>   btn.Click
>   Arr(i)=obj(j).GetROProperty("text")
>  End If
>  Next
>
> Regards

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to