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

        if (button.getDomAttribute("data-pfconfirmcommand") != null) {
            // Confirm Dialog/Popup we don't want to guard for AJAX
        }
        else if (isAjaxified("onclick")) {
            button = PrimeSelenium.guardAjax(button);
        }
        else if ("submit".equals(button.getDomAttribute("type"))) {
            button = PrimeSelenium.guardHttp(button);
        }

        button.click();
    }
Component wrapper for the PrimeFaces {@code p:button}.
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/Button.java