Forum Discussion

Vallalarasu_P's avatar
Vallalarasu_P
Frequent Contributor
8 years ago

How to Automate "DevComponents.DotnetBar" Using Testcomplete ?

Hi All,

 

   In my windows application, I have ClrFullClassName as DevComponents.DotNetBar and the child objects are unable to identify. Please let me know how do you handle this situation in testcomplete.

 

1. Menubar

2.bar etc

 

Regards

Valla

  • TestComplete doesn't support DevComponents.

     

    The alternative is to access as Open Applications.

     

    Try using MSAA, UI Automation and TextObject in the OpenApplication 

     

    Using the class name of the DevComponent. Set these three properties and verify that Object spy is able to identify the objects.

     

    If I remember right, i have used MSAA as */Classname 

    Textobject as */Classname. 

     

    Hope this resolves your issue as a quick fix.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I don't believe that the DevComponents component set is supported directly by TestComplete.  This does not mean you cannot use it.  It just means that you'll have to work with native properties and methods on the component in order to operate against it.

     

    Have you tried doing a "record" against the component and see what TestComplete generates?

    What shows up in the way of properties and methods in the ObjectSpy when examining the control?

    • Vallalarasu_P's avatar
      Vallalarasu_P
      Frequent Contributor

      Hi,

       

       Thanks for instant response. i tried recording, I, able to identify the complete Toolbar but not its sub items.

       

      For Example: I have MDI Tool Bar and It has two components "New" And "Refresh" as in the attached File. but It highlights as single object.

       

      Has No Children

      Child Count is 0. 

       

      How to manage the siutation

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Tool bars like this don't have separate objects for the buttons.  Instead, look for a method called "ClickItem" or something similar (if it's supported) which will take as a parameter some identified for the button to be clicked.  

        What did your recording result in?  Could you post a screenshot or post the script code of what the result of the recording was?

  • alesaux's avatar
    alesaux
    Occasional Contributor

    Hello,

     

    We are trying to build UAT Testing for our application within TestComplete, we are not scripting savvy therefore using the test recorder in the UI only.

     

    The main menu appears to be a DevComponents.DotNetBar item which prevents us from recording tests (since it will not see any of the drop down menu options, it waits forever for the menu item to be selected and fails the test).

     

    We have tried the workaround provided by mapping the object under the Microsoft Tools/Toolbar though we see inconsistent results. If we try to go and select something further than the first item in the menu drop down, it will never find it or click somewhere random instead.

     

    Has any solution been provided since this thread was raised?

     

    Many thanks,

    Auriane

    • Vallalarasu_P's avatar
      Vallalarasu_P
      Frequent Contributor

      TestComplete doesn't support DevComponents.

       

      The alternative is to access as Open Applications.

       

      Try using MSAA, UI Automation and TextObject in the OpenApplication 

       

      Using the class name of the DevComponent. Set these three properties and verify that Object spy is able to identify the objects.

       

      If I remember right, i have used MSAA as */Classname 

      Textobject as */Classname. 

       

      Hope this resolves your issue as a quick fix.

      • alesaux's avatar
        alesaux
        Occasional Contributor

        Hello,

         

        Thanks for your reply.

        If we add new items under TextRecognition, MSAA and UI Automation in the format */ClassName will this enable the recording option to work?

         

        We have tried using keyboard logging but this proves to work only intermittently.

         

        Thanks,

        Auriane