bot.button( "Next >" ).click();
// specify DN
SWTBotCombo typeCombo = bot.comboBoxWithLabel( "RDN:" );
typeCombo.setText( "O" );
SWTBotText valueText = bot.text( "" );
valueText.setText( "testCreateOrganizationEntry" );
SWTBotUtils.asyncClick( bot, bot.button( "Next >" ), 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
SWTBotUtils.asyncClick( bot, bot.button( "Finish" ), new DefaultCondition()
{
public boolean test() throws Exception
{
return browserTree.selection().get( 0 ).get( 0 ).startsWith( "O=testCreateOrganizationEntry" );
}
public String getFailureMessage()
{
return "Could not find 'O=testCreateOrganizationEntry'";
}
} );
// Now create a second entry under the previously created entry
// to ensure that the selected parent is also upper case.
// open "New Entry" wizard
SWTBotUtils.asyncClick( bot, browserTree.contextMenu( "New Entry..." ), new DefaultCondition()
{
public boolean test() throws Exception
{
return bot.shell( "New Entry" ) != null;
}
public String getFailureMessage()
{
return "Could not find dialog 'New Entry'";
}
} );
// 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() );
SWTBotUtils.asyncClick( bot, bot.button( "Next >" ), new DefaultCondition()
{
public boolean test() throws Exception
{