Package org.eclipse.swtbot.swt.finder.widgets

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox


    getDialog();
  }

  @Test
  public void testMainSwitch() throws Exception {
    SWTBotCheckBox box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);
    SWTBotTree tree = findTree();
    assertFalse(box.isChecked());
    assertFalse(tree.isEnabled());
    box.click();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    configurationDialog.close();
    getDialog();
    box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);

    tree = findTree();
    assertFalse(box.isChecked());
    assertFalse(tree.isEnabled());
    box.click();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    configurationDialog.bot().button(IDialogConstants.OK_LABEL).click();
    getDialog();
    box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);

    tree = findTree();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());
    box.click();
    assertFalse(box.isChecked());
    assertFalse(tree.isEnabled());
    configurationDialog.bot().button(IDialogConstants.OK_LABEL).click();
  }
View Full Code Here


    configurationDialog.bot().button(IDialogConstants.OK_LABEL).click();
  }

  @Test
  public void testTreeNode() throws Exception {
    SWTBotCheckBox box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);
    SWTBotTree tree = findTree();
    assertFalse(box.isChecked());
    assertFalse(tree.isEnabled());
    box.click();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    SWTBotTreeItem item = tree.getAllItems()[0];
    assertFalse(item.isChecked());
    item.check();
    assertTrue(item.isChecked());

    configurationDialog.close();
    getDialog();
    box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);

    tree = findTree();
    assertFalse(box.isChecked());
    assertFalse(tree.isEnabled());
    box.click();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    item = tree.getAllItems()[0];
    assertFalse(item.isChecked());
    item.check();
    assertTrue(item.isChecked());

    configurationDialog.bot().button(IDialogConstants.OK_LABEL).click();
    getDialog();
    box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);

    tree = findTree();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    item = tree.getAllItems()[0];
    assertTrue(item.isChecked());

    configurationDialog.bot().button(
        UIText.GitTraceConfigurationDialog_DefaultButton).click();

    assertFalse(item.isChecked());
    box.click();
    configurationDialog.bot().button(IDialogConstants.OK_LABEL).click();
  }
View Full Code Here

public class ExistingOrNewPage {

  private static final SWTWorkbenchBot bot = new SWTWorkbenchBot();

  public void setInternalMode(boolean internalMode) {
    SWTBotCheckBox internalModeCheckbox = bot
        .checkBox(UIText.ExistingOrNewPage_InternalModeCheckbox);
    if (!internalMode)
      internalModeCheckbox.deselect();
    else
      internalModeCheckbox.select();
  }
View Full Code Here

    tree.select(projectName);
    bot.menu("Edit").menu("Delete").click();
    SWTBotShell shell = bot.shell("Delete Resources");
    shell.activate();
    Button button = bot.widget(widgetOfType(Button.class), shell.widget);
    new SWTBotCheckBox(button).select();
    bot.button("OK").click();
    bot.waitUntil(Conditions.shellCloses(shell));
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotCheckBox checkBoxWithLabel(String label, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withLabel(label), withStyle(SWT.CHECK, "SWT.CHECK"));
    return new SWTBotCheckBox((Button) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotCheckBox checkBox(String mnemonicText, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withMnemonic(mnemonicText), withStyle(SWT.CHECK, "SWT.CHECK"));
    return new SWTBotCheckBox((Button) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotCheckBox checkBoxWithTooltip(String tooltip, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withTooltip(tooltip), withStyle(SWT.CHECK, "SWT.CHECK"));
    return new SWTBotCheckBox((Button) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotCheckBox checkBoxWithId(String key, String value, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withId(key, value), withStyle(SWT.CHECK, "SWT.CHECK"));
    return new SWTBotCheckBox((Button) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotCheckBox checkBoxWithId(String value, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), withId(value), withStyle(SWT.CHECK, "SWT.CHECK"));
    return new SWTBotCheckBox((Button) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotCheckBox checkBoxInGroup(String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(Button.class), inGroup(inGroup), withStyle(SWT.CHECK, "SWT.CHECK"));
    return new SWTBotCheckBox((Button) widget(matcher, index), matcher);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.