Package org.eclipse.swtbot.swt.finder

Examples of org.eclipse.swtbot.swt.finder.SWTBot.tree()


  }

  private void createClass(String projectName, String classType,
      String packageName, String className) {
    SWTBot localBot = bot.viewByTitle("Package Explorer").bot();
    localBot.tree().expandNode(projectName).select("src");
    bot.menu("File").menu("New").menu(classType).click();
    bot.textWithLabel("Package:").setText(packageName);
    bot.textWithLabel("Name:").setText(className);
    bot.button("Finish").click();
  }
View Full Code Here


  }

  private void setupProjectDependency(String projectName) {
    bot.menu("Window").menu("Show View").menu("Navigator").click();
    SWTBot localBot = bot.viewByTitle("Navigator").bot();
    SWTBotTree tree = localBot.tree();
    SWTBotTreeItem node = tree.expandNode(projectName + "Test");
    node = node.expandNode(".classpath").select();

    final SWTBotContextMenu cmenu = new SWTBotContextMenu(tree);
    bot.performWithTimeout(new VoidResult() {
View Full Code Here

            + expectedResultStr + ", result);", "}", "}");
  }

  private void createJUnit4TestSuite(String projectName, String packageName) {
    SWTBot localBot = bot.viewByTitle("Package Explorer").bot();
    localBot.tree().expandNode(projectName + "Test", "src")
        .select(packageName);
    bot.menu("File").menu("New").menu("Other...").click();
    bot.shell("New").activate();
    bot.tree().expandNode("Java", "JUnit 4").select("JUnit 4 Test Suite");
    bot.button("Next >").click();
View Full Code Here

  }

  private void executeJUnit4TestSuiteInUi(String projectName,
      String packageName) {
    SWTBot localBot = bot.viewByTitle("Package Explorer").bot();
    localBot.tree().expandNode(projectName + "Test", "src", packageName)
        .select("AllTests.java");
    SWTBotMenu menu = bot.menu("Run").menu("Run As");
    try {
      getSubMenuItemContainingTest(menu, "JUnit Test");
    } catch (WidgetNotFoundException wnfe) {
View Full Code Here

    TestUtil.showExplorerView();
  }

  protected void changeFilesInProject() throws Exception {
    SWTBot packageExlBot = bot.viewByTitle("Package Explorer").bot();
    SWTBotTreeItem coreTreeItem = selectProject(PROJ1, packageExlBot.tree());
    SWTBotTreeItem rootNode = coreTreeItem.expand().getNode(0)
        .expand().select();
    rootNode.getNode(0).select().doubleClick();

    SWTBotEditor corePomEditor = bot.editorByTitle(FILE1);
View Full Code Here

    assertEquals(1, commit[0].getParentCount());

    ContextMenuHelper.clickContextMenu(table,
        UIText.GitHistoryPage_revertMenuItem);
    SWTBot dialog = bot.shell(UIText.RevertFailureDialog_Title).bot();
    assertEquals(1, dialog.tree().rowCount());
    assertEquals(1, dialog.tree().getAllItems()[0].rowCount());
    assertTrue(dialog.tree().getAllItems()[0].getItems()[0].getText()
        .startsWith(FILE1));
  }
View Full Code Here

    ContextMenuHelper.clickContextMenu(table,
        UIText.GitHistoryPage_revertMenuItem);
    SWTBot dialog = bot.shell(UIText.RevertFailureDialog_Title).bot();
    assertEquals(1, dialog.tree().rowCount());
    assertEquals(1, dialog.tree().getAllItems()[0].rowCount());
    assertTrue(dialog.tree().getAllItems()[0].getItems()[0].getText()
        .startsWith(FILE1));
  }

  @Test
View Full Code Here

    ContextMenuHelper.clickContextMenu(table,
        UIText.GitHistoryPage_revertMenuItem);
    SWTBot dialog = bot.shell(UIText.RevertFailureDialog_Title).bot();
    assertEquals(1, dialog.tree().rowCount());
    assertEquals(1, dialog.tree().getAllItems()[0].rowCount());
    assertTrue(dialog.tree().getAllItems()[0].getItems()[0].getText()
        .startsWith(FILE1));
  }

  @Test
  public void testOpenOfDeletedFile() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.