Micro Focus QTP (UFT) Forums
adding webtable to dictonaryobject - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: adding webtable to dictonaryobject (/Thread-adding-webtable-to-dictonaryobject)



adding webtable to dictonaryobject - prabu211989 - 12-21-2013

Hi Guys,
Could u please help me on this
I just want to know how to add the webtable data in to dictionary object
Code:
Set dictobj=createobject("Scripting.Dictionary")
Set T=Browser("title:=Google").page("title:=Google").webtable("name:=Google")
row=T.rowcount
col=T.columncount()
For icol=1 to col
dictobj.add "I want to know how to add here the webtable data"

Next
Thanks and Regards
Prabu.E


RE: adding webtable to dictonaryobject - sshukla12 - 12-24-2013

Hi,
Not sure if you want to add complete data of webtable in dictionary object. If so, then refer to the below code:
Code:
Set dictobj=createobject("Scripting.Dictionary")
Set T=Browser("title:=Google").page("title:=Google").webtable("name:=Google")
row=T.rowcount
col=T.columncount()
For icol=1 to col
For irow=1 to row
Text=Browser().page().webtable().getCell data(irow,icol)
dictobj.Add "CellData(irow,icol),"text"
Next
Next

might be some syntax issue but I think u can refer to the logic if required.

Regards,
Sankalp


RE: adding webtable to dictonaryobject - Parke - 01-06-2014

Prabu:

Do a search on "QTP Nested Dictionary".

hth,


Parke