Your array needs to be dynamic to handle 3, 4 or 20 objects.. you can
assign your array as ReDim and your issue will be solved.
On Tuesday, September 11, 2012 10:15:16 AM UTC-4, shilpa gupta 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