windowless webbrowser
I need some kind of web开发者_如何学JAVAbrowser backend (don't know if it's proper name for such thing). Generally I need high abstraction of html page with controls, ability to create events (button push or selecting an item from combobox), javascript interpreter, etc.
Are there anything of that kind?
I think you want something like HtmlUnit. From the page:
HtmlUnit is a "GUI-Less browser for Java programs". It models HTML documents and provides an API that allows you to invoke pages, fill out forms, click links, etc. just like you do in your "normal" browser.
It has fairly good JavaScript support (which is constantly improving) and is able to work even with quite complex AJAX libraries, simulating either Firefox or Internet Explorer depending on the configuration you want to use.
You might also want to check out Selenium which lets you control a real browser programmatically.
精彩评论