[Webtest] problem with javascript
Marc Guillemot
webtest@lists.canoo.com
Mon, 25 Oct 2004 12:21:37 +0200
Salut Séb,
Httpunit doesn't support JavaScript as good as your browser does (See
http://httpunit.sourceforge.net/doc/faq.html#javascript).
I'm working on replacing httpunit with htmlunit for a better javascript support. I hope beeing able to commit in a few
days, perhaps will this solve your problem (NB: it may take more as a few days before we get a stable version using
htmlunit).
Marc.
Sébastien Mathy wrote:
> Hi,
> I have a problem with javascript.
> I want to test an html page that contains :
>
> <form name="actionform" method="get" action="task_overview.php">
> <script type="text/javascript" language="JavaScript">
> <!--
> function CheckAll2() {
> for (var i=0; i < document.forms['actionform'].elements.length; i++) {
> var e = document.forms['actionform'].elements[i];
> if (e.name != 'checkit')
> e.checked = document.forms['actionform'].checkit.checked;
> }
> }
> //-->
> </script>
> <input type="checkbox" name="checkit" onclick="CheckAll2();" />
> <input name="mark[]" type="checkbox" value="1010">
> </form>
>
> When I check the checkit checkbox, all checkbox should be checked (it
> works in my browser).
> In my test I do this :
> <setinputfield name="checkit" value="on" />
> <setinputfield name="action" value="-2" />
> <new_setcheckbox name="checkit" checked="true"/>
>
> But it doesn't work. Have you some advices about that?
>
> Thanks
>