Note: The SWTEclipeBot should be used if testing an eclipse based product/plug-in.
7980818283848586878889
} }); notify(SWT.Selection, createEvent(), tabFolder()); new SWTBot().waitUntil(new DefaultCondition() { public boolean test() throws Exception { return isActive(); } public String getFailureMessage() {
100101102103104105106107108109110
notify(SWT.Deactivate); notify(SWT.FocusOut); if (log.isDebugEnabled()) log.debug("Clicked on " + SWTUtils.getText(widget)); List findMenus = finder.findMenus((Shell) new SWTBot().activeShell().widget, WidgetMatcherFactory.menuMatcher(menuItem), true); log.debug(findMenus); if (findMenus.isEmpty()) throw new WidgetNotFoundException("Could not find a menu item"); return new SWTBotMenu((MenuItem) findMenus.get(0)); }
423424425426427428429430431432433
* @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; } public boolean test() throws Exception {
114115116117118119120121122123124
display = finder.getDisplay(); this.finder = finder; this.text = text; log = Logger.getLogger(getClass()); try { new SWTBot().waitUntil(new DefaultCondition() { public boolean test() throws Exception { similarWidgets = findControls(matcher()); widget = findWidget(index); return widget != null;
135136137138139140141142143144145
* * @param itemText the item text. * @throws TimeoutException if the item could not be found. */ private void waitForItem(final String itemText) throws TimeoutException { new SWTBot().waitUntil(new DefaultCondition() { public String getFailureMessage() { return "Could not find node with text " + itemText; } public boolean test() throws Exception {
8384858687888990919293
*/ public void activate() throws TimeoutException { // FIXME: this seems to be some issue on gtk where shells don't get activated. I'm running this in sync to see // if this could be an issue. setFocus(); new SWTBot().waitUntil(new DefaultCondition() { public String getFailureMessage() { return "Timed out waiting for " + SWTUtils.toString(widget) + " to get activated"; } public boolean test() throws Exception {
122123124125126127128129130131132
asyncExec(new VoidResult() { public void run() { getShell().close(); } }); new SWTBot().waitUntil(new DefaultCondition() { public boolean test() throws Exception { return !isOpen(); } public String getFailureMessage() {