ConfirmationInspector confirmation = confirmation("formID:confirmationID");
PopupLayerInspector confirmedPopup = popupLayer("formID:confirmedPopup");
for (int i = 0; i < 3; i++) {
selenium.click("formID:button1");
String oldSource = selenium.getHtmlSource();
confirmation.okButton().click();
confirmedPopup.assertVisible(true);
selenium.click("formID:closer");
selenium.click("formID:refresher");
RichFacesAjaxLoadingMode.getInstance().waitForLoad();
selenium.click("formID:button1");