Forum Discussion

e_sommer's avatar
e_sommer
New Contributor
10 years ago
Solved

Problems with TabControls

I want to make tests for an application which ist coded in C# with WPF. Our developers use a tabcontrol with additional custom control buttons. TC have some troubles with this configuration and isn't able to identify this objects. Can anyone give me some pointers for this. For example how our developers can change this configuration (but keeping the generell concept) to make the application accessible for TC.

I attach a little example application.
  • Hi Erik,

     


    OK. I thought you were talking about the tabs on the top.


    As the tab control is a composite one, you need to add its class name (CustomControlTest.CustomTabControl) to the Open Application | WPF | Composite Controls project properties. Refer to the "Support for WPF Control Templates" article - it describes this approach.


     


    Does it work?

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Erik,

     


    OK. I thought you were talking about the tabs on the top.


    As the tab control is a composite one, you need to add its class name (CustomControlTest.CustomTabControl) to the Open Application | WPF | Composite Controls project properties. Refer to the "Support for WPF Control Templates" article - it describes this approach.


     


    Does it work?

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Erik,

     


    Thanks for the sample app!


    As you are using a custom tab control, you need to map it to the one which is supported by TestComplete. The class name of your control is CustomControlTest.CustomTabControl.


     


    Watch this short video to learn how to do this.


     


    You can try implementing this approach to other controls used in your app. Please read the "Object Mapping" article for details.

  • e_sommer's avatar
    e_sommer
    New Contributor




     






    Hello Tanya,



    thanks for the video, which you specially made for us. Unfortunately, our problem isn´t covered in it. The CustomTabControl has also been previously recognized as a TabControl. But therein lies the problem, in that it is recognized as TabControl, the buttons below the image can not be detected correctly and can therefore only be controlled via click, which is not optimal.

    Would it be possible to map the CustomTabControl as another object in order to make the items except the main window and tabs available.




    With best regards

    Erik


  • e_sommer's avatar
    e_sommer
    New Contributor
    Hello Tanya,



    that's the trick. Thanks a lot for your help. Now all of our controls are accessible.



    With best regards

    Erik