title: selenium.common.exceptions.TimeoutException: Message
body: <p><a href="https://i.stack.imgur.com/telGx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/telGx.png" alt="enter image description here" /></a>
  Getting below exeception for the line <code>pst_hldr</code>.</p>
  <p>Also find the error below:</p>
  <pre><code>  File &quot;/home/PycharmProjects/reditt/redit1.py&quot;, line 44, in get_links
      pst_hldr = wait.until(cond.visibility_of_element_located((By.XPATH, &quot;.//*[@class='QBfRw7Rj8UkxybFpX-USO']&quot;)))
    File &quot;/usr/local/lib/python3.9/dist-packages/selenium/webdriver/support/wait.py&quot;, line 80, in until
      raise TimeoutException(message, screen, stacktrace)
  selenium.common.exceptions.TimeoutException: Message:
  </code></pre>
  <p>code:</p>
  <pre><code>def get_links(*keywords):
      urllist = []
      keystring = ''
      for kw in keywords:
          keystring += kw + &quot;%20&quot;
          keystring = keystring.strip()
      driver = webdriver.Chrome(&quot;chromedriver&quot;)
  
      driver.get('https://www.reddit.com/search/?q=' + keystring)
      driver.maximize_window()
  
      wait = WebDriverWait(driver, 10)
      tbody = wait.until(cond.presence_of_element_located(
          (By.XPATH, &quot;//*[@class='_3ozFtOe6WpJEMUtxDOIvtU']//*[@class='q4a8asWOWdfdniAbgNhMh']&quot;)))
      tb_bar = tbody.find_element_by_xpath(&quot;//*[@class='_3ozFtOe6WpJEMUtxDOIvtU']//*[&quot;
                                           &quot;@class='q4a8asWOWdfdniAbgNhMh']//*[@class='M7VDHU4AdgCc6tHaZ-UUy']&quot;)
      driver.execute_script(&quot;arguments[0].click();&quot;, tb_bar)
      print(&quot;end of bar&quot;)
      k = 0
      for i in range(200):
          newht = i * 500
          driver.execute_script(&quot;window.scrollTo(0, &quot; + str(newht) + &quot;);&quot;)
          time.sleep(0.1)
  
      wait = WebDriverWait(driver, 10)
  
      pst_hldr = wait.until(cond.visibility_of_element_located((By.XPATH, &quot;.//*[@class='QBfRw7Rj8UkxybFpX-USO']&quot;)))
      pst_tiles = pst_hldr.find_elements_by_xpath(
          &quot;.//*[@class='_1poyrkZ7g36PawDueRza-J']//*[@class='_2XDITKxlj4y3M99thqyCsO']//*[&quot;
          &quot;@class='_1Y6dfr4zLlrygH-FLmr8x-']&quot;)
      for tl in pst_tiles:
          ttl = tl.find_element_by_xpath(&quot;.//*[@class='y8HYJ-y_lTUHkQIc1mdCq _2INHSNB8V5eaWp4P0rY_mE']//a&quot;)
          href = ttl.get_attribute('href')
          print(href)
      driver.close()
  
  get_links('america', 'coronavirus', 'cases')
  </code></pre>