@Override
    public void click() {
        PrimeSelenium.waitGui().until(PrimeExpectedConditions.visibleAndAnimationComplete(getRoot()));
        PrimeSelenium.waitGui().until(ExpectedConditions.elementToBeClickable(getRoot()));

        if (isOnChangeAjaxified()) {
            PrimeSelenium.guardAjax(getRoot()).click();
        }
        else {
            getRoot().click();
        }
    }
Base class for boolean toggle components.
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/base/AbstractToggleComponent.java