Forum Discussion

mmccollum's avatar
mmccollum
Occasional Contributor
5 years ago

Unable to select Tabs in a Java App

Hello,

 

I am fairly new to test complete and im running into a problem. Im trying to grab the tabs in a tabed table and it wont see it. It sees it as a single object instead of multiple objects. Is there a way to set custom selections or prehaps refine selection? When I go into the object browser it shows teh tabbed pane but under that is only the table itself not the buttons.

 

Thanks,

Mitch

 

 

  • In my experience, the "Tabs" themselves are not invididual UI objects but controls embedded in the tab.  Notice in your screenshots that it recognizes that the tabs are there with the wTabCount property (there are 4 tabs).

     

    To click on a tab, usually there is a ClickTab or ClickItem or SelectItem or some similar method on the control to select the specific tab.  Doing a QUICK research in the TestComplete documentation for the Java TabbedPane control type revealed this

     

    https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/tab/clicktab-action-tab-control.html

     

    So... you should be able to call ClickTab(0) to click the first tab or ClickTab("My Caption") to click the tab with the indicated caption.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    In my experience, the "Tabs" themselves are not invididual UI objects but controls embedded in the tab.  Notice in your screenshots that it recognizes that the tabs are there with the wTabCount property (there are 4 tabs).

     

    To click on a tab, usually there is a ClickTab or ClickItem or SelectItem or some similar method on the control to select the specific tab.  Doing a QUICK research in the TestComplete documentation for the Java TabbedPane control type revealed this

     

    https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/tab/clicktab-action-tab-control.html

     

    So... you should be able to call ClickTab(0) to click the first tab or ClickTab("My Caption") to click the tab with the indicated caption.

    • mmccollum's avatar
      mmccollum
      Occasional Contributor

      Now I feel foolish.. Thank you I was not looking in the right location.

       

      Thanks,

      Mitch

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Mitch,

     

    In addition: in Capture2.png and Capture3.png it can be seen that you are using the Basic view mode for Object Browser. Switch to the Advanced one to be able to get access to more object's properties and methods.