title: Toggle button click using selenium webdriver
body: <p>Having multiple toggle button but same class name for each toggle button.</p>
  
  <p>Code here </p>
  
  <pre><code>&lt;div class="col-md-10 blockBox"&gt;
  &lt;h4 class="panel-title"&gt;
  &lt;a class="accordion-toggle collapsed" href="#CompetencyBlock" data-parent="#CompetencyAccordion" data-toggle="collapse"&gt;
  Forms And Assessments For Individuals
  &lt;div class="tabHeaderImage"&gt;&lt;/div&gt;
  &lt;/a&gt;
  &lt;/h4&gt;
  &lt;/div&gt;
  
  
  &lt;div class="col-md-10 blockBox"&gt;
  &lt;h4 class="panel-title"&gt;
  &lt;a class="accordion-toggle collapsed" href="#BirthDateBlock" data-parent="#BirthDateAccordion" data-toggle="collapse"&gt;
  Birthdate
  &lt;div class="tabHeaderImage"&gt;&lt;/div&gt;
  &lt;/a&gt;
  &lt;/h4&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried these code</p>
  
  <pre><code>1)  List&lt;WebElement&gt; text = driver.findElements(By.className("panel-title"));
         text.get(2).click();
  
  
  2)  List&lt;WebElement&gt; text = driver.findElements(By.className("tabHeaderImage"));
         text.get(2).click();
  </code></pre>
  
  <p>But i am able click first four toggle button only remaining toggle button i am not able click </p>