Package org.eclipse.swtbot.swt.finder.waits

Examples of org.eclipse.swtbot.swt.finder.waits.DefaultCondition


   *
   * @throws TimeoutException if the condition does not evaluate to true after {@link SWTBotPreferences#getTimeout()}
   *             milliseconds.
   */
  public static void waitForDisplayToAppear() {
    waitUntil(new DefaultCondition() {

      public String getFailureMessage() {
        return "Could not find a display"; //$NON-NLS-1$
      }

View Full Code Here


   */
  protected SWTBotMenu contextMenu(final Control control, final String text) {
    final Matcher<?> matcher = allOf(instanceOf(MenuItem.class), withMnemonic(text));
    final ContextMenuFinder menuFinder = new ContextMenuFinder(control);

    new SWTBot().waitUntil(new DefaultCondition() {
      public String getFailureMessage() {
        return "Could not find context menu with text: " + text; //$NON-NLS-1$
      }

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

   * Activates the shell.
   *
   * @throws TimeoutException if the shell could not be activated
   */
  public void activate() throws TimeoutException {
    new SWTBot().waitUntil(new DefaultCondition() {
      public String getFailureMessage() {
        return "Timed out waiting for " + SWTUtils.toString(widget) + " to get activated"; //$NON-NLS-1$ //$NON-NLS-2$
      }

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

        // TODO investigate bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=259895
        if (!widget.isDisposed())
          widget.close();
      }
    });
    new SWTBot().waitUntil(new DefaultCondition() {
      public boolean test() throws Exception {
        return !isOpen();
      }

      public String getFailureMessage() {
View Full Code Here

     * @param connection
     *      the connection
     */
    public void waitForConnectionOpened( final Connection connection )
    {
        new SWTWorkbenchBot().waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return connection.getJNDIConnectionWrapper().isConnected();
            }
View Full Code Here

     * @param connection
     *      the connection
     */
    public void waitForConnectionClosed( final Connection connection )
    {
        new SWTWorkbenchBot().waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return !connection.getJNDIConnectionWrapper().isConnected();
            }
View Full Code Here

     * @throws TimeoutException
     */
    public static void asyncClick( final SWTWorkbenchBot bot, final SWTBotButton button, final ICondition waitCondition )
        throws TimeoutException
    {
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return button.isEnabled();
            }
View Full Code Here

            {
                entry.expand();
            }
        } );

        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                if ( nextName != null )
                {
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

        ErrorDialog.AUTOMATED_MODE = false;

        try
        {
            runnable.run();
            bot.waitUntil( new DefaultCondition()
            {
                public boolean test() throws Exception
                {
                    String shellText = bot.activeShell().getText();
                    for ( String label : labels )
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.waits.DefaultCondition

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.