Package net.sf.swtbot.widgets

Examples of net.sf.swtbot.widgets.WidgetNotFoundException


   * @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

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

        public void run() {
          action.run();
        }
      });
    else
      throw new WidgetNotFoundException("There is no action or contribution id to execute.");
  }
View Full Code Here

            throw new RuntimeException("Failed to execute the command - " + commandID, e); //$NON-NLS-1$
          }
        }
      });
    } else
      throw new WidgetNotFoundException("The command to could not be execute due to the lack of an ID.");
  }
View Full Code Here

   */
  public String getText() throws WidgetNotFoundException {
    try {
      return cmdItem.getName();
    } catch (NotDefinedException e) {
      throw new WidgetNotFoundException(e.getMessage());
    }
  }
View Full Code Here

      boolean shouldFindInvisibleControls = finder.shouldFindInvisibleControls();
      finder.setShouldFindInvisibleControls(true);
      try {
        return (Widget) finder.findControls(control, new AllMatcher(), true).get(1);
      } catch (Exception e) {
        throw new WidgetNotFoundException("Could not find any control inside the view " + view.getPartName(), e);
      } finally {
        finder.setShouldFindInvisibleControls(shouldFindInvisibleControls);
      }
    }
    throw new WidgetNotFoundException("Could not find any control inside the view " + view.getPartName());
  }
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.