PhantomJS to screenshot website div for Spring MVC, Tomcat and iText use PhantomJS to screenshot website div for Spring MVC, Tomcat and iText use selenium selenium

PhantomJS to screenshot website div for Spring MVC, Tomcat and iText use


Should I keep trying this path just to get a screenshot of my website? I feel like it's a losing battle based on what's going on.

You are right, I think the approach of managing dependencies needs to be reconsidered, otherwise it will not be possible to make the site work. Donwloading jars manually one by one is unlikely to give good results, as there is no guarantee that the library versions are compatible with each other.

In fact the IncompatibleClassChangeErroris a sign that the jars downloaded are not compatible.

Your best bet is to use Maven to donwload most of the jars automatically. By declaring only the top level jars, Maven will then download the needed dependent jars (transitive dependencies) automatically, helping reduce and in many cases eliminate library incompatibility problems.

Once you have the site up and working, it's a matter of writing some scripts in Casper.js to access a page in your local server, click some buttons to generated PDFs etc. and then take some snapshots.

There is no special integration needed with Spring MVC, for the Spring MVC application it's transparent if the site is accessed by PhantomJS or a normal browser.