Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding WebElements
#6
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Lorena,

I cannot say why your code is not working as I dont have the application with me. But if you want to get all the items of the webtable then you can use below code:

Code:
Set TableObj = Browser("Wisdom").Page("Wisdom IA_2").Frame("parent").WebTable("Select All")

RowCount= TableObj.RowCount
Cols=TableObj.ColumnCount
rNumber = 1

For r = 3 to RowCount
            For i=1 to  Cols
                        rNumber = rNumber +1
                        NumPages = TableObj.GetCellData(r,i)
                        objExcel.Cells(rNumber, 6).Value = NumPages
            Next
Next

Always use GetCellData if you want the data from any webtable cell. Use ChildItem method when one cell of webtable contains more than one value and you need index to get the desired value from that cell e.g.
the last column of you webtable which contains 3 links, If you want to click any of these three links then you have to use childitem method.

Regards,
Parminder
Reply


Messages In This Thread
Finding WebElements - by mv8167 - 06-29-2011, 12:36 AM
RE: Finding WebElements - by parminderdhiman84 - 06-29-2011, 03:22 PM
RE: Finding WebElements - by mv8167 - 06-29-2011, 06:48 PM
RE: Finding WebElements - by parminderdhiman84 - 06-29-2011, 09:16 PM
RE: Finding WebElements - by mv8167 - 06-29-2011, 10:43 PM
RE: Finding WebElements - by parminderdhiman84 - 06-30-2011, 09:28 AM
RE: Finding WebElements - by mv8167 - 06-30-2011, 10:21 PM
RE: Finding WebElements - by parminderdhiman84 - 06-30-2011, 11:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get numbers inside all webelements in webtable and sort them pradeep537 1 2,850 08-04-2016, 01:24 AM
Last Post: Ankur
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,866 04-18-2014, 10:01 PM
Last Post: Parke
Exclamation UFT is not finding object in runtime but able to locate the object from repository amar.vallapreddy 1 2,748 02-25-2014, 02:22 PM
Last Post: guin.anirban
  WebElements shayk1985 4 3,466 03-04-2013, 04:19 AM
Last Post: shayk1985
  How to remove space between webelements silpavinod 2 3,330 10-11-2012, 02:53 PM
Last Post: silpavinod

Forum Jump:


Users browsing this thread: 2 Guest(s)