Package org.eclipse.swtbot.swt.finder.widgets

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


    }


    List<String> getAttributeValues()
    {
        SWTBotTree tree = bot.tree();
        List<String> attributes = new ArrayList<String>();
        int rowCount = tree.rowCount();
        for ( int i = 0; i < rowCount; i++ )
        {
            String attribute = tree.cell( i, 0 );
            String value = tree.cell( i, 1 );
            attributes.add( attribute + ": " + value );
        }
        return attributes;
    }
View Full Code Here


    }


    void cancelEditValue()
    {
        SWTBotTree tree = bot.tree( 0 );
        tree.getTreeItem( "objectClass" ).click();
    }
View Full Code Here

    }


    void addValue( String attributeType )
    {
        SWTBotTree tree = bot.tree();
        tree.getTreeItem( attributeType ).click();
        ContextMenuHelper.clickContextMenu( bot.tree(), "New Value" );
    }
View Full Code Here

    }


    private SWTBotTreeItem getTreeItem( String attributeType, String value )
    {
        SWTBotTree tree = bot.tree();
        SWTBotTreeItem[] allItems = tree.getAllItems();
        for ( SWTBotTreeItem item : allItems )
        {
            if ( item.cell( 0 ).equals( attributeType ) && item.cell( 1 ).equals( value ) )
            {
                return item;
View Full Code Here

     *      the tree associated with the 'Servers' view
     */
    private SWTBotTree getServersTree()
    {
        view.show();
        SWTBotTree tree = view.bot().tree();
        return tree;
    }
View Full Code Here

     * @return
     *      the servers count found in the 'Servers' view
     */
    public int getServersCount()
    {
        SWTBotTree tree = getServersTree();
        if ( tree != null )
        {
            return tree.rowCount();
        }

        return 0;
    }
View Full Code Here

    public void testExportImportLdifWithGermanUmlautInDN() throws Exception
    {
        URL url = Platform.getInstanceLocation().getURL();
        final String file = url.getFile() + "ImportExportTest.ldif";

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );

        SWTBotUtils.selectEntry( eBot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
            "cn=Wolfgang K\u00f6lbel" );

        // export LDIF
View Full Code Here

    public void testExportImportDsmlWithGermanUmlautInDN() throws Exception
    {
        URL url = Platform.getInstanceLocation().getURL();
        final String file = url.getFile() + "ImportExportTest.dsml";

        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );

        SWTBotUtils.selectEntry( eBot, browserTree, false, "DIT", "Root DSE", "ou=system", "ou=users",
            "cn=Wolfgang K\u00f6lbel" );

        // export DSML
View Full Code Here

     *             the exception
     */
    @Test
    public void testImportContextEntryRefreshesRootDSE() throws Exception
    {
        final SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );

        // add a new partition
        Partition partition = new JdbmPartition();
        partition.setId( "example" );
        partition.setSuffix( "dc=example,dc=com" );
View Full Code Here

        String destFile = url.getFile() + "ImportDontUpdateUiTest.ldif";
        InputStream is = getClass().getResourceAsStream( "ImportExportTest_ImportDontUpdateUI.ldif" );
        String ldifContent = IOUtils.toString( is );
        FileUtils.writeStringToFile( new File( destFile ), ldifContent );

        SWTBotTree browserTree = SWTBotUtils.getLdapBrowserTree( eBot );
        SWTBotUtils.selectEntry( eBot, browserTree, true, "DIT", "Root DSE", "ou=system", "ou=users" );

        long fireCount0 = EventRegistry.getFireCount();

        // import the LDIF
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

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.