Forum Discussion

kavansays's avatar
kavansays
Contributor
10 years ago

Unable to access Swing objects

Hello Folks,

 

We are not able to access below Swing object(Table), no methods are available to access the Table row/column or even cell !!

 

Sys.Process("javaw").SwingObject("UIServices$2", "TradeBlade:  User: TUTFUS31(kevinwise): raw://170.198.112.32:5463", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("JDesktopPane", "", 0).SwingObject("JInternalFrame", "RFQ Manager", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("JideScrollPane", "", 0).SwingObject("JViewport", "", 0).SwingObject("CollapsiblePanes", "", 0).SwingObject("JideSplitPane", "", 0).SwingObject("JPanel", "", 0).SwingObject("JideSplitPane", "", 0).SwingObject("JPanel", "", 0).SwingObject("PreviewQuoteRequestPanel", "", 0).SwingObject("JViewport", "", 0).SwingObject("FXOPreviewQuoteRequestTable", "", 0)

Swingobj.jpg

 

 * While recording this table in testcomplete it creates below code where it only clicks on the object instead of accessing the methods to select cell or operate cell.

 

  Set FXOPreviewQuoteRequestTable = internalFrame.PreviewQuoteRequestPanel.Viewport.FXOPreviewQuoteRequestTable
  Call FXOPreviewQuoteRequestTable.Click(21, 8)
  Call FXOPreviewQuoteRequestTable.Click(307, 7)
  Call FXOPreviewQuoteRequestTable.Click(615, 60)
  Call javaw.dialog03.RootPane.null_layeredPane.null_contentPane.RFQCreateQuotePanel.Panel.JideButton2.Click(18, 14)

App.jpg

 

If anyone have faced this issue, please share the methods/way to access these objects.

 

Thanks in Advance..

 

Cheers !!

Kavan Shah

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi,

     

    Judging by the screenshots, you are using a third-party grid control – FXOPreviewQuoteRequestTable. Try using TestComplete’s Object Browser to make TestComplete treat your control as a supported one. Please refer to the “Recognizing Custom Controls” section of the “Supported Java Controls” article - http://smartbear.com/viewarticle/55828/

     

     

    • kavansays's avatar
      kavansays
      Contributor

      Thanks Tanya,

       

      Above solution sounds to be perfect but is not working on my object for one more reason..

       

      Problem: Object browser is identifying the table in the list but when i try to highlight it says its not visible.

       

      Swingobj.jpg

       

      * So eventhough its a table object it is not showing table methods and unable to highlight in application.

       

      App.jpg

       

      Please suggest if you have any idea how to resolve this :(

       

      Many Thanks,

      Kavan Shah

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi,

        As an alternative, I suggest that you use native methods and properties to access objects inside the grid. You will need to create scripts that will execute your tasks. Thus, this method requires some skills in programming. However, the scripts you’ll create will be very reliable. Please refer to the “Ways to Interact With Application Objects” article for more information: http://support.smartbear.com/viewarticle/55814/