use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class CDKServer method confirmSSLCertificateDialog.
/**
* Methods waits for SSL Certificate dialog shell to appear and then confirms dialog,
* it might happen that certificate is already in place and no dialog is shown,
* then WaitTimeoutExpiredException is logged but not raised
*/
private void confirmSSLCertificateDialog(Shell shell) {
try {
DefaultShell certificateDialog = new DefaultShell(shell);
certificateDialog.setFocus();
log.info("SSL Certificate Dialog appeared during " + getLabel().getState().toString());
new PushButton(certificateDialog, "Yes").click();
new WaitWhile(new ShellIsAvailable(certificateDialog));
setCertificateAccepted(true);
} catch (WaitTimeoutExpiredException ex) {
String message = "WaitTimeoutExpiredException occured when handling Certificate dialog. " + "Dialog has not been shown";
log.error(message);
throw new CDKServerException(message, ex);
}
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class CDKServer method processProblemDialog.
private void processProblemDialog(Shell shell, String excMessage) {
log.info("Processing passed shell dialog " + new DefaultShell(shell).getText());
new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM, false);
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT, false);
DefaultShell shellDialog = new DefaultShell(shell);
log.info("Shell could have changed after getting another error");
log.info("Actual shell dialog name is " + shellDialog.getText());
CDKUtils.captureScreenshot("CDEServer#ProblemDialog#" + shellDialog.getText());
new OkButton(shellDialog).click();
throw new CDKServerException(excMessage);
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class NewServerContainerWizardPage method disposeSecureStoragePassword.
@SuppressWarnings("unused")
private static void disposeSecureStoragePassword() {
try {
new WaitUntil(new ShellIsAvailable(SECURE_STORAGE), TimePeriod.MEDIUM, true);
new DefaultShell(SECURE_STORAGE).close();
new WaitWhile(new ShellIsAvailable(SECURE_STORAGE));
} catch (WaitTimeoutExpiredException exc) {
log.info("WaitTimeoutExpiredException occurred while waiting for Secure Storage Password dialog");
}
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class OpenShift3ConnectionWizard method confirmMessageDialog.
private void confirmMessageDialog() {
ShellIsAvailable confirm = new ShellIsAvailable(OpenShiftLabel.Shell.OVERWRITE_REGISTRY_URL);
new WaitUntil(confirm, TimePeriod.MEDIUM);
DefaultShell dialog = new DefaultShell(OpenShiftLabel.Shell.OVERWRITE_REGISTRY_URL);
dialog.setFocus();
new OkButton().click();
new WaitWhile(confirm, TimePeriod.MEDIUM);
}
use of org.eclipse.reddeer.swt.impl.shell.DefaultShell in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method createOpenShiftApplicationBasedOnTemplate.
private void createOpenShiftApplicationBasedOnTemplate(boolean importProject, boolean serverTemplate, String templateName, final String templateLocalPath, List<Label> labels, TemplateParameter... parameters) {
if (serverTemplate) {
selectServerTemplate(templateName);
} else {
selectLocalTemplate(templateLocalPath);
}
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT);
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
if (parameters != null && parameters.length != 0) {
setTemplateParameters(parameters);
}
new NextButton().click();
new WaitWhile(new ControlIsEnabled(new NextButton()), TimePeriod.LONG);
if (labels != null && labels.size() != 0) {
createOpenShiftLabels(labels);
}
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
executeImport(importProject);
}
Aggregations