06-07-2010, 02:29 PM
Hi Prabhat,
I would suggest you to go with "Dictionary Objects" to solve this requirement.
I had tried this on QTP 9.5V & its working fine for me.
Please follow the below steps:
In Action1:
Step1: Create the required array
Step2: Store all the Array values into Dictionary Object items(Variables)
In Action2:
Step3: Store all the Dictionary Items values into an Array variable
Step4: Loop thru the Array using Lbound,Ubound and access the array values in Action2
For more info. refer the code given below:
Code in Action1:
Code in Action2:
Implement accordingly as per your requirement.
Hope this would solve your problem
I would suggest you to go with "Dictionary Objects" to solve this requirement.
I had tried this on QTP 9.5V & its working fine for me.
Please follow the below steps:
In Action1:
Step1: Create the required array
Step2: Store all the Array values into Dictionary Object items(Variables)
In Action2:
Step3: Store all the Dictionary Items values into an Array variable
Step4: Loop thru the Array using Lbound,Ubound and access the array values in Action2
For more info. refer the code given below:
Code in Action1:
Code:
d=Array("London","Boston","Newyork","Sanfransisco")
For i=0 to ubound(d)
GlobalDictionary.Item("Name"&i)=d(i)
Next
Code in Action2:
Code:
x=GlobalDictionary.items
For j=0 to ubound(x)
msgbox x(j)
Next
Implement accordingly as per your requirement.
Hope this would solve your problem