[Jwebunit-development] Problems using setFormelement
Brought to you by:
henryju
|
From: Laurent D. <ldu...@ya...> - 2004-06-15 18:48:01
|
Hi,
I have a test that does something like this:
public void testFoo() {
gotoPage("foo");
setFormElement(FOO_ELEM, "fooValue");
.
.
.
<here I do all sorts of stuff>
.
.
.
gotoPage("foo");
setFormElement(FOO_ELEM, "barValue");
}
The second setFormElement gives me this error:
com.meterware.httpunit.FormParameter$UnusedParameterValueException:
Attempted to assign to parameter 'EntriesPerPage' the extraneous value '2'.
at com.meterware.httpunit.FormParameter.setValues(FormParameter.java:92)
at com.meterware.httpunit.WebForm.setParameter(WebForm.java:533)
at com.meterware.httpunit.WebForm.setParameter(WebForm.java:526)
at
net.sourceforge.jwebunit.HttpUnitDialog.setFormParameter(HttpUnitDialog.java:299)
at net.sourceforge.jwebunit.WebTester.setFormElement(WebTester.java:789)
at
net.sourceforge.jwebunit.WebTestCase.setFormElement(WebTestCase.java:317)
I suspect that the second setFormElement creates a multi-valued
attibute, but my form only accepts onve value for the attribute. Am I
correct in my assessment? If so, how do I fix this? If not, what is the
problem with my code?
L
|