Search in sources :

Example 1 with Button

use of org.eclipse.reddeer.swt.api.Button in project jbosstools-openshift by jbosstools.

the class CDKLaunchConfigurationDialog method apply.

public void apply() {
    logger.info("Pressing apply button...");
    Button apply = new PushButton(this, new WithTextMatcher("Apply"));
    if (apply.isEnabled()) {
        apply.click();
    }
}
Also used : PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) Button(org.eclipse.reddeer.swt.api.Button) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 2 with Button

use of org.eclipse.reddeer.swt.api.Button in project jbosstools-openshift by jbosstools.

the class CDKLaunchConfigurationDialog method revert.

public void revert() {
    logger.info("Pressing revert button...");
    Button revert = new PushButton(this, new WithTextMatcher("Revert"));
    if (revert.isEnabled()) {
        revert.click();
    }
}
Also used : PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) Button(org.eclipse.reddeer.swt.api.Button) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 3 with Button

use of org.eclipse.reddeer.swt.api.Button in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method deleteRunConfiguration.

public void deleteRunConfiguration(String configuratioName) {
    selectConfiguration(configuratioName);
    new DefaultToolItem(DELETE_LAUNCH_CONFIGURATION_LABEL).click();
    Shell deleteShell = new DefaultShell("Confirm Launch Configuration Deletion");
    WidgetIsFound deleteButton = new WidgetIsFound(org.eclipse.swt.widgets.Button.class, deleteShell.getSWTWidget(), new WithMnemonicTextMatcher("Delete"));
    Button button;
    if (deleteButton.test()) {
        // photon changed button text
        button = new PushButton(deleteShell, "Delete");
    } else {
        button = new YesButton(deleteShell);
    }
    button.click();
    new WaitWhile(new ShellIsAvailable(deleteShell));
    new WaitUntil(new ShellIsAvailable("Run Configurations"));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) YesButton(org.eclipse.reddeer.swt.impl.button.YesButton) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) WithMnemonicTextMatcher(org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) WidgetIsFound(org.eclipse.reddeer.core.condition.WidgetIsFound) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) YesButton(org.eclipse.reddeer.swt.impl.button.YesButton) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) Button(org.eclipse.reddeer.swt.api.Button) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 4 with Button

use of org.eclipse.reddeer.swt.api.Button in project linuxtools by eclipse.

the class NewDockerConnectionPage method pingConnection.

public void pingConnection() {
    Button testConnectionButton = new PushButton("Test Connection");
    testConnectionButton.click();
    new WaitUntil(new ShellIsAvailable("Success"));
    new OkButton().click();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) Button(org.eclipse.reddeer.swt.api.Button) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 5 with Button

use of org.eclipse.reddeer.swt.api.Button 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");
    }
}
Also used : CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) Button(org.eclipse.reddeer.swt.api.Button) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) CoreLayerException(org.eclipse.reddeer.core.exception.CoreLayerException)

Aggregations

Button (org.eclipse.reddeer.swt.api.Button)9 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)8 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)4 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)3 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)3 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)2 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)2 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)2 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)2 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)2 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 WidgetIsFound (org.eclipse.reddeer.core.condition.WidgetIsFound)1 WithMnemonicTextMatcher (org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher)1 Shell (org.eclipse.reddeer.swt.api.Shell)1 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 DefaultToolItem (org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem)1 OpenShiftToolsException (org.jboss.tools.openshift.reddeer.exception.OpenShiftToolsException)1