Package org.eclipse.swtbot.swt.finder.finders

Examples of org.eclipse.swtbot.swt.finder.finders.EventContextMenuFinder.findMenus()


    EventContextMenuFinder finder = new EventContextMenuFinder();
    try {
      finder.register();
      notify(SWT.MenuDetect);
      Matcher<MenuItem> withMnemonic = withMnemonic(label);
      List<MenuItem> menus = finder.findMenus(withMnemonic);
      if (menus.isEmpty())
        throw new WidgetNotFoundException("Could not find a menu item");
      return new SWTBotMenu(menus.get(0));
    } finally {
      finder.unregister();
View Full Code Here


      notify(SWT.Deactivate);
      notify(SWT.FocusOut);
      log.debug(MessageFormat.format("Clicked on {0}", this)); //$NON-NLS-1$

      Matcher<? extends Widget> matcher = withMnemonic(menuItem);
      List<?> findMenus = menuFinder.findMenus(new SWTBot().activeShell().widget, matcher, true);
      log.debug(findMenus);
      if (findMenus.isEmpty())
        throw new WidgetNotFoundException("Could not find a menu item"); //$NON-NLS-1$
      return new SWTBotMenu((MenuItem) findMenus.get(0), matcher);
    } finally {
View Full Code Here

  public SWTBotMenu contextMenu(String label) throws WidgetNotFoundException {
    EventContextMenuFinder finder = new EventContextMenuFinder();
    try {
      finder.register();
      notify(SWT.MenuDetect);
      List<MenuItem> menus = finder.findMenus(withMnemonic(label));
      if (menus.isEmpty())
        throw new WidgetNotFoundException("Could not find a menu item");
      return new SWTBotMenu(menus.get(0));
    } finally {
      finder.unregister();
View Full Code Here

      notify(SWT.MouseMove);
      notify(SWT.MouseExit);
      notify(SWT.Deactivate);
      notify(SWT.FocusOut);
      log.debug(MessageFormat.format("Clicked on {0}", this)); //$NON-NLS-1$
      List<MenuItem> findMenus = menuFinder.findMenus(new SWTBot().activeShell().widget, matcher, true);
      return toSWTBotMenuItems(matcher, findMenus);
    } finally {
      menuFinder.unregister();
    }
  }
View Full Code Here

      notify(SWT.MouseMove);
      notify(SWT.MouseExit);
      notify(SWT.Deactivate);
      notify(SWT.FocusOut);
      log.debug(MessageFormat.format("Clicked on {0}", this)); //$NON-NLS-1$
      List<MenuItem> findMenus = menuFinder.findMenus(new SWTBot().activeShell().widget, matcher, true);
      return toSWTBotMenuItems(matcher, findMenus);
    } finally {
      menuFinder.unregister();
    }
  }
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.