title: Wait until element is not present
body: <p>I'm using selenium in Python 2.7 and I have this code, but I'm looking for a more efficient way to do this:</p>
  
  <pre><code>while True:
      try:
          element = WebDriverWait(driver, 10).until(
              EC.presence_of_element_located((By.ID, 'button'))
          )   
      except:
          break
  </code></pre>