Forum Discussion

bjaii's avatar
bjaii
Occasional Contributor
8 years ago

Java List area error, can't find any data in cell

Hi all,

 

I'm new to TestComplete, I have been using TestComplete to write tests for a certain Desktop Java application. Most controls can be "seen". but there are some controls that seems to be "customized" and cannot be interacted with aside from a black box point of view. It would be great if I could interact with them using functions.

 

I have multiples controls that cannot be interacted with, there are trees, tables and lists. I will only discuss one at the time so it doesn't get too confusing.

 

I have this control (full name):

Sys.Process("java").SwingObject("PersonaldispositionRunner", "Personnel Dispatch", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("JPanel", "", 0).SwingObject("ComponentOrientationAwareJSplitPane", "", 0).SwingObject("JPanel", "", 0).SwingObject("GBasicPanel", "", 0).SwingObject("IvuWorkflowContainer", "", 0).SwingObject("DisponierenView", "", 0).SwingObject("JPanel", "", 0).SwingObject("GrafischeDispoEditor", "", 0).SwingObject("mainSplitPane").SwingObject("SwitchableResourceListPane", "", 0).SwingObject("resourceVOsForSelectedPlanningLevel").SwingObject("outerSplitPane").SwingObject("splitPane").SwingObject("genericTableControl").SwingObject("GIndexedCollectionControl$ListArea", "", 0)

 

Full class name: 

de.gebit.trend.gui.list.GIndexedCollectionControl$ListArea

 

I assumed this control was a List control, so I mapped his full class name in List control, and when I want to interact with cells I get:

Error: Error
An error occurred.
Possible reasons:
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete/TestExecute.

Technical information:
97 0x80020006 (Unknown name.) getModel

 

The getModel Method does not exist in Methods tab.

 

I then tried to map it as table:
Error: Error
An error occurred.
Possible reasons:
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete/TestExecute.

Technical information:
97 0x80020006 (Unknown name.) getColumnCount

 

The getColumnCount Method does not exist in Methods tab.

 

So from my understanding, TestComplete needs to use these native functions (getModel for lists and getColumnCount for tables) which were not native function for this specific control.

 

I have attached two screenshots from object spy, if this information is useful.

Assuming that any kind of class mapping require a "get" function, I also attached all function with the get keyword.

 

I was wondering is there anyways for this table to work? 

 

Thanks all for your time!

16 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Have you tried the getModel() from Object thru script which is something like below,

     

    yourObject.getModel();

     

    Add watch to this item and If you see this object in runtime as *****.ListArea.java

     

    And also can you share the screenshot of Add Watch after this object value populated.

     

    Then you can use list of methods below.

    getRowCount()
    getColumnCount()

     

    For more Methods, https://searchcode.com/file/43333074/etl.editor/src/org/netbeans/modules/sql/framework/ui/graph/impl/ListArea.java

     

     

     

    • bjaii's avatar
      bjaii
      Occasional Contributor

      Thanks for he quick reply!

       

      I can call getModel() through script. 

       

      I have added a screenshot with the watch result.

      I do not see the row/column properties.

       

      What kind of control could this be?

       

      thanks!

      • shankar_r's avatar
        shankar_r
        Community Hero

        I hope you had this watch item as yourObject.getModel()

         

        This is kind of Text Control you can see the link here.

         

        What are you trying to do with this object.