Forum Discussion

GungHo's avatar
GungHo
New Contributor
12 years ago

addComboBox

Hi,
I have a project with some groovy script test steps,
in one i try to display a dialog with a comboBox in it.
But i can not work out how to use the format with choice.

This is my code:
def dialog = com.eviware.soapui.support.UISupport.createConfigurationDialog( "Please provide test data" );

dialog.addComboBox( "CB1", "Combo1" );
dialog.addComboBox( "CB2", choice, "Combo1" );

def map = new java.util.HashMap();
dialog.show( map )

The problem is howto define the variable choice in CB2 and howto load choice with my alternatives.

I looked everywhere with no success.

Thanks
  • GungHo's avatar
    GungHo
    New Contributor
    I found this on a webpage:

    public void addComboBox( String label, Object[] objects, String tooltip );

    Which I guess means that "objects" is of type Object[]

    But the question is still how do I define a variable of type Object[] and how do i load it with my
    predefined values to be used by the combobox ?