title: Selenium: How to assert all checkboxes checked?
body: <pre><code>Decimal totalCheckboxes = selenium.GetXpathCount("//input[@type='checkbox']");
    for (int i = 1; i &lt; totalCheckboxes + 1; i++) 
          {
              // Assert attempt 1
              //Assert.IsTrue(selenium.IsChecked("/descendant-or-self::input[@type='checkbox'][" + i + "]"));
  
              // Assert attempt 2
              //Assert.IsTrue(selenium.IsChecked("//input[@type='checkbox'][" + i + "]")); 
          }
  </code></pre>
  
  <p>I need to assert multiple checkboxes are checked. The number of checkboxes are not always fixed because they depend on my search criteria. Also, the checkboxes have different id and name. For example, for the first checkbox, id = "ctl07_ctl01_ctl01_cbxRepeater_e5962e80-ca07-42e3-908f-1217ef5787d4" name = "ctl07$ctl01$ctl01$cbxRepeater_e5962e80-ca07-42e3-908f-1217ef5787d4"</p>
  
  <p>and for the second checkbox, id="ctl07_ctl01_ctl03_cbxRepeater_c094f428-7ead-4ded-a11b-5824be49a95b" name="ctl07$ctl01$ctl03$cbxRepeater_c094f428-7ead-4ded-a11b-5824be49a95b"</p>
  
  <p>and so on for the following checkboxes.</p>
  
  <p>I have tried several things to add an assertion to assert the checkboxes are checked (Assert attempt 1 and Assert attempt 2 above), but when I run the test, it still fails at that point. Ther error I get:</p>
  
  <pre><code>Selenium.SeleniumException: ERROR: Element /descendant-or-self::input[@type='checkbox'][1] not found
  Selenium.SeleniumException: ERROR: Element //input[@type='checkbox'][2] not found
  </code></pre>
  
  <p>Any help on this would be highly appreciated. Thanks in advance!</p>