I have an HTML page that contains multiple forms.  Each form has a
different name; however, inputs fields contained within each form have
the same name.  For example:

<div id="section1">
<form name="form1">
<input type="hidden" name="type" value="Dryness"/>
</form>
</div>
<div id="section2">
<form name="form2">
<input type="hidden" name="type" value="Grade"/>
</form>
</div>

When I use assertFormPresent to check for the existance each form, the
tests pass.  However, if I try to do something like this:

assertFormPresent("form1");
assertFormElementEquals("type", "Dryness");
assertFormPresent("form2");
assertFormElementEquals("type", "Grade");

the second assertFormElementEquals fails with the message: expected:
<Grade> but was: <Dryness>.  Is there a way for me to compare the
values of input fields with the same name that exist in differently
named forms on the same page?  My assuption was that the second
assertFormPresent would switch the focus of the
assertFormElementEquals call to the second form.

Thanks!

-Dave


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to