Jossnaz - 2006-08-22

Hello

When I try to use             form.setCheckbox("RESPONSE","ChoiceA", true);
I get
Exception: com.meterware.httpunit.FormParameter$IllegalCheckboxParameterException: Attempted to invoke method 'setCheckbox' for parameter 'RESPONSE/ChoiceA', which is not a unique checkbox control.

But hey! It definatly is unique, perhaps several checkboxes with name RESPONSE, but only one with value ChoiceA.

So what's wrong?

What kind of solution is there?

thanks

jossi

used on the page

http://www.pharmasquare.org/tetrodo3/secured/action/qtitest.do?method=getAssessmentTest&assessmentTestId=qtiexamples&collectionPath=qti2.1&testCollectionPath=&assessmentItemId=luggageChoice

code:

            WebConversation wc = new WebConversation();

            // Obtain the main page on the meterware web site
            WebRequest request = new GetMethodWebRequest( "http://www.pharmasquare.org/tetrodo3/secured/action/qtitest.do?method=getAssessmentTest&assessmentTestId=qtiexamples&collectionPath=qti2.1&testCollectionPath=&assessmentItemId=luggageChoice" );
            WebResponse response = wc.getResponse( request );
           
            WebForm form = response.getForms()[0];

            form.setCheckbox("RESPONSE","ChoiceA", false);