I followed Web page Capture and save to image using phantomjs lib and able to save screenshot on my local.
However when executing PhantomJS command with Jenkins, following error is generated: "_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL." and screen shot is not saved on Jenkins.
Can anyone please guide me?