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 Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
hey thanks man, but I tried this already
getcelldata will never return an array. I still tries storing the values in an array what you have told but didnt work
Hi nikhil,
in sujit code declare arrreturn() variable outside the function and no need to return array. Hope it works.
Hi Sujit,
Please see the code below:
bReturn=GetTableValue(Rows,Cols)Function GetTableValue(iRows,iCols)Redim arrReturn(iRows*iCols)Dim iRowCount ,iColCount,iArrayIndexiArrayIndex=0For iRowCount = 0 to iRows-1For iColCount = 0 to iCols-1arrReturn(iArrayIndex) =Browser("MainBrowser").Page("PgName").WebTable("tblName").GetCellData(iRowCount,iColCount)iArrayIndex=iArrayIndex+1NextNextGetTableValue=arrReturnEnd Function
but QTP says invalid arguments when I'm calling the GetTableValue function. I'm passing just rowcount and colcount.
Can u explain what the problem.
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
Hi Sujit,
Please see the code below:
bReturn=GetTableValue(Rows,Cols)Function GetTableValue(iRows,iCols)Redim arrReturn(iRows*iCols)Dim iRowCount ,iColCount,iArrayIndexiArrayIndex=0For iRowCount = 0 to iRows-1For iColCount = 0 to iCols-1arrReturn(iArrayIndex) =Browser("MainBrowser").Page("PgName").WebTable("tblName").GetCellData(iRowCount,iColCount)iArrayIndex=iArrayIndex+1NextNextGetTableValue=arrReturnEnd Function
but QTP says invalid arguments when I'm calling the GetTableValue function. I'm passing just rowcount and colcount.
Can u explain what the problem.
On Wednesday, 20 June 2012 22:53:38 UTC+5:30, sujit wrote:
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en