Package org.eclipse.swtbot.swt.finder.waits

Examples of org.eclipse.swtbot.swt.finder.waits.DefaultCondition


   * Activates the shell.
   *
   * @throws TimeoutException if the shell could not be activated
   */
  public void activate() throws TimeoutException {
    new SWTBot().waitUntil(new DefaultCondition() {
      public String getFailureMessage() {
        return "Timed out waiting for " + SWTUtils.toString(widget) + " to get activated"; //$NON-NLS-1$ //$NON-NLS-2$
      }

      public boolean test() throws Exception {
View Full Code Here


        // TODO investigate bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=259895
        if (!widget.isDisposed())
          widget.close();
      }
    });
    new SWTBot().waitUntil(new DefaultCondition() {
      public boolean test() throws Exception {
        return !isOpen();
      }

      public String getFailureMessage() {
View Full Code Here

      }
    });

    notify(SWT.Selection, createEvent(), parent);

    new SWTBot().waitUntil(new DefaultCondition() {
      public boolean test() throws Exception {
        return isActive();
      }

      public String getFailureMessage() {
View Full Code Here

     * @param serverName
     *      the name of the server
     */
    public void waitForServer( final String serverName )
    {
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                for ( SWTBotTreeItem item : getServersTree().getAllItems() )
                {
View Full Code Here

     * @param serverName
     *      the server name
     */
    public void waitForServerStart( final String serverName )
    {
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                Server server = getServer( serverName );
                if ( server != null )
View Full Code Here

     * @param serverName
     *      the name of the server
     */
    public void waitForServerStop( final String serverName )
    {
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                Server server = getServer( serverName );
                if ( server != null )
View Full Code Here

  protected SWTBotMenu contextMenu(final Control control, final String text) {
    Matcher<MenuItem> withMnemonic = withMnemonic(text);
    final Matcher<MenuItem> matcher = allOf(widgetOfType(MenuItem.class), withMnemonic);
    final ContextMenuFinder menuFinder = new ContextMenuFinder(control);

    new SWTBot().waitUntil(new DefaultCondition() {
      public String getFailureMessage() {
        return "Could not find context menu with text: " + text; //$NON-NLS-1$
      }

      public boolean test() throws Exception {
View Full Code Here

    }


    public void waitTillExportFinished( final String file, final int expectedFileSize )
    {
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                File f = new File( file );
                return f.exists() && f.length() > expectedFileSize;
View Full Code Here

        eBot.button( "Next >" ).click();
        eBot.comboBoxWithLabel( "LDIF File:" ).setText( file );
        eBot.button( "Finish" ).click();

        // wait till LDIF file exists
        eBot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                File f = new File( file );
                return f.exists() && f.length() > 200; // is actually 217 bytes
View Full Code Here

        eBot.comboBoxWithLabel( "DSML File:" ).setText( file );
        eBot.radio( "DSML Request" ).click();
        eBot.button( "Finish" ).click();

        // wait till DSML file exists
        eBot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                File f = new File( file );
                return f.exists() && f.length() > 600; // is actually 651 bytes
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.waits.DefaultCondition

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.