use of org.eclipse.reddeer.core.exception.CoreLayerException in project linuxtools by eclipse.
the class AbstractDockerBotTest method setSecureStorage.
public static void setSecureStorage(String password) {
try {
new DefaultShell("Secure Storage Password");
new LabeledText("Password:").setText(password);
new LabeledText("Confirm password:").setText(password);
new PushButton("OK").click();
new DefaultShell("Secure Storage - Password Hint Needed");
new PushButton("NO").click();
} catch (CoreLayerException ex) {
// swallowing intentionally
} catch (SWTLayerException e) {
try {
new DefaultShell("Secure Storage");
new LabeledText("Password:").setText(password);
new LabeledText("Confirm password:").setText(password);
new PushButton("OK").click();
} catch (SWTLayerException ex) {
// Secure storage password is set
} catch (CoreLayerException ex) {
// Confirm password
new PushButton("OK").click();
}
}
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project linuxtools by eclipse.
the class ComposeTest method runDockerCompose.
private void runDockerCompose(String project, String projectFile) {
PackageExplorerPart pe = new PackageExplorerPart();
pe.open();
pe.getProject(project).getProjectItem(projectFile).select();
@SuppressWarnings("unchecked") ContextMenuItem contextMenu = new ContextMenuItem(new WithTextMatcher("Run As"), new RegexMatcher(".*Docker Compose"));
contextMenu.select();
new OkButton().click();
try {
new DefaultShell("Docker Compose");
new PushButton("Apply and Close").click();
fail("Docker Compose has not been found! Is it installed and the path is correct?");
} catch (CoreLayerException ex) {
}
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
new WaitWhile(new ConsoleHasNoChange());
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class BrowserIsReadyElseReloadCondition method test.
@Override
public boolean test() {
BrowserEditor browserEditor = null;
try {
browserEditor = new BrowserEditor(new BaseMatcher<String>() {
@Override
public boolean matches(Object arg0) {
return true;
}
@Override
public void describeTo(Description arg0) {
// TODO Auto-generated method stub
}
});
} catch (CoreLayerException ex) {
LOGGER.debug("CoreLayerException in waiting for browser in BrowserIsReadyElseReloadCondition");
LOGGER.debug(StackTraceUtils.stackTraceToString(ex));
return false;
}
String text = browserEditor.getText();
if (text.contains("Unable to load page") || text.contains("404")) {
LOGGER.debug("Refreshing browser");
new ServersView2().open();
serverAdapter.select();
new ContextMenuItem("Show In", "Web Browser").select();
return false;
} else {
// Browser is ready
return true;
}
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method handleCheatSheetCreateServerAdapter.
public static void handleCheatSheetCreateServerAdapter() {
try {
new WaitUntil(new ShellIsAvailable(new WithTextMatcher(new RegexMatcher(OpenShiftLabel.Shell.CHEATSHEET + "|" + OpenShiftLabel.Shell.CREATE_SERVER_ADAPTER))), TimePeriod.LONG);
new NoButton().click();
new DefaultShell("Create server adapter");
new NoButton().click();
} catch (CoreLayerException ex) {
// Swallow, shells are not opened
} catch (WaitTimeoutExpiredException e) {
// Also swallow, shells are not opened
}
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method deleteAllProjects.
public static void deleteAllProjects(Connection connection) {
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.getOpenShift3Connection(connection).refresh();
new WaitWhile(new JobIsRunning());
List<OpenShiftProject> projects = explorer.getOpenShift3Connection(connection).getAllProjects();
for (OpenShiftProject project : projects) {
if (project != null) {
String projectName = project.getName();
try {
project.delete();
new WaitWhile(new OpenShiftProjectExists(projectName, connection), TimePeriod.LONG);
} catch (CoreLayerException ex) {
// project does not exist - project has been deleted but view has not been
// refreshed
explorer.getOpenShift3Connection(connection).refresh();
}
}
}
}
Aggregations