Search in sources :

Example 16 with YesButton

use of org.eclipse.reddeer.swt.impl.button.YesButton in project jbosstools-hibernate by jbosstools.

the class CriteriaEditor method runCriteria.

/**
 * Executes criteria
 */
public void runCriteria() {
    new DefaultToolItem("Run criteria").click();
    try {
        Shell s = new DefaultShell("Open Session factory");
        new YesButton(s).click();
        new WaitWhile(new ShellIsAvailable(s));
    } catch (RedDeerException e) {
        log.warn("Open Session factory question dialog was expected");
    } finally {
        new WaitWhile(new JobIsRunning());
    }
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) YesButton(org.eclipse.reddeer.swt.impl.button.YesButton)

Aggregations

YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)16 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)16 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)14 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)14 Shell (org.eclipse.reddeer.swt.api.Shell)7 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)7 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)6 DataSourceExplorerView (org.eclipse.reddeer.eclipse.datatools.connectivity.ui.dse.views.DataSourceExplorerView)3 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)3 DefaultToolItem (org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem)3 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)3 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)3 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)2 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)2 WidgetIsFound (org.eclipse.reddeer.core.condition.WidgetIsFound)2 TableItem (org.eclipse.reddeer.swt.api.TableItem)2 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)2 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)2 Test (org.junit.Test)2 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1