Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Counting no. of rows for a wbfgrid in a web based application
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi,
You will not be able to use this statement
Code:
"Browser("..").Page("..").WebTable("..").GetROProperty("rows").GetCellData(i,1)"
to generate rowwise loop instead use INDEX.

here in this case you need to increment i value according to the rows for example if you have two columns and two rows then
the index would be

C1 C2
R1 0 1
R2 2 3

just try

Code:
Dim i,rows,total

rows=Browser("..").Page("..").WebTable("..").GetROProperty("rowcount")

For i=0 to rows Step 2
    if Browser("..").Page("..").WebTable("html tag:=TD","index:="&i).GetROProperty("innertext")="value" Then
            total = total +1
             Else
            msgbox "No rows present"
            total = 0
             End If
Next
msgbox total

one more thing you can also use
Code:
.GetCellData(i,1) instead of GetROProperty("innertext")

Hope i would have answered you.
Reply


Messages In This Thread
RE: Counting no. of rows for a wbfgrid in a web based application - by MR21135 - 11-07-2008, 02:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  webfile web object not identified at runtime in a java application saila123 1 2,841 02-11-2015, 08:23 PM
Last Post: Kirill
  How to Delete Rows with duplicate values in 1 columns in excel thru QTP. arpan 0 2,854 02-09-2015, 08:47 PM
Last Post: arpan
Smile find out of spelling error in Web application deveshbhatt29 1 2,246 01-10-2014, 05:10 PM
Last Post: Maheep_bhambri
  How to get center data value in a odd number of rows and columns web table ... sai rajesh 0 2,837 11-13-2013, 10:24 PM
Last Post: sai rajesh
  to count the number of used rows in a particular column sujaravi123 3 11,229 06-12-2013, 03:17 PM
Last Post: sujaravi123

Forum Jump:


Users browsing this thread: 3 Guest(s)