Micro Focus QTP (UFT) Forums
Capturing a value in a webtable - 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: Capturing a value in a webtable (/Thread-Capturing-a-value-in-a-webtable)



Capturing a value in a webtable - EK21 - 08-20-2015

Hello all, i would like to say thank you in advance for all the help.i have two question...
1. if i get some general information/idea in how to use C# in UFT 12.5?

2.
Code:
Y = Trim(B("").p("").webtable("").GetCellData(C,R))
*the above code will capture the value in the specific web table(row and col), where there is one row but when i have more than one it would not capture it. any suggestion what i need to add.

please let me know if i need to provide more info

I am new to the field and still learning


RE: Capturing a value in a webtable - cuongtv - 08-20-2015

Hi EK21,

1. As documentary, you can write your code in any of IDE tools (should be Eclipse), then install LeanFT (it's comfortable with UFT 12.50) and call UFT execute your code.
Sorry, that just is my assumption because I still don't have plan to upgrade UFT 12.50

2. It may be:
Code:
Dim rows,cols,cells
cols = .Webtable("").GetROProperty("cols")
rows = .Webtable("").RowCount
For i = 0 to rows
For j = 0 to cols
  cells = .Webtable("").GetCellData(i,j)
  'do sth with cells value
Next
Next



RE: Capturing a value in a webtable - EK21 - 08-20-2015

i applied your code but not working...


RE: Capturing a value in a webtable - ADITI1992 - 08-20-2015

Look in the object repository the value for rows and columns of ur webpage.
use it accordingly then


RE: Capturing a value in a webtable - EK21 - 08-21-2015

thank you for responding Cuongtv, i applied the changes you suggesting but it is not working