Form not being submitted
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <ABF4E02DA33A6F4BAC41122C7086C8990C2C5D@bromail01.internal.gxs.com> |
I have run into a strange problem building an HTTPUnit test. The site
that I am testing is using frames and javascript and up until this point
I have had no problems. However, to complete a workflow process on this
website, I have to click through a series of forms and on the last form
when I try and submit the form, nothing seems to happen and I get no
errors either. The following is a snippet showing the <FORM> tag, and
submit button along with a javascript function that gets called from
OnSubmit.
<FORM METHOD=POST ACTION="e2kActionResult.jsp" onSubmit="return
validateEmail()">
.
.
.
<TABLE align=center>
<TR>
<TD align=right><INPUT TYPE=SUBMIT
VALUE="Terminate"></TD>
<TD align=left><INPUT TYPE=BUTTON VALUE="Cancel"
ONCLICK="cancelOperation()"></TD>
</TR>
</TABLE>
<INPUT TYPE=HIDDEN NAME=OPERATION VALUE=TERMINATETP>
<INPUT TYPE=HIDDEN NAME="edi_Address">
</FORM>
Here is the validateEmail() function, declared in a <SCRIPT> tag on the
same page.:
function validateEmail() {
var emailValue =
document.forms[0].EMAIL_ADDRESS_ENTERED.value
flag = checkMultipleEmail(emailValue)
if(flag == false)
alert("Check the email address entered")
return flag
}
I am not clicking the Cancel button. I have tried using form.submit(),
form.submitNoButtons(). I have even tried button.click() on the submit
button. Nothing seems to work. I suspect this has to do with the
javascript onsubmit function but I am not sure.
Rob Whitener
Test Automation Specialist
GXS
2701 N Rocky Point Rd.
Tampa, FL. 33607
813-496-3513