Forum Discussion

rviswanathan's avatar
rviswanathan
New Contributor
12 years ago

How can i rightclick on my application icon in the Notification area when there are no buttons there?

Hi,



  I am trying to right click on my application icon in the Notification area to perform some tests. I came across this code (http://support.smartbear.com/viewarticle/8787?_ga=1.150136950.1743916629.1391978119) ,but in my case i need to cater for a scenario where there is no button click  as mentioned in the code.



All the icons in my Notification area are displayed straightaway and i need to right click on them.

Can anyone point me to the right direction please? I have attached a screenshot of the Notification area. I am working on TC 9 and using Jscript.



Thanks!



Remya
  • paul_scroce's avatar
    paul_scroce
    Frequent Contributor
    If the button click is not necessary could you delete (or comment) these lines?





    show_button = tray.WaitWindow("Button", "");




    show_button.Click();




    aqUtils.Delay(1000);



  • Hi Remya,


     


    You can access the needed element in the tray by its name and click it. For example, the code below right-clicks the Skype icon in the tray:




     var tray = Sys.Process("explorer").Window("Shell_TrayWnd", "", 1).Window("TrayNotifyWnd", "", 1).Window("SysPager", "", 1).

                Window("ToolbarWindow32", "User Promoted Notification Area", 1);


     tray.ClickItemR("Skype*");