Forum Discussion

Miles_G's avatar
Miles_G
Occasional Contributor
13 years ago

Multiple mappings of one QT control in Object browers

Hi,


 

I added “QWidget” item in MSAA option panel of the Project Properties dialog.  I want to use MSAA to access QT controls. I saw there are 2 different mappings for the same control in Object browser window, please see the attachment (The top Client0 is under a window object, and the bottom Client0 is under a MSAA object, I call it MSAA mapping). Is there a way or an option which will only keep MSAA mapping, since some test cases will fail with 2 different mapping.


By the way, I saw the same issue while I added WPF control class names into the UI automation option panel of the Project Properties dialog.



Regards,

Miles

7 Replies

  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Miles,


    I saw there are 2 different mappings for the same control in Object browser window


    Why do you think these lines in the Object Browser correspond to the same control? Have you tried highlighting these controls on a screen? I'm not sure, but, I think, there must be two different controls of the application.


    One more question: why can't you use the special support for Qt controls provided by TestComplete? It's much easier to use it when testing Qt applications as you can perform much more actions against these applications and thus create more powerful tests.


    Thanks.

  • Miles_G's avatar
    Miles_G
    Occasional Contributor
    Hi Irina,



    Yes, I highlighted them and they are the same control. We have some owner-draw QT controls and we've implemented Assitive Technology (MSAA) for them, so that MSAA mapping is good for our testing.



    Thanks,

    Miles
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Miles,


    I've consulted our developers and they say that using the MSAA feature sometimes may cause such situations. To avoid problems with running tests, I recommend that you do the following:

    1. Open the Object Spy window.

    2. Drag the target glyph to the needed control.

    3. Obtain the name of this control shown in the Object Spy window and use this name in all of your tests. After you do so, TestComplete shouldn't have problems with recognizing the object while executing the tests.


    I hope this helps :)

  • Miles_G's avatar
    Miles_G
    Occasional Contributor
    Irina,



    Thanks for your reply, does it mean that there is no options or fixes to avoid such situations? The test cases still will fail after re-launching tested application and replay them. they will pass only after you rerun without re-launching application.



    Thanks,

    Miles
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Miles,


    does it mean that there is no options or fixes to avoid such situations?


    I'm afraid, there are no such options as this behavior is caused by the MSAA feature but not by TestComplete.


    The test cases still will fail after re-launching tested application and replay them. they will pass only after you rerun without re-launching application.


    Do you have problems with implementing the approach from my previous post? Does the test fails when you use the object name obtained from the Object Spy window? I it does, please contact our Support Team and send them:

    1. Your TestComplete project.

    2. The sample application that they could use to reproduce the behavior.


    Thanks.

  • Miles_G's avatar
    Miles_G
    Occasional Contributor
    Hi Irina,



    Yes, I followed your posted steps to record test cases, but it doesn't work. My tested application is a very big 3D CAD software, so I cannot send it to them. 



    Thanks,

    Miles 
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Miles,


    I understand. Let's start from a project. Please zip the entire TestComplete project suite you use, make sure that the zip file contains the project, the Name Mapping scheme and the test logs that were generated after the test failed and send this archive to our Support Team.


    Thanks.