0

I want to programmatically open a web page, execute some JS to fill out and submit a form, then examine the result. What is the best way to do this from Java?

Nick Heiner
  • 108,809
  • 177
  • 454
  • 689

2 Answers2

0

HtmlUnit does all what you want: opening a web page, executing some JS and submitting the form. I'm only not sure how you'd expect to "see" the result. At least, HtmlUnit returns the response in flavor of an InputStream.

See also:


Update: if you're actually looking for automated webpage testing, you may find Selenium interesting.

Community
  • 1
  • 1
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
0

Sounds like you need Cocoon WebTest

http://cocoon.apache.org/

mplungjan
  • 134,906
  • 25
  • 152
  • 209