use of com.gargoylesoftware.htmlunit.PromptHandler in project ats-framework by Axway.
the class HiddenHtmlPrompt method clickCancel.
@Override
@PublicAtsApi
public void clickCancel(final String expectedText) {
isProcessed = false;
webClient.setPromptHandler(new PromptHandler() {
@Override
public String handlePrompt(Page currentPage, String promptText, String defaultValue) {
isProcessed = true;
if (!promptText.equals(expectedText)) {
throw new VerificationException("The expected prompt text was: '" + expectedText + "', but actually it is: '" + promptText + "'");
}
return null;
}
});
}
use of com.gargoylesoftware.htmlunit.PromptHandler in project ats-framework by Axway.
the class HiddenHtmlPrompt method clickOk.
@Override
@PublicAtsApi
public void clickOk(final String promptValue) {
isProcessed = false;
webClient.setPromptHandler(new PromptHandler() {
@Override
public String handlePrompt(Page currentPage, String promptText, String defaultValue) {
isProcessed = true;
return promptValue;
}
});
}
use of com.gargoylesoftware.htmlunit.PromptHandler in project ats-framework by Axway.
the class HiddenHtmlPrompt method clickCancel.
@Override
@PublicAtsApi
public void clickCancel() {
isProcessed = false;
webClient.setPromptHandler(new PromptHandler() {
@Override
public String handlePrompt(Page currentPage, String promptText, String defaultValue) {
isProcessed = true;
return null;
}
});
}
Aggregations