title: How to check all check-boxes one by one in selenium web driver with the java?
body: <p>I am using the below code , The test case is not failing but the code is not checking the check-boxes.</p>
  
  <pre><code>@Test(priority=11)
  public void Test_CheckBox_Check()throws InterruptedException {
  
      List&lt;WebElement&gt; els = driver.findElements(By.xpath("//md-checkbox[@aria-checked='false']"));
      System.out.println(Integer.toString(els.size()));
      for ( WebElement el : els ) {
  
          el.click();
  
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/4PG0P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4PG0P.png" alt="Test Case is not failing"></a>
  <a href="https://i.stack.imgur.com/t6fKw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t6fKw.png" alt="Xptha and the elements"></a></p>
  
  <p><a href="https://i.stack.imgur.com/DmoWv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DmoWv.png" alt="enter image description here"></a></p>