Hi everyone,

short description:

I am using QTP 9.2 with .net-addIn and Infragistics TestAdvantage against the local Citrix client of an application which uses Infragistics Netadvantage

I need to get the properties of a cell in an SWFTable.

So, I use

XKor = SwfWindow("BCA EuroAIS - 1.9.0").SwfWindow("Eingangsbegutachtung").SwfTable ("m_gridData").GetCellProperty("0","0;ProcessName" ,"x")

[/ QUOTE ]
in order to get the x-coordinate of that cell.
(Do not get confused by the unusual first two parameters; When using Infragistics, this is correct – according to the QTP-Help)

I get the error message:
Invalid Property name: Property not found.

According to the help, “x” is a correct value. I also tried “y”, “value”, “colname”, “width”, “height” – always with the same error. So, it looks as if the normal QTP values are not accepted.

What can I do?

Long description including original problem, first workaround and current workaround:

In a table, I want to set a value.
I recorded it with QTP and got:

SwfWindow("BCA EuroAIS - 1.9.0").SwfWindow("Eingangsbegutachtung").SwfTable ("m_gridData").SetCellData "2","ProcessName","Betankung"

[/ QUOTE ]
When I do it manually, it works.
When I do it during a replay via QTP, it fails - the test application displayes a standard error message.

The cell has a drop-down list – maybe that is the problem.

I also tried it with .Type - still got that error from the tested application


- I open the drop-down list
- I type in micDwn until the searched value is found or until I went trough the list.

I would need the exact coordinates of the cell to place a “click” to open the list, then I would use GetCellData to see what the actual value is while I type in micDwn.

1. GetCellData didn’t work
2. GetCellProperty(“0”, “0;ProcessName","x") didn’t work

The last workaround that I use is GetVisibleText() to get what is currently displayed in the cell.
I calculate the coordinates where I have to place my click to open the list, and I calculate where I should be able to get the displayed content of the cell.

Only problem is that if the resolution of the screen changes or if there is the slightest change in layout or if a content of a cell is so long that it can’t be displayed, my current solution will fail.

strProcessname is the Value that should be typed in/set/selected.


'How many rows has SwfTable("m_gridData")?
nRows=SwfWindow(strEuroAIS).SwfWindow("Eingangsbeg utachtung").SwfTable("m_gridData").RowCount
'Create a new service...
SwfWindow(strEuroAIS).SwfWindow("Eingangsbegutacht ung").SwfButton("ubNew").Click
msgbox("New Row created")
'Now, type in the values for the new service....
SwfWindow(strEuroAIS).SwfWindow("Eingangsbegutacht ung").SwfTable("m_gridData").ActivateCell CStr(nRows),"ProcessName"
'Now, let us open the drop-list......
'We do this by clicking on the position where the symbol for expanding the list should be....
SwfWindow(strEuroAIS).SwfWindow("Eingangsbegutacht ung").SwfTable("m_gridData").Click 430, 40+nRows*25
'Now, we will go down the the opened list row after row until we find that service or until we find the same service four times in a row.....
While not blnDone
'Go one option lower
SwfWindow(strEuroAIS).SwfWindow("Eingangsbegutacht ung").SwfTable("m_gridData").Type micDwn
strActualService = Trim(SwfWindow(strEuroAIS).SwfWindow("Eingangsbegu tachtung").SwfTable("m_gridData").GetVisibleText(7 8, 26+nRows*25, 430, 51+nRows*25))
'Check if the found service is identical with the last found Service
If strActualService=strLastService Then
If nRepeats>3 Then
'If the same service was found four times in a row, we must have reached the end of the list
End If
End If
If strActualService=trim(strProcessName) Then
'we have found the service that we have been looking for....
End If
'At this point, we have either found the searched service _or_ the service does not exist

[/ QUOTE ]

(I now that this is not how one should use QTP, and this is the reason why I ask for help/advise)

Many thanks in advance for *any* feedback and best regards,