title: How to click on a hidden button with selenium through Python
body: <p>I’m trying to click an <code>Upload from my Computer</code> button on a page that has the source below.  </p>
  
  <p>I’m using selenium and tried several different approaches. The past failed approaches are commented out below, along with the current failed approach.  The error that’s returned with the current approach is below.  </p>
  
  <p>Can anyone see what the issue might be and suggest how to solve it?  I’m new to selenium so if someone can provide some explanation of what the html is doing and how their code solves the issue as well it would be really helpful for my understanding.</p>
  
  <p>HTML code of the button:</p>
  
  <pre><code>&lt;div class="hidden-xs"&gt;
      &lt;label for="fuUploadFromMyComputer" class="hidden"&gt;
          Upload from my Computer
      &lt;/label&gt;
      &lt;input id="fuUploadFromMyComputer" type="file" name="upload"&gt;
      &lt;button id="btnUploadFromMyComputer" 
              class="center-block btn btn-white-fill btn-block " 
              data-resume-type="COMPUTER" type="submit"&gt;
          &lt;i class="zmdi zmdi-desktop-mac"&gt;&lt;/i&gt;
          Upload from my Computer
      &lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>attempts:</p>
  
  <pre><code># clicking upload button
  
  # upload_btn = driver.find_element_by_id("fuUploadFromMyComputer")
  # upload_btn = driver.find_element_by_css_selector(
  #                 '.center-block.btn.btn-white-fill.btn-block')
  # upload_btn = driver.find_element_by_link_text('Upload from my Computer')
  
  # upload_btn.click()
  
  
  
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support import expected_conditions as EC
  
  WebDriverWait(driver, 20).until(EC.element_to_be_clickable(
       (By.CSS_SELECTOR, "div.center-block btn.btn-white-fill.btn-block"))).click()
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TimeoutException                          Traceback (most recent call last)
  &lt;ipython-input-43-8fd80ff3c690&gt; in &lt;module&gt;()
       14 from selenium.webdriver.support import expected_conditions as EC
       15 
  ---&gt; 16 WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "div.center-block btn.btn-white-fill.btn-block"))).click()
       17 
       18 time.sleep(3)
  
  ~/anaconda/envs/py36/lib/python3.6/site-packages/selenium/webdriver/support/wait.py in until(self, method, message)
       78             if time.time() &gt; end_time:
       79                 break
  ---&gt; 80         raise TimeoutException(message, screen, stacktrace)
       81 
       82     def until_not(self, method, message=''):
  
  TimeoutException: Message: 
  </code></pre>