Sujit,
After long time I again tried this, but when I'm trying to print values
they are displayed as blank. I tried converting to string using Cstr() but
doesnt work.
see the code
Function GetTableValue(iRows,iCols)
Redim arrReturn(iRows*iCols)
Dim iRowCount ,iColCount,iArrayIndex
iArrayIndex=1
For iRowCount = 1 to iRows
For iColCount = 1 to iCols
arrReturn(iArrayIndex) =Browser("actiTIME - Open
Tasks").Page("actiTIME - Open Tasks").WebTable("Customer").GetCellData(1,1)
iArrayIndex=iArrayIndex+1
msgbox iArrayIndex
a=arrReturn(iArrayIndex)
'msgbox Cstr(a)
msgbox Cstr(arrReturn(iArrayIndex))
Next
Next
GetTableValue=arrReturn
End Function
On Wednesday, 20 June 2012 22:53:38 UTC+5:30, sujit wrote:
>
> Hi Nikhil
>
> see function below
>
> Rows=2
> Cols=7
> ''all values stored in to Array bReturn
>
> bReturn=GetTableValue(Rows,Cols)
>
> Function GetTableValue(iRows,iCols)
> Redim arrReturn(iRows*iCols)
> Dim iRowCount ,iColCount,iArrayIndex
>
> iArrayIndex=0
> For iRowCount = 0 to iRows-1
> For iColCount = 0 to iCols-1
> arrReturn(iArrayIndex)
> =Browser("MainBrowser").Page("PgName").WebTable("tblName").GetCellData(iRowCount,iColCount)
> iArrayIndex=iArrayIndex+1
> Next
> Next
> GetTableValue=arrReturn
> End Function
>
> feel free to ask if you have any query :)
>
> --
> Thanks & Regards
> Sujit :)
>
> On Tue, Jun 19, 2012 at 11:59 PM, nikhil <[email protected]> wrote:
>
>> Hi I have a webtable with 2 rows and 7 columns. I need all the values.
>> All these values
>> need to be stored in an aray as I will be using these values to compare
>> with others.
>>
>> --
>> 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
>>
>
>
>
>
--
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