6

Does anyone know of any Java library for programmatic web browsing?

Prowser doesn't cut it because there's no "push the button" method and Watij is limited to Internet Explorer Windows only.

Strudel
  • 809
  • 4
  • 10
  • 18

2 Answers2

12

htmlunit?

http://htmlunit.sourceforge.net/

The above link says:

... HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes...

karim79
  • 339,989
  • 67
  • 413
  • 406
  • HtmlUnit with all of it's dependencies takes 7.6MB. I guess it's not particularly lightweight. – Strudel Aug 19 '09 at 13:19
  • 2
    Only if it loads all of those. The size of the jars does not dictate how big the resultant executable is (leaving aside the actual VM size) – Brian Agnew Aug 19 '09 at 14:46
1

You may be able to find some of what you want in Selenium and especially when using Selenium Server like in this IBM article

Damo
  • 11,410
  • 5
  • 57
  • 74