use of org.eclipse.reddeer.swt.exception.SWTLayerException 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();
}
}
}
Aggregations