This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

iframe not supported for jwebUnit  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any of you know jWebUnit or HttpUnit?

i am running a very simple code (here is a snippet)
the html code is this:

the iframe is this:

<form action="TypeMultiple.jsp" method="post" name="stuffform">
<input type="checkbox" name="is_correct" value="1" >
correct answer

<input type="submit" name="Submit" class=button value="submit">

the root frame includes:

<iframe name="addanswer" src="../cms/TypeMultiple.jsp?&redirected=1" width="100%" height="500" marginwidth=0 marginheight=0 frameborder=0 scrolling=yes></iframe>

the jWebUnit code includes this:

assertFramePresent("addanswer");//not needed, but i wanted to be sure

this works fine, but when i add:
it fails either because :

net.sourceforge.jwebunit.UnableToSetFormException: Attempted to set form to null.
at net.sourceforge.jwebunit.HttpUnitDialog.setWorkingForm(


junit.framework.AssertionFailedError: Did not find form element with name [is_correct].

i have searched through the documetnation and saw there was a patch for iframe in the case of onload() on the previous release, but it doesn't solve my problem.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!