Package net.sf.swtbot.wait

Examples of net.sf.swtbot.wait.DefaultCondition


        SWTBotText valueText = bot.text( "" );
        valueText.setText( name );
        bot.button( "Next >" ).click();

        // wait for check that entry doesn't exist yet
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.button( "Finish" ).isEnabled();
            }


            public String getFailureMessage()
            {
                return "Finish button is not enabled";
            }
        } );
        bot.button( "Finish" ).click();

        // wait till entry is created and selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "o=" + name );
            }


            public String getFailureMessage()
            {
                return "Could not select 'o=" + name + "'";
            }
        } );

        // delete the entry
        SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system", "o=" + name );
        contextMenu = browserTree.contextMenu( "Delete Entry" );
        contextMenu.click();
        bot.button( "OK" ).click();

        // wait till the parent ou=system is selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "ou=system" );
            }
View Full Code Here


        // click "Check Network Parameter" button
        SWTBotButton checkButton = bot.button( "Check Network Parameter" );
        checkButton.click();
        bot.sleep( 1000 );
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.activeShell().getText().equals( "Check Network Parameter" ) && bot.button( "OK" ) != null;
            }
View Full Code Here

        SWTBotText valueText = bot.text( "" );
        valueText.setText( "testCreateOrganizationEntry" );
        bot.button( "Next >" ).click();

        // wait for check that entry doesn't exist yet
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.tree( 0 ) != null;
            }


            public String getFailureMessage()
            {
                return "Could not find widget";
            }
        } );

        // click finish to create the entry
        bot.button( "Finish" ).click();

        // wait till entry is created and selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "o=testCreateOrganizationEntry" );
            }
View Full Code Here

        SWTBotText valueText = bot.text( "" );
        valueText.setText( "testCreatePersonEntry" );
        bot.button( "Next >" ).click();

        // wait for check that entry doesn't exist yet
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.tree( 0 ) != null;
            }


            public String getFailureMessage()
            {
                return "Could not find widget";
            }
        } );

        // enter sn value
        SWTBotTree tree = bot.tree( 0 );
        tree.select( "sn" );
        bot.text( "" ).setText( "test" );
        // click to finish editing of sn
        SWTBotTreeItem cnNode = SWTBotUtils.selectNode( bot, tree, "sn" );
        cnNode.click();

        // click finish to create the entry
        bot.button( "Finish" ).click();

        // wait till entry is created and selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "cn=testCreatePersonEntry" );
            }
View Full Code Here

        SWTBotText valueText = bot.text( "" );
        valueText.setText( "testCreateOrganizationEntry" );
        bot.button( "Next >" ).click();

        // wait for check that entry doesn't exist yet
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.tree( 0 ) != null;
            }


            public String getFailureMessage()
            {
                return "Could not find widget";
            }
        } );

        // click finish to create the entry
        bot.button( "Finish" ).click();

        // wait till entry is created and selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "O=testCreateOrganizationEntry" );
            }


            public String getFailureMessage()
            {
                return "Could not find widget";
            }
        } );

        // Now create a second entry under the previously created entry
        // to ensure that the selected parent is also upper case.

        // open "New Entry" wizard
        contextMenu = browserTree.contextMenu( "New Entry..." );
        contextMenu.click();

        // select entry creation method
        bot.radio( "Create entry from scratch" ).click();
        bot.button( "Next >" ).click();

        // select object classes
        bot.table( 0 ).select( "organization" );
        bot.button( "Add" ).click();
        bot.button( "Next >" ).click();

        // specify DN
        typeCombo = bot.comboBoxWithLabel( "RDN:" );
        typeCombo.setText( "O" );
        valueText = bot.text( "" );
        valueText.setText( "testCreateOrganizationEntry2" );

        // check preview text
        SWTBotText previewText = bot.text( "O=testCreateOrganizationEntry2,O=testCreateOrganizationEntry,ou=system" );
        assertEquals( "O=testCreateOrganizationEntry2,O=testCreateOrganizationEntry,ou=system", previewText.getText() );

        bot.button( "Next >" ).click();

        // wait for check that entry doesn't exist yet
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.tree( 0 ) != null;
            }


            public String getFailureMessage()
            {
                return "Could not find widget";
            }
        } );

        // click finish to create the entry
        bot.button( "Finish" ).click();

        // wait till entry is created and selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "O=testCreateOrganizationEntry2" );
            }
View Full Code Here

        SWTBotText valueText = bot.text( "" );
        valueText.setText( "kadmin/changepw@DOMAIN" );
        bot.button( "Next >" ).click();

        // wait for check that entry doesn't exist yet
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.tree( 0 ) != null;
            }


            public String getFailureMessage()
            {
                return "Could not find entry editor";
            }
        } );

        // click to finish editing of sn
        SWTBotTree tree = bot.tree( 0 );
        SWTBotTreeItem krbNode = SWTBotUtils.selectNode( bot, tree, "krb5PrincipalName" );
        krbNode.click();

        // enter sn value
        tree.select( "sn" );
        bot.text( "" ).setText( "test" );
        // click to finish editing of sn
        krbNode.click();

        // enter cn value
        tree.select( "cn" );
        bot.text( "" ).setText( "test" );
        // click to finish editing of cn
        krbNode.click();

        // click finish to create the entry
        bot.button( "Finish" ).click();

        // wait till entry is created and selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 )
                    .startsWith( "krb5PrincipalName=kadmin/changepw@DOMAIN" );
View Full Code Here

        // press "OK"
        SWTBotButton okButton = eBot.button( "OK" );
        okButton.click();

        // wait till Connections view become visible
        eBot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return eBot.view( "Connections" ) != null;
            }
View Full Code Here

        // press "OK"
        SWTBotButton okButton = eBot.button( "OK" );
        okButton.click();

        // wait till Connections view become visible
        eBot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return eBot.view( "Sleak" ) != null;
            }
View Full Code Here

    {
        final String[] currentPath = new String[]
            { pathList.remove( 0 ) };

        // wait till node becomes visible
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                List<String> nodes = item.getNodes();
                for ( String node : nodes )
View Full Code Here

        SWTBotText valueText = bot.text( "" );
        valueText.setText( "testCreateOrganizationEntry" );
        bot.button( "Next >" ).click();

        // wait for check that entry doesn't exist yet
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return bot.tree( 0 ) != null;
            }


            public String getFailureMessage()
            {
                return "Could not find widget";
            }
        } );

        // click finish to create the entry
        bot.button( "Finish" ).click();

        // wait till entry is created and selected in the tree
        bot.waitUntil( new DefaultCondition()
        {
            public boolean test() throws Exception
            {
                return browserTree.selection().get( 0 ).get( 0 ).startsWith( "o=testCreateOrganizationEntry" );
            }
View Full Code Here

TOP

Related Classes of net.sf.swtbot.wait.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.