Package org.eclipse.swtbot.swt.finder

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


    bot.tree().expandNode();
  }
 
  @Before
  public void setUp() throws Exception {
    bot = new SWTBot();
    bot.tabItem("Tree").activate();
    bot.checkBox("Listen").deselect();
    bot.button("Clear").click();
    bot.checkBox("Horizontal Fill").select();
    bot.checkBox("Vertical Fill").select();
View Full Code Here


  @SuppressWarnings("unchecked")
  @Test
  public void waitsForShellToBecomeActive() throws Exception {

    long start = System.currentTimeMillis();
    new SWTBot().waitUntil(Conditions.shellIsActive(SHELL_TEXT));
    long end = System.currentTimeMillis();

    int time = (int) (end - start);
    assertThat(time, allOf(lessThan(200), greaterThanOrEqualTo(0)));
  }
View Full Code Here

    }
  };

  @Before
  public final void setupSWTBot() {
    bot = new SWTBot();
    controlFinder = new ControlFinder();
    menuFinder = new MenuFinder();
    finder = new Finder(controlFinder, menuFinder);
  }
View Full Code Here

  @Test
  public void waitsForShellToAppear() throws Exception {
    createShellAfter(100);
    long start = System.currentTimeMillis();
    Matcher<Shell> withText = withText(TEXT);
    new SWTBot().waitUntil(Conditions.waitForShell(withText));
    long end = System.currentTimeMillis();

    int time = (int) (end - start);
    assertThat(time, allOf(lessThan(800), greaterThanOrEqualTo(450)));
  }
View Full Code Here

  @Test
  public void waitsForWidgetToAppearInParent() throws Exception {
    long start = System.currentTimeMillis();

    WaitForObjectCondition condition = Conditions.waitForWidget(new EvaluateTrueAfterAWhile(500), shell);
    new SWTBot().waitUntil(condition);
    long end = System.currentTimeMillis();

    int time = (int) (end - start);
    assertThat(time, allOf(lessThan(1000), greaterThanOrEqualTo(500)));
    assertFalse(condition.getAllMatches().isEmpty());
View Full Code Here

    });
  }

  @Before
  public void prepareExample() throws Exception {
    new SWTBot().tabItem("Button").activate();
  }
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

   * @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; //$NON-NLS-1$
        }

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

   * @throws WidgetNotFoundException if the node was not found.
   * @since 1.3
   */
  public SWTBotTableItem getTableItem(final String itemText) throws WidgetNotFoundException {
    try {
      new SWTBot().waitUntil(new DefaultCondition() {
        public String getFailureMessage() {
          return "Could not find node with text " + itemText; //$NON-NLS-1$
        }

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

   * @throws WidgetNotFoundException if the node was not found.
   * @since 2.0
   */
  public SWTBotTableItem getTableItem(final int row) throws WidgetNotFoundException {
    try {
      new SWTBot().waitUntil(new DefaultCondition() {
        public String getFailureMessage() {
          return "Could not find table item for row " + row; //$NON-NLS-1$
        }

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

TOP

Related Classes of org.eclipse.swtbot.swt.finder.SWTBot

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.