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

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


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

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


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

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

    boolean shouldFindInvisibleControls = finder.shouldFindInvisibleControls();
    finder.setShouldFindInvisibleControls(true);
    try {
      return bot.widgets(matcher, control);
    } catch (Exception e) {
      throw new WidgetNotFoundException("Could not find any control inside the view " + partReference.getPartName(), e); //$NON-NLS-1$
    } finally {
      finder.setShouldFindInvisibleControls(shouldFindInvisibleControls);
    }
  }
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

                return menuItem;
            }
        } );
        if ( menuItem == null )
        {
            throw new WidgetNotFoundException( "Could not find menu: " + Arrays.asList( texts ) );
        }

        // click
        click( menuItem );
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

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

        public boolean test() throws Exception {
          return getItem(row) != null;
        }
      });
    } catch (TimeoutException e) {
      throw new WidgetNotFoundException("Timed out waiting for table item in row " + row, e); //$NON-NLS-1$
    }
    return new SWTBotTableItem(getItem(row));
  }
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.