Examples of SWTBotTreeItem


Examples of net.sf.swtbot.widgets.SWTBotTreeItem

     * @throws Exception the exception
     */
    public void testCreateEntryWithSlash() throws Exception
    {
        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
        SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        systemNode.expand();
        systemNode.expand();

        // open "New Entry" wizard
        SWTBotMenu 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( "krb5Principal" );
        bot.button( "Add" ).click();
        bot.table( 0 ).select( "person" );
        bot.button( "Add" ).click();
        bot.button( "Next >" ).click();

        // specify DN
        SWTBotCombo typeCombo = bot.comboBoxWithLabel( "RDN:" );
        typeCombo.setText( "krb5PrincipalName" );
        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
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

     * @throws Exception the exception
     */
    public void testCreateOrganizationEntry() throws Exception
    {
        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
        SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        systemNode.expand();
        systemNode.expand();

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

View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

     * @throws Exception the exception
     */
    public void testCreatePersonEntry() throws Exception
    {
        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
        SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        systemNode.expand();
        systemNode.expand();

        // open "New Entry" wizard
        SWTBotMenu 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( "inetOrgPerson" );
        bot.button( "Add" ).click();
        bot.button( "Next >" ).click();

        // specify DN
        SWTBotCombo typeCombo = bot.comboBoxWithLabel( "RDN:" );
        typeCombo.setText( "cn" );
        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
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

     * @throws Exception the exception
     */
    public void testCreateUpperCaseOrganizationEntries() throws Exception
    {
        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );
        SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        systemNode.expand();
        systemNode.expand();

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

View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

     */
    public static SWTBotTreeItem selectEntry( final SWTEclipseBot bot, final SWTBotTree tree,
        final boolean expandChild, final String... path ) throws Exception
    {
        List<String> pathList = new ArrayList<String>( Arrays.asList( path ) );
        SWTBotTreeItem entry = null;

        while ( !pathList.isEmpty() )
        {
            String currentPath = pathList.remove( 0 );

            if ( entry == null )
            {
                entry = tree.getTreeItem( currentPath );
            }
            else
            {
                // adjust current path, because the label is decorated with the number of children
                currentPath = adjustNodeName( entry, currentPath );
                entry = entry.getNode( currentPath );
            }

            final SWTBotTreeItem tempEntry = entry;
            UIThreadRunnable.asyncExec( bot.getDisplay(), new UIThreadRunnable.VoidResult()
            {
                public void run()
                {
                    tempEntry.select();
                }
            } );

            if ( !pathList.isEmpty() || expandChild )
            {
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

            public boolean test() throws Exception
            {
                if ( nextName != null )
                {
                    String adjustedNodeName = nextName != null ? adjustNodeName( entry, nextName ) : null;
                    SWTBotTreeItem node = entry.getNode( adjustedNodeName );
                    if ( node == null )
                    {
                        return false;
                    }
                }
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

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

        // click finish to create the entry
        SWTBotUtils.asyncClick( bot, bot.button( "Finish" ), new DefaultCondition()
        {
            public boolean test() throws Exception
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

                return "Could not find entry editor";
            }
        } );

        SWTBotTree tree = bot.tree( 0 );
        SWTBotTreeItem krbNode = tree.getTreeItem( "krb5PrincipalName" );

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

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

        // click finish to create the entry
        SWTBotUtils.asyncClick( bot, bot.button( "Finish" ), new DefaultCondition()
        {
            public boolean test() throws Exception
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

        createReferralEntry();

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );

        // select ou=system, don't expand yet
        final SWTBotTreeItem systemNode = SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE",
            "ou=system" );

        // expand ou=system, that reads the referral and opens the referral dialog
        UIThreadRunnable.asyncExec( bot.getDisplay(), new UIThreadRunnable.VoidResult()
        {
            public void run()
            {
                systemNode.expand();
            }
        } );
        bot.sleep( 1000 );

        // click OK in the referral dialog
        bot.button( "OK" ).click();
        SWTBotUtils.selectEntry( bot, browserTree, true, "DIT", "Root DSE", "ou=system" );

        // ensure that the referral URL and target is visible
        SWTBotTreeItem referralNode = systemNode.getNode( "ldap://localhost:" + ldapService.getIpPort()
            + "/ou=users,ou=system" );
        assertNotNull( referralNode );
        SWTBotUtils.selectEntry( bot, browserTree, false, "DIT", "Root DSE", "ou=system", "ldap://localhost:"
            + ldapService.getIpPort() + "/ou=users,ou=system" );
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem


    void editValue( String attributeType, String value )
    {
        cancelEditValue();
        SWTBotTreeItem treeItem = getTreeItem( attributeType, value );
        treeItem.doubleClick();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.