Forum Discussion

jeeejay's avatar
jeeejay
Contributor
14 years ago

Issue with Pressed and Focused Property of MSAA Objects

Hello,



We recently upgraded from TestComplete 6.5 to TestComplete 8.6 and observed issues with some properties of MSAA Objects (I also observed the 'Version 6 Compatibility' checkbox and I'm glad that it's provided).



In TC6, we used to make use of the 'State' property which had values like 'focusable' and 'checked'. In TC8, we noticed two new properties named Focused and Pressed but it doesn;t seem to work correctly.



Please refer the attached picture. I have captured two snapshots (v6 and v8) of two tools (Pan tool which is selected/pressed and Zoom tool which is in default state).



It can be noticed that with Version 6 Compatibilty on, the 'State' property of the Pan tool has a value 'selected' in addition to focusable whereas with Version 8, the 'Pressed' property is 'False'.



It would be really nice to know if this is a known issue or if anyone else has come across this or can re-produce it with your respective AUT, if applicable.



- GJ
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi,


    we used to make use of the 'State' property which had values like 'focusable' and 'checked'. In TC8, we noticed two new properties named Focused and Pressed


    Yes, in the latest version of TestComplete, we implemented a new approach to obtain the status of the control. Now, you can check any of its states (focused, checked, and so on) using an appropriate read-only flag.


    As for the Focusable and Checked properties:

    1. The Focusable property is not the same as Focused. The Focusable property returns the True or False value based on whether the control may have the focus (in general). The Focused property returns the True or False value based on whether the needed control has the focus at the moment.

    It's not obvious from your screenshot whether the buttons have the focus at the moment. Also, the Focused property is not the same as Pressed. If the button is not always pressed, it has the focus. Most likely, the button from the screenshot does not have the focus, that's why, Focused = false.

    2. The Checked property is not the same as Pressed. Checked is a state of the check box control, but the Pressed property returns the True or False value based on whether the button (not the check box) is pressed.

    It's weird that the Pan Tool (as it's a button) is in the checked state in the TestComplete 6.5 screenshot. Maybe this problem is caused by the MSAA provider of the application. To solve the problem, try installing the http://support.microsoft.com/kb/971513 package.


    I hope this helps :)

  • Hi Irina,



    Thanks for the quick reply and providing a solution as well. I visited the web page and observed that the setup is offered for Win XP, Win Server 03/08 and Windows Vista 32/64 Bit. Since my test machine is a Windows 7, a message popped up saying that 'the contents might not be relevant to your OS'. Just want to confirm whether it'll be ok to install the Vista 64 Bit setup. Please let me know.



    - GJ
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi,


    I'm sorry, I didn't know that you have this operating system. The package I mentioned is included into Windows 7, and that's why, you don't have to install it additionally.

  • Hi,



    Thanks for confirming ... so now what could be the solution to the issue - why does 'Pressed' show false even when the button is clearly in the pressed state? Is this an issue with TestComplete? It would be nice if you could verify this. Thanks.



    - GJ
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi,


    Is this an issue with TestComplete?


    Yes, this is an issue in TestComplete, and I registered it in our DB. Our developers have already made a patch for you to solve the problem, so, I recommend that you contact our Support Team and get a fix for this issue.


    To help the Support Team find the needed patch faster, please specify the link to this forum thread in the request. Thanks.

  • Thanks a ton Irina! This is excellent customer support!



    I submitted a request under 'Minor Usage Issue' ... eagerly awaiting to download the patch.



    - GJ
  • Hi Irina,



    I received an e-mail from support with a link to download the patch. The functionality works as expected after I installed it!



    Thanks a lot for invloving the support team on this issue and getting it resolved so qucikly.



    I am hoping that this patch is included in TC 8.7. Please follow-up with the dev team and let me know what you find.



    - GJ
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi,


    As far as I could find out, the patch will be included into the next release of TestComplete (ver. 8.70). We are going to release this version in the short run. So, you can wait for the next release date and check the expected behavior using the released version.

  • Hi,



    Thanks for the update. We deploy a configuration on our test machines and currently, I had to add a step to apply the patch after installing TestComplete. The only reason I was curious to know whether this patch will be included in the next minor release was to make sure that I have to keep that step active or not when we upgrade.



    - GJ