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 null;
      }
    });
    if (item == null)
      throw new WidgetNotFoundException("Could not find node with text: " + nodeText); //$NON-NLS-1$
    return item;
  }
View Full Code Here

        try {
          IWorkbench workbench = PlatformUI.getWorkbench();
          workbench.showPerspective(perspectiveDescriptor.getId(), workbench.getActiveWorkbenchWindow());
        } catch (Exception e) {
          // TODO: what's the correct exception for such an error? Own exception class?
          throw new WidgetNotFoundException(e.getMessage(), e);
        }
      }
    });
  }
View Full Code Here

        public void run() {
          action.run();
        }
      });
    else
      throw new WidgetNotFoundException("There is no action or contribution id to execute."); //$NON-NLS-1$
  }
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."); //$NON-NLS-1$
  }
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

        List<SWTBotCommand> command = finder.findCommand(equalTo(label));
        return command.get(index);
      }
      return menuItems.get(index);
    } catch (Exception e) {
      throw new WidgetNotFoundException("Could not find view menu with label " + label + " at index " + index, e); //$NON-NLS-1$ //$NON-NLS-2$
    }
  }
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

  public SWTBotToolbarPushButton toolbarPushButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarPushButton)
      return (SWTBotToolbarPushButton) 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.