Package org.eclipse.swtbot.swt.finder.exceptions

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException


   */
  public SWTBotMenu contextMenu(final String text) throws WidgetNotFoundException {
    if (widget instanceof Control) {
      return contextMenu((Control) widget, text);
    }
    throw new WidgetNotFoundException("Could not find menu: " + text); //$NON-NLS-1$
  }
View Full Code Here


        }
        return results;
      }
    });
    if (foundItems.isEmpty())
      throw new WidgetNotFoundException("Could not find node with text: " + nodeText); //$NON-NLS-1$
    return foundItems;
  }
View Full Code Here

        public boolean test() throws Exception {
          return getItem(nodeText) != null;
        }
      });
    } catch (TimeoutException e) {
      throw new WidgetNotFoundException("Timed out waiting for tree item " + nodeText, e); //$NON-NLS-1$
    }
    return new SWTBotTreeItem(getItem(nodeText));
  }
View Full Code Here

      matcher = allOf(widgetOfType(ExpandItem.class), matcher);
      WaitForObjectCondition<? extends Widget> waitForWidget = waitForWidget(matcher, widget);
      new SWTBot().waitUntilWidgetAppears(waitForWidget);
      return new SWTBotExpandItem((ExpandItem) waitForWidget.get(0), matcher);
    } catch (TimeoutException e) {
      throw new WidgetNotFoundException("Timed out waiting for expandBar item " + matcher, e);
    }
  }
View Full Code Here

   * @throws WidgetNotFoundException if there is no active view
   */
  public SWTBotView activeView() {
    IViewReference view = workbenchContentsFinder.findActiveView();
    if (view == null)
      throw new WidgetNotFoundException("There is no active view"); //$NON-NLS-1$
    return new SWTBotView(view, this);
  }
View Full Code Here

   * @throws WidgetNotFoundException if there is no active view
   */
  public SWTBotEditor activeEditor() {
    IEditorReference editor = workbenchContentsFinder.findActiveEditor();
    if (editor == null)
      throw new WidgetNotFoundException("There is no active editor"); //$NON-NLS-1$
    return new SWTBotEditor(editor, this);
  }
View Full Code Here

   * @return the active perspective in the active workbench page
   */
  public SWTBotPerspective activePerspective() {
    IPerspectiveDescriptor perspective = workbenchContentsFinder.findActivePerspective();
    if (perspective == null)
      throw new WidgetNotFoundException("There is no active perspective"); //$NON-NLS-1$
    return new SWTBotPerspective(perspective, this);
  }
View Full Code Here

   */
  private SWTBotCTabItem findPage(Matcher<? extends Widget> titleMatcher) {
    WithItem<CTabItem> itemMatcher = WithItem.withItem(allOf(widgetOfType(CTabItem.class), titleMatcher));
    if (itemMatcher.matches(tabFolder))
      return new SWTBotCTabItem(itemMatcher.get(0));
    throw new WidgetNotFoundException("Could not find page with title " + titleMatcher);
  }
View Full Code Here

  public SWTBotToolbarDropDownButton toolbarDropDownButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarDropDownButton)
      return (SWTBotToolbarDropDownButton) abstractButton;

    throw new WidgetNotFoundException("Unable to find toolitem with the given tooltip '" + tooltip + "'"); //$NON-NLS-1$ //$NON-NLS-2$
  }
View Full Code Here

  public SWTBotToolbarRadioButton toolbarRadioButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarRadioButton)
      return (SWTBotToolbarRadioButton) abstractButton;

    throw new WidgetNotFoundException("Unable to find toolitem with the given tooltip '" + tooltip + "'"); //$NON-NLS-1$ //$NON-NLS-2$
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.exceptions.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.