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

Wow! this works great. I was making a much bigger todo for nothing.

I am curious why the code I do have wont dig down to find the WebElements of the columns (Account No, Receive Date, Desfription).

I am receiving the following Run Error:

Object required: 'TableObj.ChildItem(...)'
Line (53): "NumPages = TableObj.ChildItem(r,5, "WebElement", k).GetROProperty("innertext")".

I changed the ...(r, 5,.... to ...(r, c,.... to grab all of the page WebElements. The Run Aerror goes away but the data returned to the table only consists of thev DocType and Action columns. I must be pointing to the wrong table.

Attached oin my previous chast is a screenshot of the OR.


My code:

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

rNumber = 1
NumPages = 0
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Code:
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
            
                                    NumPages = TableObj.ChildItem(r,5, "WebElement", k).GetROProperty("innertext")
                                        Num = c
                                        If Num <> “” Then
                                              'Retrieve the column index
                                                objExcel.Cells(rNumber, 6).Value = NumPages
                                        'End If        
                            Next
                    End If
          Next
    End If
Next




thx my friend ;-)
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: 6 Guest(s)