title: Wait for image to disappear by using pyautogui
body: <p>In using pyautogui to check if an image is not part of the screen, I tried below:</p>
  <pre><code>a = True
  while a is True:
      a = pyautogui.locateOnScreen('image.png')
  print (&quot;No this image.')
  </code></pre>
  <p>It doesn't seem work well.</p>
  <p>What's the proper way to do so? Thank you.</p>