title: Python + Selenium: Reload a page after a timeout on WebDriverWait call
body: <p>I am looking for a proper way to implement below in Python Selenium</p>
  
  <ol>
  <li>Load a page</li>
  <li>Wait for a certain period of time(e.g 30 secs) for a button to be clickable (by calling WebDriverWait)</li>
  <li>If got TimeoutException, reload the page again, i.e. goto step 1)</li>
  </ol>
  
  <pre><code>url = 'https://...'
  driver = webdriver.Chrome('./chromedriver')
  
  try:
      driver.get(url)
      wait = WebDriverWait(driver, 30)
      element = wait.until(EC.element_to_be_clickable((By.CLASS_NAME,'button')))
  except TimeoutException as e: 
      &lt;reload the url again&gt;
  </code></pre>