Micro Focus QTP (UFT) Forums
Webtable().GetCellData() Returns hidden values of Cells - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Webtable().GetCellData() Returns hidden values of Cells (/Thread-Webtable-GetCellData-Returns-hidden-values-of-Cells)



Webtable().GetCellData() Returns hidden values of Cells - ssvali - 05-10-2013

I am trying to retrieve values of cells from a webtable using GetCellData() method but it returns hidden values of cells also.

Is there any method to get only visible values of a Web Table.

Code:
RwCount=Browser("xyz").Page("abc").WebTable("table1").RowCount
For i=1 to RwCount    
ColCount=Browser("xyz").Page("abc").WebTable("table1").ColumnCount(i)
     For j=1 to ColCount
       iValue=Browser("xyz").Page("abc").WebTable("table1").GetCellData(i,j)
Print iValue
Next
Next
Thanks in advance


RE: Webtable().GetCellData() Returns hidden values of Cells - venugqtp - 05-18-2013

What you get when you spy over that particular table


RE: Webtable().GetCellData() Returns hidden values of Cells - kawsar - 06-07-2013

I have a issue related to this

I need to click on a link in the webtable if it exist else click on a link to go back to the search page.

I wrote the code elow
Code:
Set WebLinkObj = Browser("").Page("").WebTable("").ChildItem(2,2,"Link",0)
    If WebLinkObj.Exist(5) then
       WebLinkObj.Click

      else
         Browser("").Page("").Link("").Click
       end if

Note: There is gonna be only one link in the webtable. Please help


RE: Webtable().GetCellData() Returns hidden values of Cells - Ankur - 06-07-2013

@kawsar : What's the error you're getting? Also please out your code in the code tags for better formatting See the help section https://www.learnqtp.com/forums/misc.php?action=help&hid=7


RE: Webtable().GetCellData() Returns hidden values of Cells - kawsar - 06-07-2013

I am not getting any error. The script does not seem to recognize the else statment.