Search in sources :

Example 1 with SWTLayerException

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();
        }
    }
}
Also used : DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) SWTLayerException(org.eclipse.reddeer.swt.exception.SWTLayerException) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) CoreLayerException(org.eclipse.reddeer.core.exception.CoreLayerException)

Aggregations

CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1 SWTLayerException (org.eclipse.reddeer.swt.exception.SWTLayerException)1 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)1