Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
webtable object help
#1
Not Solved
Hi All,

I have a problem getting the row count from a grid which may have few records.
My purpose is to check whether the grid has records if yes then random set any record and click ok. But when there is no record available in the grid then click on the cancel button of the grid window.
Here is the code I have written:

Code:
unitowner = mypage.WebTable("UnitOwnerGP").RowCount
'Fetches the row count

Webtable gives a wrong count - which gives total row count not the existng record count???

'msgbox unitowner

Code:
Set objChildItem2 = mypage.WebTable("UnitOwner").ChildItem(RandomNumber(2, unitowner -1),2,"WebElement",0)
objChildItem2.click

'used this object to click the element
now question is how do I get the value of an element. Is my below code valid?

Code:
If  objChildItem2.value= true Then
mypage.Image("OwnerOK").Click

else
mypage.Image("CancelOwner").Click
end if
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot identify the object "Webtable" korunu 1 2,390 06-29-2016, 05:28 PM
Last Post: Ankesh
  Cannot identify the object "Webtable" korunu 0 1,635 05-11-2016, 12:02 AM
Last Post: korunu
  When to Use Webtable object in and when not to use vivek5080 2 2,125 07-01-2013, 09:55 PM
Last Post: vivek5080
  want to change index dynamically of WebTable object atanu 5 18,249 07-13-2012, 09:15 PM
Last Post: anshikagoyal
  Child object of webtable not identified Nirav 2 4,982 04-28-2011, 10:05 PM
Last Post: Nirav

Forum Jump:


Users browsing this thread: 1 Guest(s)