Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to count no of Webelement in a WebTable?
#1
Not Solved
Hi There,

I couldn't able to find no of Webelements present in a WebTable using childobjects and Getroproperty methods
--The specific WebTable contains 43 objects...and there are many webElements but it returns 0....Any idea where I am making mistake.

Code:
Set oWT= Description.Create()
     oWT("html tag").value = "TABLE"
     oWT("INDEX").value = 2

set objs= Browser("creationtime:=0").page("title:=.*").WebTable(oWT).childobjects
cnt = objs.count

    c=0
    For i = 0 to cnt-1
      If  objs(i).getroproperty("micClass") = "WebElement " then
      c = c+1
      end if
    Next
    msgbox "Print no of Weblemetns are " &c
Reply
#2
Not Solved
The problem is in the "WebElement ". It should be "WebElement". The extra space is a killer. I tried your code without the space and it worked perfectly

Parke
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Link in a webtable in a webtable Soulwalker 1 2,846 07-19-2017, 01:44 PM
Last Post: Ankur
  Webtable actions are not getting recorded, but ObjectSpy is able to identify webtable sahilarora2000 2 3,888 06-13-2014, 04:27 PM
Last Post: vinod123
  Count number of WebElement with certain property hari1024 1 18,250 01-13-2012, 05:33 AM
Last Post: vIns
  unable to click on WebElement in webtable mahendra 3 6,417 12-12-2011, 12:43 PM
Last Post: sshukla12
  Items of a list listbox is identified as webtable. Need count of the Webtables SweetyChowdhury 1 3,105 07-08-2011, 01:20 PM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 1 Guest(s)