Micro Focus QTP (UFT) Forums
Get multiline text in a cell of a Wetable - 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: Get multiline text in a cell of a Wetable (/Thread-Get-multiline-text-in-a-cell-of-a-Wetable)



Get multiline text in a cell of a Wetable - Satyabrata Saha - 06-18-2011

Hi,
Can u help me in how to get multiline texts in a cell of Webtable.Example would be,if a cell contains the below texts in a cell:-

Andrea Thomas
Tom Bell Zanny
Cean Dias

Then how do I extract the three different names in seperate variable.

I have used GetCelldata(row,column).But GetCellData returns a string in format "Andrea Thomas Tom Bell Zanny Cean Dias".

Using Split will return each word seperately.

Thanks,
Satya


RE: Get multiline text in a cell of a Wetable - parminderdhiman84 - 06-21-2011

Hello Satya,

You can use the following code to fetch the data :

Code:
Browser().Page().WebTable().Childitem(row,col,"MicClass",Index).GetROProperty("innertext")

e.g.
Code:
item1=Browser().Page().WebTable().Childitem(1,2,"Link",0).GetROProperty("innertext")

item2=Browser().Page().WebTable().Childitem(1,2,"Link",1).GetROProperty("innertext")

item3=Browser().Page().WebTable().Childitem(1,2,"Link",2).GetROProperty("innertext")
Hope this solves ur problem Smile

Regards,
Parminder