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

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


        }
        return results;
      }
    });
    if (foundItems.isEmpty())
      throw new WidgetNotFoundException("Could not find node with text: " + nodeText); //$NON-NLS-1$
    return foundItems;
  }
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

      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.widget(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

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

        // click
        click( menuItem );
View Full Code Here

  public void waitUntilWidgetAppears(ICondition waitForWidget) {
    try {
      waitUntil(waitForWidget);
    } catch (TimeoutException e) {
      throw new WidgetNotFoundException("Could not find widget.", e); //$NON-NLS-1$
    }
  }
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

   * @param description the description of the widget, this will be reported by {@link #toString()}
   * @throws WidgetNotFoundException if the widget is <code>null</code> or widget has been disposed.
   */
  public AbstractSWTBot(T w, SelfDescribing description) throws WidgetNotFoundException {
    if (w == null)
      throw new WidgetNotFoundException("The widget was null."); //$NON-NLS-1$

    this.widget = w;
    if (description == null)
      this.description = new WidgetTextDescription(w);
    else
      this.description = description;

    if (w.isDisposed())
      throw new WidgetNotFoundException("The widget {" + description + "} was disposed." + SWTUtils.toString(w)); //$NON-NLS-1$ //$NON-NLS-2$

    display = w.getDisplay();
    log = Logger.getLogger(getClass());
  }
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.