I am new to HttpUnit and been trying to simulate a login. The parameters for email, password are jsp so I was able to use setParameter("xxx", password). But I am having a real problem with clicking the "Enter" button. The button calls a javascript function validateForm().
Part of the form is like
<tr>
<td valign=top><a href="javascript:validateForm();" tabindex="0" accesskey="e"><img src="images/logon-button-enter.gif" width="60" height="21" border=0
alt="enter"></a></td>
</tr>
and the function validateForm(){
if statements ...
document.frmLogin.action = "login";
document.frmLogin.submit();
}
Any idea how I can simulate a click button? Any help would be much appreicate. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi:
I am new to HttpUnit and been trying to simulate a login. The parameters for email, password are jsp so I was able to use setParameter("xxx", password). But I am having a real problem with clicking the "Enter" button. The button calls a javascript function validateForm().
Part of the form is like
<tr>
<td valign=top><a href="javascript:validateForm();" tabindex="0" accesskey="e"><img src="images/logon-button-enter.gif" width="60" height="21" border=0
alt="enter"></a></td>
</tr>
and the function validateForm(){
if statements ...
document.frmLogin.action = "login";
document.frmLogin.submit();
}
Any idea how I can simulate a click button? Any help would be much appreicate. Thanks.