title: pywinauto find an exact tray item
body: <p>I'm trying to create an automated GUI test framework for a desktop application and I am using pywinauto for this.
  My problem is that even using SWAPY and Winspector I still have problems detecting the tray area and finding my app there.</p>
  
  <p>I have tried everything from the current documentation and also tried the Volume example from the web to no success.</p>
  
  <pre><code>from pywinauto import taskbar
  
  sti = taskbar.SystemTrayIcons.WrapperObject()
  
  print 'Clicking ', sti.Button(0).info.text
  sti.Button(0).Click()
  </code></pre>
  
  <p>Technically the only thing i need is finding the exact position of the tray icon and executing a click on it to bring up a menu.</p>
  
  <p>pywinauto has some functions related to the taskbar but i wasn't able to get them to work.</p>
  
  <p>Could anybody give me any ideas on how to do this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I tried your idea Vasily but I am getting this error:</p>
  
  <pre><code>import pywinauto
  from pywinauto import taskbar
  
  app = pywinauto.application.Application()
  app.start_('C:\Program Files (x86)\MyApp.exe')
  w_handle = pywinauto.findwindows.find_windows(title=u'MyApp')[0]
  window = app.window_(handle=w_handle)
  
  texts = taskbar.SystemTrayIcons.Texts()
  print texts
  </code></pre>
  
  <p>and the traceback:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/nicolae.farcas/Desktop/pywinauto_c1.py", line 9, in &lt;module&gt;
      texts = taskbar.SystemTrayIcons.Texts()
    File "C:\Python27\lib\site-packages\pywinauto\controls\common_controls.py", line 1932, in Texts
      btn_text = self.GetButton(i).text
    File "C:\Python27\lib\site-packages\pywinauto\controls\common_controls.py", line 1914, in GetButton
      button.idCommand)
  RuntimeError: GetButtonInfo failed for button with command id 0
  </code></pre>
  
  <p>I'm using Windows 7 Pro x64 right now but I need this to also run on 8, 8.1 and 10 (I can drop 10 since I imagine support for it is still behind)</p>