use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class SecureStorage method handleSecureStoragePasswordAndHint.
public static void handleSecureStoragePasswordAndHint(String secureStoragePassword) {
boolean firstStorage = provideSecureStoragePassword(secureStoragePassword);
if (firstStorage) {
// Did "Password hint needed" shell appear? Get rid of it.
try {
new DefaultShell(OpenShiftLabel.Shell.PASSWORD_HINT_NEEDED);
new NoButton().click();
} catch (CoreLayerException ex) {
// do nothing
LOGGER.debug("Password hint did not appear. Skipping.");
}
}
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method setNewVariableValue.
// TODO this should be replaced once
// https://github.com/jboss-reddeer/reddeer/issues/1668 is fixed.
private void setNewVariableValue(String newValue, final String... variablePath) {
new WaitWhile(new JobIsRunning());
LaunchView debugView = new LaunchView();
debugView.open();
ensureCorrectFrameIsSelected(debugView);
VariablesView variablesView = new VariablesView();
variablesView.open();
new WaitUntil(new AbstractWaitCondition() {
@Override
public boolean test() {
try {
TreeItem variable = new DefaultTreeItem(variablePath);
variable.select();
return variable.isSelected();
} catch (Exception e) {
return false;
}
}
@Override
public String description() {
return "Variable is not selected";
}
}, TimePeriod.LONG);
try {
new ContextMenuItem("Change Value...").select();
} catch (CoreLayerException e) {
throw e;
}
new DefaultShell("Change Object Value");
new DefaultStyledText().setText(newValue);
new OkButton().click();
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class CredentialsWizardPage method cancelAddingUser.
public void cancelAddingUser() {
try {
Button cancel = new CancelButton();
cancel.click();
} catch (CoreLayerException exc) {
throw new CoreLayerException("Canceling setting the credentials was not successful");
}
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class NewServerContainerWizardPage method setCredentials.
public void setCredentials(String username, String password) {
log.info("Setting Red Hat Access credentials");
getAddButton().click();
CredentialsWizardPage credentialsPage = new CredentialsWizardPage();
credentialsPage.setUsername(username);
credentialsPage.setPassword(password);
Button ok = new OkButton();
if (ok.isEnabled()) {
ok.click();
} else {
String text = credentialsPage.getDescriptionText().getText();
if (text.length() > 0) {
log.info("Adding new credential failed to add new user " + username);
log.info("There is an error while setting Red Hat Credentials: \r\n" + text);
}
if (text.contains("already exists for domain access.redhat.com")) {
credentialsPage.cancelAddingUser();
return;
}
throw new CoreLayerException("Setting the credentials was not successful, " + "OK button is not enabled, error: \n\r" + text);
}
// here might be placed code for disposal of secure storage
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class CDKWrongCredentialsTest method closeAllErrorDialogs.
private void closeAllErrorDialogs() {
try {
new DefaultShell("Problem Occurred");
new OkButton().click();
} catch (CoreLayerException exc) {
log.info("Problem Occurred dialog was not present");
}
try {
new DefaultShell("Multiple problems have occurred");
new OkButton().click();
} catch (CoreLayerException exc) {
log.info("Multiple problems have occurred dialog was not present");
}
}
Aggregations