Examples of SWTBot


Examples of net.sf.swtbot.SWTBot

      }
    });

    notify(SWT.Selection, createEvent(), tabFolder());

    new SWTBot().waitUntil(new DefaultCondition() {
      public boolean test() throws Exception {
        return isActive();
      }

      public String getFailureMessage() {
View Full Code Here

Examples of net.sf.swtbot.SWTBot

    notify(SWT.Deactivate);
    notify(SWT.FocusOut);
    if (log.isDebugEnabled())
      log.debug("Clicked on " + SWTUtils.getText(widget));

    List findMenus = finder.findMenus((Shell) new SWTBot().activeShell().widget, WidgetMatcherFactory.menuMatcher(menuItem), true);
    log.debug(findMenus);
    if (findMenus.isEmpty())
      throw new WidgetNotFoundException("Could not find a menu item");
    return new SWTBotMenu((MenuItem) findMenus.get(0));
  }
View Full Code Here

Examples of net.sf.swtbot.SWTBot

   * @return the tree item with the specified text.
   * @throws WidgetNotFoundException if the node was not found.
   */
  public SWTBotTreeItem getTreeItem(final String nodeText) throws WidgetNotFoundException {
    try {
      new SWTBot().waitUntil(new DefaultCondition() {
        public String getFailureMessage() {
          return "Could not find node with text " + nodeText;
        }

        public boolean test() throws Exception {
View Full Code Here

Examples of net.sf.swtbot.SWTBot

    display = finder.getDisplay();
    this.finder = finder;
    this.text = text;
    log = Logger.getLogger(getClass());
    try {
      new SWTBot().waitUntil(new DefaultCondition() {
        public boolean test() throws Exception {
          similarWidgets = findControls(matcher());
          widget = findWidget(index);
          return widget != null;
View Full Code Here

Examples of net.sf.swtbot.SWTBot

    display = finder.getDisplay();
    this.finder = finder;
    this.text = text;
    log = Logger.getLogger(getClass());
    try {
      new SWTBot().waitUntil(new DefaultCondition() {
        public boolean test() throws Exception {
          similarWidgets = findControls(matcher());
          widget = findWidget(index);
          return widget != null;
View Full Code Here

Examples of net.sf.swtbot.SWTBot

   *
   * @param itemText the item text.
   * @throws TimeoutException if the item could not be found.
   */
  private void waitForItem(final String itemText) throws TimeoutException {
    new SWTBot().waitUntil(new DefaultCondition() {
      public String getFailureMessage() {
        return "Could not find node with text " + itemText;
      }

      public boolean test() throws Exception {
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

    mnemonicTextMatcher = new WithMnemonic<Widget>(labelText);
    this.parent = parent;
  }

  protected boolean doMatch(Object obj) {
    List<? extends Widget> allWidgets = new SWTBot().widgets(Matchers.<Widget>anything(), parent(obj));

    int widgetIndex = allWidgets.indexOf(obj);

    ListIterator<? extends Widget> listIterator = allWidgets.listIterator(widgetIndex);
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

   * Activates the shell.
   *
   * @throws TimeoutException if the shell could not be activated
   */
  public void activate() throws TimeoutException {
    new SWTBot().waitUntil(new DefaultCondition() {
      public String getFailureMessage() {
        return "Timed out waiting for " + SWTUtils.toString(widget) + " to get activated"; //$NON-NLS-1$ //$NON-NLS-2$
      }

      public boolean test() throws Exception {
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

        // TODO investigate bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=259895
        if (!widget.isDisposed())
          widget.close();
      }
    });
    new SWTBot().waitUntil(new DefaultCondition() {
      public boolean test() throws Exception {
        return !isOpen();
      }

      public String getFailureMessage() {
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.SWTBot

      }
    });

    notify(SWT.Selection, createEvent(), parent);

    new SWTBot().waitUntil(new DefaultCondition() {
      public boolean test() throws Exception {
        return isActive();
      }

      public String getFailureMessage() {
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.