public void toggle(int... indexes) {
        for (int i : indexes) {
            WebElement checkbox = getCheckboxes().get(i);
            PrimeSelenium.waitGui().until(PrimeExpectedConditions.visibleAndAnimationComplete(checkbox));

            WebElement input = checkbox.findElement(By.tagName("input"));
            if (isAjaxified(input, "onchange")) {
                PrimeSelenium.guardAjax(checkbox).click();
            }
            else {
                checkbox.click();
            }
        }
    }
Component wrapper for the PrimeFaces {@code p:selectManyCheckbox}.
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/SelectManyCheckbox.java