Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetCellData
#1
Not Solved
Can we get more information on a cells data other than just the shown information?

Currently, I have:
Code:
FaxStatus = TableObj.GetCellData(3,1)

But is it possible to return if the cell is: visible, htm id, etc?

I am trying to do a If FaxStatus = value Then Higlight

I tried:

Code:
set a = Browser("Fax Request").Page("Page").WebTable("Fax Status").ChildItem(3,1,"WebElement", 1)
b= a.GetROProperty("abs_x")

But I get the Run Error: "Object required a"
Reply
#2
Not Solved
Code:
inrtxt=Browser("Fax Request").Page("Page").WebTable("Fax Status").Object.rows(2).cells(1).innertext
identifier ="innertext:="&inrtxt
a=Browser("Fax Request").Page("Page").WebElement( identifier).GetROProperty("abs_x")
msgbox(a)
Reply
#3
Not Solved
this may not work every time..
Reply
#4
Not Solved
thx inborntester

This did not work. But thx for the idea ;-)

Reply
#5
Not Solved
what is the error you got?. are you sure with row and column index.
Code:
inrtxt=Browser("Fax Request").Page("Page").WebTable("Fax Status").Object.rows(2).cells(0).innertext
is there two web elements in the cell ? do u want second.
Reply
#6
Not Solved
Thx inborntester (nice name)

Ok, I have been trying this in different ways, but all I get is an empty cell "" and im not sure why.

The cell has data and i am positive that i found the correct cell as i do ReportName2 = TableObj.GetCellData(r,c) just to find the cell.

I tried the childobjects, but it to returns ""

my code:

Code:
For r = BeginTableCount to EndTableCount
                                    ColCount = TableObj.ColumnCount(r)
                                    For c = 1 to ColCount
                                            'ChildCount = TableObj.ChildItemCount(r, c, "WebElement")
                                             'If ChildCount >  0 Then
                                                    'For k = 0 to ChildCount - 1
                                                                rNumber = rNumber +1
                                                                'Set LinkObj = TableObj.ChildItem(r, c, "innertext:=" & FaxName", k)
                                                                ReportName1 = TableObj.GetROProperty("innerText")  
                                                                ReportName2 = TableObj.GetCellData(r,c)
                                                                If ReportName2 = FaxName Then
                                                                        'absX = LinkObj.GetROProperty("abs_x")
                                                                        'absY = LinkObj.GetROProperty("abs_y")
                                                                                inrtxt=Browser("Fax Request").Page("Page").WebTable("Fax Status").Object.rows(r).cells(1).innertext
                                                                                identifier ="innertext:="&inrtxt
                                                                                a=Browser("Fax Request").Page("Page").WebElement( identifier).GetROProperty("abs_x")
                                                                                msgbox(a)
                                                                        Browser("Fax Request").Page("Page").WebElement("innertext:=" & FaxName ).Highlight
                                                                        Reporter.ReportEvent micPass, "Fax Found: " & FaxName , "The fax: " & FaxName & " - was found in the Fax Status report."
                                                                        Window("hwnd:=" & hWnd).Close
                                                                        Exit Function
                                                                End If
                                                    'Next
                                            'End If
                                  Next
                    Next
End If
Reply
#7
Not Solved
can you change the code and try
Code:
inrtxt=Browser("Fax Request").Page("Page").WebTable("Fax Status").Object.rows(r-1).cells(c-1).innertext
Reply
#8
Not Solved
I finally got back to this point.

Code:
inrtxt=Browser("Fax Request").Page("Page").WebTable("Fax Status").Object.rows(r-1).cells(3).innertext (c no longer exists so set to column 3, for 4-1)
returns correct cell value, CCI_8717

identifier ="innertext:="&inrtxt
returns, innertext:=CCI_8717

a=Browser("Fax Request").Page("Page").WebElement( identifier).GetROProperty("abs_x")
returns,
The "[ WebElement ]" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object.

Line (68):
Code:
"a=Browser("Fax Request").Page("Page").WebElement( identifier).GetROProperty("abs_x")".

Tip: If the objects in your application have changed, the Maintenance Run Mode can
help you identify and update your steps and/or the objects in your repository.

There ar two cells with CCI_8717. I create the 8717 using RandNum = RandomNumber(1000, 9999), but it is not very random as I get the same values daily. ie 87127 and 1010 are very common.
Reply
#9
Not Solved
Can you try like

Code:
Set objDesc = Description.Create
objDesc("innertext")=inrtxr
' depends on your need set index
objDesc("index")="0"
a=Browser("Fax Request").Page("Page").WebElement(objDesc).GetROProperty("abs_x")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  GetCellData not implemented aranucci 4 6,693 01-08-2014, 03:42 PM
Last Post: aranucci
  GetCellData() method ??? sumit_sehgal21 5 28,814 04-22-2013, 07:52 AM
Last Post: basanth27
  error whith getcelldata within actxtable frebuffi 1 2,895 02-27-2013, 03:03 PM
Last Post: Munna.Sarfraz
  Rowcount: getcelldata : compare : click on true result. Please help shamak 1 5,214 02-16-2011, 10:49 AM
Last Post: basanth27
Question RE: Webtable - GetCellData to LocalSheet - another question boludes 3 4,147 01-25-2011, 07:46 PM
Last Post: boludes

Forum Jump:


Users browsing this thread: 2 Guest(s)