I have been using HtmlUnit (the developers did a great job) as an headless browser for some of my previous applications but the javascript support isn't working for some website that my next application will be accessing.
I heard about QtWebKit binding for Python but my application will be in Java or is there a Java binding for WebKit or QtWebKit?
Does anyone know a good headless browser for Java with full javascript support?
Both Firefox, as well as Chrome Browsers, support Headless automation testing which is an implementation of the code in Firefox and Chrome without GUI.
SlimerJS is similar to PhantomJs, except that it runs on top of Gecko, the browser engine of Mozilla Firefox, instead of Webkit, and it can be headless or not. Simple example var webpage = require('webpage'). create(); webpage .
The main use cases for headless browsers are: Test automation in modern web applications (web testing) Taking screenshots of web pages. Running automated tests for JavaScript libraries.
Nathan Ridley's answer to another similar question is the most complete one I've found so far.
Anyway, if everything fails, you could use a Python or JS alternative, expose its funcionality as a webservice inside your server, and then your Java application could use the headless browser's funcionality through the webservice. It would be a pain to set up, but it may be a viable alternative if nothing else works as desired.
Also, there are some "non-headless" browser wrappers for Java; maybe it would be possible to build a testing solution around those, depending on the requirements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With