I have this JSP page:
<html>
<body>
<!-- _javascript_ ------------------------------------------------------>
<script language="_javascript_">
function openReport()
{
var myform = document.forms['report-input'];
myform.target = "newt";
return false;
}
</script>
<!-- End of _javascript_ ----------------------------------------------->
<form id="form1" name="report-input" target="" method="POST" action="" >
<input type="submit" value="go" />
</form>
hi
</body>
</html>
And I am using the following test case to access this page:
public void testNow() throws Exception
{
beginAt("/mserver/jsp/test.jsp");
setWorkingForm("form1");
submit();
return;
}
When I run the test, I get the following exception:
org.mozilla._javascript_.EvaluatorException: The undefined value has no properties. (httpunit; line 3)
at org.mozilla._javascript_.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:76)
at org.mozilla._javascript_.Context.reportRuntimeError(Context.java:591)
at org.mozilla._javascript_.Context.reportRuntimeError
(Context.java:630)
at org.mozilla._javascript_.Context.reportRuntimeError0(Context.java:600)
at org.mozilla._javascript_.Undefined.reportError(Undefined.java:138)
Can anyone help me with this issue ?? Looks more like an issue with httpunit, but I am just wondering if anyone else has faced similar problems.
Thanks a lot.
- [Jwebunit-users] Exception while changing a form's target t... Nilesh Trivedi
- Re: [Jwebunit-users] Exception while changing a form's... Staffan Olsson
- Re: [Jwebunit-users] Exception while changing a fo... Staffan Olsson
- Re: [Jwebunit-users] Exception while changing ... Nilesh Trivedi
- Re: [Jwebunit-users] Exception while chang... Staffan Olsson
