title: Finding element with no id, class or name (webdriver/Eclipse/Java/automation)
body: <p>I'm trying to create a basic login automated test but the <code>submit</code> button on the page doesn't have a unique <code>class name, and id</code>, so how do I locate it? </p>
  
  <p>The HTML for the button is below:</p>
  
  <pre><code>&lt;button class="btn btn-primary" type="submit" style="float:right;width:120px"&gt;Sign in&lt;/button&gt;
  </code></pre>
  
  <p>There is a forgot password button that shares the same class but different 'type':</p>
  
  <pre><code>&lt;button class="btn btn-primary" type="button" style="float:left;width:140px;padding-left:10px" onclick="showForgotPassword()"&gt;Forgotten Password?&lt;/button&gt;
  </code></pre>
  
  <p>I have tried below code, but it didn't work for me.</p>
  
  <pre><code>driver.findElement(By.className("btn btn-primary")).click();
  </code></pre>
  
  <p>Please help if you can guys, and look forward to hearing from you all.</p>