1

I want submit form with some parameters using httpunit. I wrote smt like

WebForm form = response.getFormWithID(formId);
System.out.println(Arrays.toString(form1.getParameterNames())); //it contains "a"
form.setParameter( "a", "bla-bla"); //exception
form.submit();

But it throws runtime exception org.mozilla.javascript.EvaluatorException: "Form" is not a constructor. Where I'm wrong?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132

1 Answers1

1

HttpUnit is old and no longer maintained, and also not very widely used.

HtmlUnit is its spiritual successor. It does the same job, but it has a better API, it works better, and it's actively maintained.

skaffman
  • 398,947
  • 96
  • 818
  • 769