Hi,
I am using HttpUnit for JUnit testing and am unable to set a parameter that simulates setting a radio button option. I keep getting the following error:
org.mozilla.javascript.EvaluatorException: The undefined value has no properties.
when I execute the following:
form.setParameter("manageMINType", "handsetOnly");
The form says the param exists if I execute form.hasParameterNamed("manageMINType"), but when I try and print the value, it's null.
This seems like such a simple thing to do, I must be missing something.
Any help would be greatly appreciated.
Thanks, Steve
The HTML is: <form name="manageMINForm" method="POST" action="/dhs/home/manageMIN.do"> <table border='0' width='70%' align='center'> <tr><td> <div class='manageMINType'> <div class='manageMINTypeSectionLabel'> Manage MIN Type </div> <table border="0" width="97%"> <tr> <td align='center' width='33%' class='manageMINLabel'> <input type="radio" name="manageMINType" value="retailToWholesale" onclick="enableR2W()" id="retailToWholesale">Retail to Wholesale </td> <td align='center' width='33%' class='manageMINLabel'> <input type="radio" name="manageMINType" value="wholesaleToRetail" onclick="enableW2R()" id="wholesaleToRetail">Wholesale to Retail </td> <td align='center' width='33%' class='manageMINLabel'> <input type="radio" name="manageMINType" value="handsetOnly" onclick="enableHandset()" id="handsetOnly">Handset Only </td> </tr> </table>...
Log in to post a comment.
Hi,
I am using HttpUnit for JUnit testing and am unable to set a parameter that simulates setting a radio button option. I keep getting the following error:
org.mozilla.javascript.EvaluatorException: The undefined value has no properties.
when I execute the following:
form.setParameter("manageMINType", "handsetOnly");
The form says the param exists if I execute
form.hasParameterNamed("manageMINType"), but when I try and print the value, it's null.
This seems like such a simple thing to do, I must be missing something.
Any help would be greatly appreciated.
Thanks,
Steve
The HTML is:
<form name="manageMINForm" method="POST" action="/dhs/home/manageMIN.do">
<table border='0' width='70%' align='center'>
<tr><td>
<div class='manageMINType'>
<div class='manageMINTypeSectionLabel'>
Manage MIN Type
</div>
<table border="0" width="97%">
<tr>
<td align='center' width='33%' class='manageMINLabel'>
<input type="radio" name="manageMINType" value="retailToWholesale" onclick="enableR2W()" id="retailToWholesale">Retail to Wholesale
</td>
<td align='center' width='33%' class='manageMINLabel'>
<input type="radio" name="manageMINType" value="wholesaleToRetail" onclick="enableW2R()" id="wholesaleToRetail">Wholesale to Retail
</td>
<td align='center' width='33%' class='manageMINLabel'>
<input type="radio" name="manageMINType" value="handsetOnly" onclick="enableHandset()" id="handsetOnly">Handset Only
</td>
</tr>
</table>...