title: Function not waiting for intended period of time - Python Selenium
body: <p>I have a function that returns me the element based on xpath.</p>
  
  <pre><code>DEFAULT_WAIT_TIME_SEC = 10
  def wait_for_element_by_xpath(self, xpath,
                                    wait_time=DEFAULT_WAIT_TIME_SEC):
          print ("wait_time")
          print (wait_time)
          result = self.driver.find_element(By.XPATH, xpath)
          wait = WebDriverWait(self.driver, wait_time)
          wait.until(EC.element_to_be_clickable((By.XPATH, xpath)))
          return self.driver.find_element(By.XPATH, xpath)
  </code></pre>
  
  <p>I kept the default timeout time to 10 seconds intentionally.</p>
  
  <pre><code>        timeValue = "//span[contains(text(),'online Time')]"
          self.wait_for_element_by_xpath(timeValue, 70)
  </code></pre>
  
  <p>I have passed 70 seconds to this particular call to wait for element to appear on screen. But when I run my test, it only waits for 10 seconds and throw NoSuchElementException. </p>
  
  <p>I printed wait_time in my function intentionally to check what time is it picking, default time or my given time (70 sec).</p>
  
  <p>wait_time prints 70. </p>
  
  <p>So why is it throwing exception after 10 seconds and not waiting for intended 70 sec?</p>