title: Python Selenium - Wait until next page has loaded after form submit
body: <p>I am using Python3 and Selenium firefox to submit a form and then get the URL that they then land on.  I am doing it like this</p>
  
  <pre><code>inputElement.send_keys(postnumber)
  inputElement.submit()
  
  time.sleep(5)
  
  # Get Current URL
  current_url = driver.current_url
  print ( " URL : %s" % current_url )
  </code></pre>
  
  <p>This is working most of the time but sometimes the page takes longer than 5 seconds to load and I get the old URL as the new one hasn't loaded yet.</p>
  
  <p>How should I be doing this?</p>