Package net.sf.swtbot.finder

Examples of net.sf.swtbot.finder.ControlFinder


  public void run() {
    if ((view.output == null) || view.output.isDisposed() || !view.actionMonitor.isChecked())
      return;

    display = view.output.getDisplay();
    controlFinder = new ControlFinder();

    Control control = display.getCursorControl();
    display.getCursorLocation();

    if (control == null) {
View Full Code Here


  /**
   * Constructs a bot.
   */
  public SWTBot() {
    this(new ControlFinder(), new MenuFinder());
  }
View Full Code Here

  /**
   * Constructs an eclipse bot.
   */
  public SWTEclipseBot() {
    super(new ControlFinder(new EclipseDefaultChildrenResolver(), new EclipseDefaultParentResolver()), new MenuFinder());
  }
View Full Code Here

   * @throws ClassCastException Thrown if the reference is not an {@link IViewReference}.
   * @deprecated This has been replaced with the <code>SWTBotView(IViewReference reference)</code> constructor. If the
   *             passed in reference can not be cast it will throw a {@link ClassCastException}.
   */
  public SWTBotView(IWorkbenchPartReference reference) throws WidgetNotFoundException, ClassCastException {
    super(findWidget(reference, new Finder(new ControlFinder(new EclipseDefaultChildrenResolver(), new EclipseDefaultParentResolver()),
        new MenuFinder())));

    view = reference;
  }
View Full Code Here

   * @param reference the view reference.
   * @throws WidgetNotFoundException if the widget is <code>null</code> or widget has been disposed.
   * @since 1.2
   */
  public SWTBotView(IViewReference reference) throws WidgetNotFoundException {
    super(findWidget(reference, new Finder(new ControlFinder(new EclipseDefaultChildrenResolver(), new EclipseDefaultParentResolver()),
        new MenuFinder())));

    view = reference;
  }
View Full Code Here

  public AbstractSWTBot(Widget w) throws WidgetNotFoundException {
    if (w == null)
      throw new WidgetNotFoundException("The widget was null.");
    if (w.isDisposed())
      throw new WidgetNotFoundException("The widget was disposed." + SWTUtils.toString(w));
    finder = new Finder(new ControlFinder(), new MenuFinder());
    widget = w;
    display = w.getDisplay();
    log = Logger.getLogger(getClass());
  }
View Full Code Here

  public AbstractSWTBot(Widget w) throws WidgetNotFoundException {
    if (w == null)
      throw new WidgetNotFoundException("The widget was null.");
    if (w.isDisposed())
      throw new WidgetNotFoundException("The widget was disposed." + SWTUtils.toString(w));
    finder = new Finder(new ControlFinder(), new MenuFinder());
    widget = w;
    display = w.getDisplay();
    log = Logger.getLogger(getClass());
  }
View Full Code Here

  /**
   * Constructs a bot.
   */
  public SWTBot() {
    this(new ControlFinder(), new MenuFinder());
  }
View Full Code Here

    public static SWTBotTree getConnectionsTree( SWTEclipseBot bot ) throws Exception
    {
        SWTBotView view = bot.view( "Connections" );
        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

    public static SWTBotTree getLdapBrowserTree( SWTEclipseBot bot ) throws Exception
    {
        SWTBotView view = bot.view( "LDAP Browser" );
        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.finder.ControlFinder

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.