title: Unable to make my script wait conditionally
body: <p>I've tried to write a script in python in combination with selenium to wait for a certain element to be available. The content I wish my script waits for is captcha protected. I do not want to set a fixed time. So, I need it to wait until I can solve myself. </p>
  
  <p>I've tried like:</p>
  
  <pre><code>import time
  from selenium import webdriver
  
  URL = "https://www.someurl.com/"
  
  driver = webdriver.Chrome()
  driver.get(URL)
  while not driver.find_element_by_css_selector(".listing-content"):
      time.sleep(1)
  
  print(driver.current_url)
  driver.quit()
  </code></pre>
  
  <p>But, the script throws an error:</p>
  
  <pre><code>selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element:
  </code></pre>
  
  <p><strong><em>How can I make my script wait until the element is available no matter how long it takes?</em></strong></p>