Package net.sf.swtbot.widgets

Examples of net.sf.swtbot.widgets.WidgetNotFoundException


          return null;
        }
      }
    });
    if (editor == null)
      throw new WidgetNotFoundException("There is no active editor");
    return new SWTBotEclipseEditor((IEditorReference) editor);
  }
View Full Code Here


      CommandFinder finder = new CommandFinder();
      l = finder.findCommand(new StringMatcher(label));
    }

    if ((l == null) || (l.size() < 1))
      throw new WidgetNotFoundException("Unable to find the menu item " + label + " in this view");

    if (index >= l.size())
      throw new WidgetNotFoundException("No widget found at index " + index);

    return (SWTBotViewMenu) l.get(index);
  }
View Full Code Here

      if (item.getToolTipText().equals(tooltip)) {
        return item;
      }
    }

    throw new WidgetNotFoundException("Unable to find toolitem with the given tooltip '" + tooltip + "'");
  }
View Full Code Here

   * @since 1.0
   */
  public SWTBotText text(String text, int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new DecoratingAndMatcher(new ClassMatcher(Text.class), new TextMatcher(text)));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any text widget");
    return new SWTBotText((Text) findControls.get(index));
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found.
   */
  public SWTBotTable table(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(Table.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotTable((Table) findControls.get(index));
  }
View Full Code Here

   * @throws WidgetNotFoundException if the table is not found.
   */
  public SWTBotTable table(SWTBotShell shell) throws WidgetNotFoundException {
    List findControls = finder.findControls(shell.widget, new ClassMatcher(Table.class), true);
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotTable((Table) findControls.get(0));
  }
View Full Code Here

   * @since 1.0
   */
  public SWTBotList list(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(org.eclipse.swt.widgets.List.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotList((org.eclipse.swt.widgets.List) findControls.get(index));
  }
View Full Code Here

   * @since 1.0
   */
  public SWTBotTree tree(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(Tree.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any tree");
    return new SWTBotTree((Tree) findControls.get(index));
  }
View Full Code Here

        view.show();

        List<Tree> findControls = new ControlFinder().findControls( view.widget, new ClassMatcher( Tree.class ), true );
        if ( findControls.isEmpty() )
        {
            throw new WidgetNotFoundException( "Could not find Connections tree" );
        }
        return new SWTBotTree( findControls.get( 0 ) );
    }
View Full Code Here

        view.show();

        List<Tree> findControls = new ControlFinder().findControls( view.widget, new ClassMatcher( Tree.class ), true );
        if ( findControls.isEmpty() )
        {
            throw new WidgetNotFoundException( "Could not find LDAP Browser tree" );
        }
        return new SWTBotTree( findControls.get( 0 ) );
    }
View Full Code Here

TOP

Related Classes of net.sf.swtbot.widgets.WidgetNotFoundException

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.