[Webtest] setcheckbox problem ...

Hesteric Roman webtest@lists.canoo.com
Fri, 8 Aug 2003 14:38:13 +0200


Hi there!

	I tried to set check-box via:

<setcheckbox    stepid="PRIVATKUNDEOID" name="PRIVATKUNDEOID"
checked="true"/>

HTML:
<tr>
	<td width="160">
 	    <span class="us1">Privatkunde</span>
 </td>
 <td width="32">
 </td>
 <td>
 	   <input name="PRIVATKUNDEOID" type="checkbox">
 	   <input name="PRIVATKUNDEOID" type="hidden" value="off">
 </td>
</tr>

result:
Error

Exception
com.meterware.httpunit.MissingParameterValueException 
Exception
Parameter 'PRIVATKUNDEOID' must have the value 'off'. Attempted to set it
to: { on } 
Stacktrace
com.meterware.httpunit.MissingParameterValueException: Parameter
'PRIVATKUNDEOID' must have the value 'off'. Attempted to set it to: { on }
	at
com.meterware.httpunit.FormControl.claimValueIsRequired(FormControl.java:266
)
	at
com.meterware.httpunit.TextFormControl.claimValueIsRequired(FormControl.java
:660)
	at
com.meterware.httpunit.HiddenFieldFormControl.claimRequiredValues(FormContro
l.java:700)
	at
com.meterware.httpunit.FormParameter.setValues(FormParameter.java:91)
	at com.meterware.httpunit.WebForm.setParameter(WebForm.java:503)
	at
com.meterware.httpunit.WebRequest.setParameter(WebRequest.java:132)
	at
com.canoo.webtest.steps.request.ClickButton.addParameterToRequest(ClickButto
n.java:147)
	at
com.canoo.webtest.steps.request.ClickButton.setParameters(ClickButton.java:1
10)
	at
com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:90)
	at com.canoo.webtest.steps.Step.execute(Step.java:56)
	at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:32)
	at
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.ja
va:55)
	at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
	at org.apache.tools.ant.Task.perform(Task.java:317)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:334)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
	at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
	at org.apache.tools.ant.Task.perform(Task.java:317)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:334)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
	at org.apache.tools.ant.Main.runBuild(Main.java:610)
	at org.apache.tools.ant.Main.start(Main.java:196)
	at org.apache.tools.ant.Main.main(Main.java:235)

Why?!


Roman.