use of com.gargoylesoftware.htmlunit.ConfirmHandler in project ats-framework by Axway.
the class HiddenHtmlConfirm method clickOk.
@Override
@PublicAtsApi
public void clickOk() {
isProcessed = false;
webClient.setConfirmHandler(new ConfirmHandler() {
@Override
public boolean handleConfirm(Page currentPage, String confirmationText) {
isProcessed = true;
return true;
}
});
}
use of com.gargoylesoftware.htmlunit.ConfirmHandler in project ats-framework by Axway.
the class HiddenHtmlConfirm method clickCancel.
@Override
@PublicAtsApi
public void clickCancel() {
isProcessed = false;
webClient.setConfirmHandler(new ConfirmHandler() {
@Override
public boolean handleConfirm(Page currentPage, String confirmationText) {
isProcessed = true;
return false;
}
});
}
use of com.gargoylesoftware.htmlunit.ConfirmHandler in project ats-framework by Axway.
the class HiddenHtmlConfirm method clickCancel.
@Override
@PublicAtsApi
public void clickCancel(final String expectedConfirmText) {
isProcessed = false;
webClient.setConfirmHandler(new ConfirmHandler() {
@Override
public boolean handleConfirm(Page currentPage, String confirmationText) {
isProcessed = true;
if (!confirmationText.equals(expectedConfirmText)) {
throw new VerificationException("The expected confirm message was: '" + expectedConfirmText + "', but actually it is: '" + confirmationText + "'");
}
return false;
}
});
}
use of com.gargoylesoftware.htmlunit.ConfirmHandler in project ats-framework by Axway.
the class HiddenHtmlConfirm method clickOk.
@Override
@PublicAtsApi
public void clickOk(final String expectedConfirmText) {
isProcessed = false;
webClient.setConfirmHandler(new ConfirmHandler() {
@Override
public boolean handleConfirm(Page currentPage, String confirmationText) {
isProcessed = true;
if (!confirmationText.equals(expectedConfirmText)) {
throw new VerificationException("The expected confirm message was: '" + expectedConfirmText + "', but actually it is: '" + confirmationText + "'");
}
return true;
}
});
}
Aggregations