Forum Discussion

russleikis's avatar
russleikis
Contributor
14 years ago

Cracking the MSTaskListWClass for the Win7 Taskbar

Has anyone been able to figure out a way to access the task buttons on the new taskbar.  I'm trying to adapt a couple tests that dealt with window positioning controls and we had a way to test selecting the application in previous OS's.  (Yes I know that in theory calling TestObj.Minimize() is the same but the test was written to consider all methods a user might use to minimize/maximize the application.  This isn't the case now as Microsoft has intentionally not documented this class to keep devs out of it leaving the user as the one to control how it looks.



Any tips?  If not, I've already recoded the test to execute that sequence only on compatible OS's.  Thanks!

4 Replies


  • Hi,





    To access buttons of the taskbar, you need to add the 'MSTaskListWClass' class to the 'Open Applications | MSAA' section of the project settings. This will make TC expose accessibility information and recognize individual objects of the taskbar. After that, you can access buttons by their captions (see the example below). The captions are shown as tooltips for each button.





    Sys.Process("Explorer").Window("Shell_TrayWnd").Window("ReBarWindow32").Window("MSTaskSwWClass", "Running applications").ToolBar("Running applications").Button("Microsoft Office Word 2007").Click()







    You can find more information about testing with the Microsoft Active Accessibility technology in this help topic.
  • I am able to perform the single click with MSAA, however if the Taskbar buttons are set to "Always combine, hide labels", we cannot perform the single click. Any suggestions for this settings ?, Also I am not able to single click based on index.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi,

    > Any suggestions for this settings ?

    As this is a test box and you are not testing the combining functionality, why not to set it to 'Never Combine' ?