Examples of SWTBotTreeItem


Examples of net.sf.swtbot.widgets.SWTBotTreeItem

        createReferralEntry();

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );

        // expand ou=system, that reads the referral and opens the referral dialog
        final SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        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();
        systemNode.expand();
        bot.sleep( 1000 );

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

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

        createReferralEntry();

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );

        // expand ou=system, that reads the referral and opens the referral dialog
        final SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        UIThreadRunnable.asyncExec( bot.getDisplay(), new UIThreadRunnable.VoidResult()
        {
            public void run()
            {
                systemNode.expand();
            }
        } );
        bot.sleep( 1000 );

        // click Cancel in the referral dialog
        bot.button( "Cancel" ).click();
        systemNode.expand();
        bot.sleep( 1000 );

        // ensure that the referral URL and target is not visible
        SWTBotTreeItem referralNode = systemNode.getNode( "ldap://localhost:" + ldapServer.getIpPort()
            + "/ou=users,ou=system" );
        assertNull( referralNode );
    }
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

        createReferralEntry();

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );

        // expand ou=system, that reads the referral and opens the referral dialog
        final SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        systemNode.expand();
        systemNode.expand();
        bot.sleep( 1000 );

        // ensure that the referral entry is not visible
        SWTBotTreeItem referralNode = systemNode.getNode( "ldap://localhost:" + ldapServer.getIpPort()
            + "/ou=users,ou=system" );
        assertNull( referralNode );
    }
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

        createReferralEntry();

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( bot );

        // expand ou=system, that reads the referral and opens the referral dialog
        final SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        systemNode.expand();
        systemNode.expand();
        bot.sleep( 1000 );

        // ensure that the referral entry is visible
        SWTBotTreeItem referralNode = systemNode.getNode( "cn=referralDialogTest" );
        assertNotNull( referralNode );
        SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system", "cn=referralDialogTest" );
    }
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

    }


    private void createAndDeleteEntry( final SWTBotTree browserTree, final String name ) throws Exception
    {
        SWTBotTreeItem systemNode = SWTBotUtils.selectNode( bot, browserTree, "DIT", "Root DSE", "ou=system" );
        systemNode.expand();
        systemNode.expand();

        //        bot.sleep( 1000 );
        SWTBotMenu contextMenu = browserTree.contextMenu( "New Entry..." );
        contextMenu.click();
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

        throws Exception
    {
        List<String> pathList = new ArrayList<String>( Arrays.asList( path ) );
        String currentPath = pathList.remove( 0 );

        SWTBotTreeItem child = browserTree.getTreeItem( currentPath );
        child.select();

        if ( !pathList.isEmpty() )
        {
            child.expand();
            return selectNode( bot, child, pathList );
        }
        else
        {
            return child;
View Full Code Here

Examples of net.sf.swtbot.widgets.SWTBotTreeItem

            {
                return "Could not find widget";
            }
        } );

        SWTBotTreeItem child = item.getNode( currentPath[0] );
        child.select();

        if ( !pathList.isEmpty() )
        {
            child.expand();
            child.expand();
            return selectNode( bot, child, pathList );
        }
        else
        {
            return child;
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
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.