title: Selenium wait for page load python
body: <p>I am currently attempting to submit a form using selenium driver through python 2.7.12 and then retrieving the loaded page. The code i currently does not seem to wait for the page load this is the code i have:</p>
  
  <pre><code>while False:
      try:
          driver.find_element_by_id("ctl00_lblStockName") #oldpage id
          break
      except StaleElementReferenceException:
          continue
  
  print ("Page is ready!")
  f = driver.page_source
  soup = BeautifulSoup(f,'html.parser')
  print (soup)
  </code></pre>
  
  <p>The code above just prints the html of the page before the search. I'm unsure whether my while loop is working.</p>
  
  <p>I have attempted another method using the timeout function but the error comes up as </p>
  
  <pre><code>AttributeError: 'WebDriver' object has no attribute 'manage'
  </code></pre>
  
  <p>Also I have read that using timeout is not especially reliable either, so I would like to avoid this method unless it's the only option.</p>