title: python selenium: does not wait until page is loaded after a click() command
body: <p>does someone know how to wait until the page is loaded? I tried all possible variants I found on the web but is simply does not work.</p>
  
  <p>I need to wait after I trigger a click() command, there is some internal scripting on the web server which fools checks such as (I exclude the code to import required modules and use standard naming conventions): </p>
  
  <pre><code>WebDriverWait(browser, 10).until(lambda d: d.find_element_by_id(the_id))
  </code></pre>
  
  <p>or</p>
  
  <pre><code>browser.implicitly_wait(10) 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>elem2=wait.until(EC.presence_of_element_located((By.ID,the_id)))
  </code></pre>
  
  <p>all the above checks do not work, in the sense that they return True even if the page is still loading. This causes text which I am reading to be incomplete since the page is not fully loaded after a click() command. It seems that in python the command <em>clickAndWait</em> is not available (but again, it probably would not solve the problem as the other tests also fail). Ideally there would be a command which waits until the whole web page is loaded (regardless of a particular element of the page).</p>
  
  <p>I  managed to solve the problem by manually inserting a time.sleep(5) in a loop, but this is sub-optimal since it might slow down the whole process. If possible, better to wait only the strictly required time.</p>
  
  <p>Thx</p>