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

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


   * @return a menu item that matches the specified text.
   */
  public SWTBotMenu menu(SWTBotShell shell, Matcher<? extends Widget> matcher, int index) {
    WaitForMenu waitForMenu = waitForMenu(shell, matcher);
    waitUntilWidgetAppears(waitForMenu);
    return new SWTBotMenu(waitForMenu.get(index), matcher);
  }
View Full Code Here


   * @return a menu item that matches the specified text.
   */
  public SWTBotMenu menu(SWTBotShell shell, Matcher<? extends Widget> matcher, int index) {
    WaitForMenu waitForMenu = waitForMenu(shell, matcher);
    waitUntilWidgetAppears(waitForMenu);
    return new SWTBotMenu(waitForMenu.get(index), matcher);
  }
View Full Code Here

   * @return a menu item that matches the specified text.
   */
  public SWTBotMenu menu(SWTBotShell shell, Matcher<MenuItem> matcher, int index) {
    WaitForObjectCondition<MenuItem> waitForMenu = waitForMenu(shell, matcher);
    waitUntilWidgetAppears(waitForMenu);
    return new SWTBotMenu(waitForMenu.get(index), matcher);
  }
View Full Code Here

    String projectName = "TestNormalJavaProject";

    bot.viewByTitle("Package Explorer").bot().tree(0)
        .getTreeItem(projectName).select();

    SWTBotMenu menu = bot.menu("Run");
    assertTrue(menu.isVisible());
    SWTBotMenu menu2 = menu.menu("Debug Configurations...");
    assertTrue(menu2.isVisible());
    menu2.click();

    bot.shell("Debug Configurations").bot().tree(0)
        .getTreeItem("Jetty Webapp").contextMenu("New").click();

View Full Code Here

            }
        });
       
        MenuItem menuItem = items.get(0);
        if (!menuItem.isDisposed()) {
             new SWTBotMenu(menuItem, matcher).click();
        } else {
            throw new WidgetNotFoundException("Racca!");
            //do nothing or print something in debug
        }
        return this;
View Full Code Here

    if (menuItem == null) {
      throw new WidgetNotFoundException("MenuItem \"" + itemText
          + "\" not found.");
    } else {
      return new SWTBotMenu(menuItem);
    }
  }
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) {
      System.err.println(wnfe.getMessage());
    }
View Full Code Here

    }
    return bot;
   
  }
  public static SWTBotMenu menu(SWTWorkbenchBot bot, String menu, String... subMenus) {
    SWTBotMenu ret = bot.menu(menu);
    for (String subMenu: subMenus) {
      ret = ret.menu(subMenu);
    }
    return ret;
  }
View Full Code Here

   * @return a menu item that matches the specified text.
   */
  public SWTBotMenu menu(SWTBotShell shell, Matcher<MenuItem> matcher, int index) {
    WaitForObjectCondition<MenuItem> waitForMenu = waitForMenu(shell, matcher);
    waitUntilWidgetAppears(waitForMenu);
    return new SWTBotMenu(waitForMenu.get(index), matcher);
  }
View Full Code Here

TOP

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

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.