How can I return Icon Name from a certain Cell in a JavaTable
I'm attempting to test a Java Application using Mercury's Quick Test Professional. I've figure out how to get the font from the JavaTable, but I'm unable to get the Icon. Below is the code that I'm using, could you tell me what I'm doing wrong.
'Set Object Properties
Set Window_Property = Description.Create()
Window_Property ("title").Value = "EBS BenAdmin"
Window_Property ("label").Value = "EBS BenAdmin"
RegisterUserFunc "JavaTable", "GetCellIcon", "GetCellIcon"
'Retrieve Font for Cell
CellIconName = JavaWindow(Window_Property).JavaTable("developer name:=table.adjudication.items").GetCellIcon(1,1)
Msgbox CellIconName
'#######################################################################################################################################################
'Type: Function
'Written by: Darin Duphorn
'Purpose: GetCellIconfrom JavaTable Cell
'Date Aug 15, 2006
'#######################################################################################################################################################
Function GetCellIcon(JTable, row, col)
Dim cc, Icon
' get font of the cell using cell renderer
Set cc = JTable.Object.getRenderer(row,col)
Set Icon = cc.DefaultTableCellRenderer() 'Class
'Method
GetCellIcon= cc.icon.GetIcon()
End Function

