title: How to find the count of multiple buttons on a webpage using Selenium Webdriver
body: <p>I have 4 Upload buttons on a webpage. Each of the upload button has the common functionality of uploading a file.</p>
  
  <p>I am unable to get the count of these buttons using Selenium webdriver.
  The id of the buttons are: </p>
  
  <ul>
  <li>buttonUpload_1</li>
  <li>buttonUpload_2</li>
  <li>buttonUpload_3</li>
  <li>buttonUpload_4. </li>
  </ul>
  
  <p>The common entity for these buttons is the class name <code>buttonSecondary smallButton</code></p>
  
  <p>I have tried the below commands to get the count, but was unable to:</p>
  
  <pre><code>List&lt;WebElement&gt; buttoncount = driver.findElements(By.className(("buttonSecondary smallButton")));
  
  List&lt;WebElement&gt; buttoncount = driver.findElements(By.xpath("//input[@class='buttonSecondary smallButton']"));
  </code></pre>