Forum Discussion

ehaartmans's avatar
ehaartmans
Occasional Contributor
12 years ago

TC doesn't recognize ListItem data

Hi,



I'm testing a java client application (non-web).

TC recognizes the listbox as being of class SwingObject("ListBox$JListWithDividers", "", 0).

In the object spy no data of the listbox is is recognized.

It recognizes that there is a wItemCount of 18. When applying an indexnumber to wItem, no data shows.



When using code like this, itemdata becomes available:



set o = Aliases.App1.scherm_Pad_AN.SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("BorderedScrollPane", "", 0).SwingObject("JViewport", "", 0).SwingObject("MainPanel", "", 0).SwingObject("PicobolListBox", "", 0).SwingObject("JPanel", "", 0).SwingObject("ListBox$JListWithDividers", "", 0)



set oElement = o.getModel.getElementAt(0)



strText = oElement.text



What can I do to teach TC to recognize the itemdata immediattely?



The java swing class ListBox$JListWithDividers is added to the swing control object mapping.


3 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Erik,


     


    It looks like your control contains custom data. Could you please send a sample application with this control to our Support team so that they could find a way to get items?


     

  • ehaartmans's avatar
    ehaartmans
    Occasional Contributor
    Hi Tanya,



    I would like to do that, but it's a heavy client server application. This means I cannot send it via mail or so.

    What can we do to solve this issue?



    Regards,

    Erik.