Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding WebElements
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
I am trying to get the WebElement of a WebTable that has 7 columns. I need the page numbher found in the 5th column.My code below returns no data. I can not figure why.

Any thoughts?

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

rNumber = 1
RowCount = TableObj.RowCount

For r = 1 to RowCount
    If r <> 2 Then
            ColCount = TableObj.ColumnCount(r )
           For c = 1 to ColCount
               'msgbox ColCount
                    ChildCountPage = TableObj.ChildItemCount(r, c, "WebElement")
                    'msgbox ChildCountPage
                     If ChildCountPage >  0 Then
                            For k = 0 to ChildCountPage - 1
                                        rNumber = rNumber +1
                                        Set WebObj = TableObj.ChildItem(r, c, "WebElement", k)
                                        NumPages = WebObj.GetROProperty("innertext")

                                        If c = 5 Then
                                      'Retrieve the column index
                                        objExcel.Cells(rNumber, 6).Value = NumPages
                                         End If
                                                

                            Next
                    End If
          Next
    End If
Next
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,864 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,746 02-25-2014, 02:22 PM
Last Post: guin.anirban
  WebElements shayk1985 4 3,465 03-04-2013, 04:19 AM
Last Post: shayk1985
  How to remove space between webelements silpavinod 2 3,329 10-11-2012, 02:53 PM
Last Post: silpavinod

Forum Jump:


Users browsing this thread: 3 Guest(s)