title: How to check one window or dialog is displayed or not by pywinauto
body: <p>I am new in <code>pywinauto</code> and have just started learning. Now I am using <code>pywinauto</code> to do some auto tests. So I need to know how to check one dialog is displayed or not.</p>
  
  <p>For example:</p>
  
  <pre class="lang-py prettyprint-override"><code>from pywinauto.application import Application
  
  app = Application()
  app.connect(process=1234)
  main_window = app.window(class_name='YodaoMainWndClass')
  </code></pre>
  
  <p>At here, I want to check the main_window is visible or not. But I don't know how to do this. maybe I should call <code>__getattribute__</code> or other functions?</p>