Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Retrieve CellData from WinGrid
posted

When I try to access the cell data of a Wingrid object via the GetCellData Method:

SwfWindow("ARH").SwfWindow("Planning").SwfTable("ugDays").GetCellData( 1 ,1)

I receive totally different data than I can see in the Table.  I checked the table and saw that when I did a RowCount on the table there are 14 cols and I only see 3 of them, this might be because of hidden columns and/or filtering? 

Then I checked the column names to see in which column the presented data is available

When I look at the column names I can find back the visual columns:

SwfWindow("ARH").SwfWindow("Planning").SwfTable("ugDays").object.rows.item(0).Cells.item(1).Column.Header.Caption

When I then call the cell data of the corresponding columns I receive other data than I can see, some data I can link (like instead of 2hours the retrieved data is 120, could be in minutes then?)  But for other textual data it looks like I receive a key that is afterwards processed and visualised by its corresponding text.

Is there however some way to actually retrieve the visualised data instead of the preprocessed?

The application is developped externally and I don't have access to the developpers to ask what is actually happening with the data.

I'm using TestAdvantage 2005 vol.1 (the same release as the NetAdvantage) with HP QTP 11.0. 

Parents
No Data
Reply
  • 7695
    Offline posted

    Yes as you surmised it still uses the row index, not the visible row index, therefore even though you a row is seen as being the first row, it could actually be the 5th or 100th. Best scenario for something along that line is to record it first, to determine the location then modify it.  We will likely be adding the ability to get the actual index by the visible one, but it would only be in the newest version forward likely TestAdvantage 11.2.

    As to your other issue, GetCellData is expected to retrieve the actual value of the cell, to get the displayed text, you should try GetCellProperty(iRow, iCell, "Text")

    Hope this helps,

Children
No Data