Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
414 views
in Technique[技术] by (71.8m points)

webkit - Headless browser with full javascript support for java

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.

  1. I heard about QtWebKit binding for Python but my application will be in Java or is there a Java binding for WebKit or QtWebKit?

  2. Does anyone know a good headless browser for Java with full javascript support?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...