title: pywinauto testing with Windows paint
body: <p>I am trying to play around with pywinauto and I thought one easy project would be to have it automate Windows paint. This turned out to be trickier than I expected.</p>
  
  <p>I want to try to open the Properties menu item shown here:</p>
  
  <p><a href="https://i.stack.imgur.com/5IEnY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5IEnY.jpg" alt="Properties menu item"></a></p>
  
  <p>So far I have this code:</p>
  
  <pre><code>    from pywinauto.application import Application
  import pywinauto
  
  app = Application(backend='uia')
  
  p = pywinauto.findwindows.find_element(title_re=".* - Paint")
  
  app.connect(handle=p.handle)
  dlg = app.window(title_re=".* - Paint")
  
  dlg.File_tab.click()
  </code></pre>
  
  <p>That code connects to an existing open Paint window and opens the file tab. From there I am not sure how to actually click on 'Properties'. I thought something simple like "dlg.Properties.click()" might work, but that gives me an ElementNotFound error.</p>
  
  <p>I found that the github page has some example code for Paint automation here:
  <a href="https://github.com/pywinauto/pywinauto/blob/master/examples/mspaint.py" rel="nofollow noreferrer">https://github.com/pywinauto/pywinauto/blob/master/examples/mspaint.py</a></p>
  
  <p>By looking at line 32 in the example I can see that they can access items on the menu by calling childwindow and invoking it. Line 32 in the github example says this:</p>
  
  <pre><code>dlg.child_window(title='Open', control_type='MenuItem', found_index=0).invoke()
  </code></pre>
  
  <p>I don't completely understand that. Is that saying that clicking on the file tab opens up a new "child window"? The other question I have is, what does invoking do vs clicking on something?</p>
  
  <p>I tried to use the code from the github example but I am stll not sure how to get it to work. The github example runs the "Open" option from the file tab.</p>
  
  <p>I tried to adapt the line from github and used "Properties" instead of "Open" like this:</p>
  
  <pre><code>dlg.child_window(title='Properties', control_type='MenuItem', found_index=0).invoke()
  </code></pre>
  
  <p>That actually causes Paint to crash when I try that.</p>
  
  <p>The "Properties" menu item appears in the controls list when I print the control identifiers from pywinauto. It looks like this:</p>
  
  <blockquote>
    <p>MenuItem - 'Properties'    (L1, T476, R254, B531)
    ['PropertiesMenuItem', 'MenuItem6', 'Properties']
    child_window(title="Properties", control_type="MenuItem")</p>
  </blockquote>
  
  <p>How can I use the information above to figure out how to properly access the menu item?</p>