org.eclipse.swtbot.swt.finder.waits.WaitForObjectCondition Java Examples
The following examples show how to use
org.eclipse.swtbot.swt.finder.waits.WaitForObjectCondition.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SWTBotTimeGraphEntry.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
@Override protected SWTBotRootMenu contextMenu(final Control control) throws WidgetNotFoundException { Rectangle bounds = absoluteLocation(); if (bounds == null) { return null; } UIThreadRunnable.syncExec(new VoidResult() { @Override public void run() { final Event event = new Event(); event.time = (int) System.currentTimeMillis(); event.display = control.getDisplay(); event.widget = control; event.x = bounds.x + widget.getTimeDataProvider().getNameSpace() / 2; event.y = bounds.y + bounds.height / 2; control.notifyListeners(SWT.MenuDetect, event); } }); select(); WaitForObjectCondition<Menu> waitForMenu = Conditions.waitForPopupMenu(control); new SWTBot().waitUntilWidgetAppears(waitForMenu); return new SWTBotRootMenu(waitForMenu.get(0)); }
Example #2
Source File: AbstractTest.java From tlaplus with MIT License | 5 votes |
/** * @return waits for the TLA+ Toolbox shell to come available */ protected SWTBotShell waitForToolboxShell() { final WaitForObjectCondition<Shell> waitForShell = Conditions.waitForShell(WithText .<Shell> withText("TLA+ Toolbox")); bot.waitUntil(waitForShell); return new SWTBotShell(waitForShell.get(0)); }
Example #3
Source File: BotPropertiesView.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public void selectTab(String text) { final WaitForObjectCondition<TabbedPropertyList> waitForTabbedPropertyList = Conditions.waitForWidget( widgetOfType(TabbedPropertyList.class), botView.getWidget()); bot.waitUntil(waitForTabbedPropertyList); if (waitForTabbedPropertyList.getAllMatches().isEmpty()) { throw new WidgetNotFoundException("No TabbedPropertyList found."); } final TabbedPropertyList tabbedPropertyList = waitForTabbedPropertyList.get(0); final TabbedPropertyListBot tabbedPropertyListBot = new TabbedPropertyListBot(tabbedPropertyList, botView.getWidget(), bot); tabbedPropertyListBot.selectTab(text); }
Example #4
Source File: TabbedPropertyListBot.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public TabbedPropertyListBot selectTab(String text) { final WaitForObjectCondition<ListElement> waitForTabs = Conditions.waitForWidget(widgetOfType(ListElement.class), parent); bot.waitUntil(waitForTabs); final List<ListElement> tabs = waitForTabs.getAllMatches(); for (final ListElement tab : tabs) { if (Objects.equals(text, tab.getTabItem().getText())) { new ListElementBot(tab).click(); } } return this; }
Example #5
Source File: XtextSWTBot.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
private List<Shell> shellsWithRegex(String regex) { Matcher<Shell> withRegex = withRegex(regex); WaitForObjectCondition<Shell> waitForShell = waitForShell(withRegex); waitUntilWidgetAppears(waitForShell); return waitForShell.getAllMatches(); }