Micro Focus QTP (UFT) Forums
How to enter data in a cell in web table - 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: How to enter data in a cell in web table (/Thread-How-to-enter-data-in-a-cell-in-web-table)



How to enter data in a cell in web table - Ravi_Chandra - 02-03-2011

Hi,

Can anyone help me on below scenario?

There are two web tables with one row each...

In First Web Table -
I have to search for the text and get the position of the column

In Second Data Table -
Now, we have to go to second web table and go to the column position retreived from first web table and click on the cell and enter the data.

Can anyone give piece of code for second scenario???


RE: How to enter data in a cell in web table - DinakarVadapalli - 02-03-2011

use child objects method and try it


RE: How to enter data in a cell in web table - anandanlk - 02-03-2011

Hi,
Follow the steps
1.Get the row count of first table
2. In a for loop (i=1 to rc) just get the vaule of the cell using getroproperty() method
3. if the text matches then, store the position in a variable and exit for
4. just get the object using childobjects property(here use the position value which is stored in a variable)
5. Set the value of the object

Feel free to post your query, If any difficulty