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

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


    for (MenuItem menuItem : findMenus) {
      result.add(new SWTBotMenu(menuItem, matcher));
    }

    if (result.isEmpty())
      throw new WidgetNotFoundException("Could not find a menu item"); //$NON-NLS-1$
    return result;
  }
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

   */
  @SuppressWarnings("unchecked")
  public SWTBotTrayItem trayItemWithTooltip(String tooltip, int index) {
    java.util.List<SWTBotTrayItem> items = trayItems(allOf(widgetOfType(TrayItem.class), withTooltip(tooltip)));
    if (items.isEmpty() || items.size() <= index)
      throw new WidgetNotFoundException("Widget does not contain an item at index " + index);
    return items.get(index);
  }
View Full Code Here

      public Tray run() {
        return SWTUtils.display().getSystemTray();
      }
    });
    if (tray == null) {
      throw new WidgetNotFoundException("no system tray found");
    }
    return tray;
  }
View Full Code Here

            if ( item.cell( 0 ).equals( attributeType ) && item.cell( 1 ).equals( value ) )
            {
                return item;
            }
        }
        throw new WidgetNotFoundException( "Attribute " + attributeType + ":" + value + " not found." );
    }
View Full Code Here

            return null;
          }
        });

    if (menuItem == null) {
      throw new WidgetNotFoundException("MenuItem \"" + itemText
          + "\" not found.");
    } else {
      return new SWTBotMenu(menuItem);
    }
  }
View Full Code Here

       
        MenuItem menuItem = items.get(0);
        if (!menuItem.isDisposed()) {
             new SWTBotMenu(menuItem, matcher).click();
        } else {
            throw new WidgetNotFoundException("Racca!");
            //do nothing or print something in debug
        }
        return this;
    }
View Full Code Here

        for (SWTBotToolbarButton toolbarButton : toolbarButtons) {
            if (StringUtils.equals(toolbarButton.getToolTipText(), text)) {
                return toolbarButton;
            }
        }
        throw new WidgetNotFoundException(text);
    }
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

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.