We are trying to capture screenshot of the page on click on Next button. We have tried AttachScreenshot OOTB but it captures the next page screenshot and that too only wrapper section content is visible but not the embedded sections.
We had a thought that since next button will take the control to the next screen and then activity is getting executed. To solve this we tried using a custom function (defined in userworkform) which will call this OOTB activity (run script action on Next button click). But still its capturing the next page screenshot.
We also tried using Java java.awt.Robot but Pega is blocking the javascript which will get executed while java code runs.
Can someone please assist? I read somewhere that phantom js can be used. But we dont know how to use this in Pega.
@PareshN5090 please see the answer provided in [this post](http://Can we auto capture screenshot of section?). There were no users who got this to work.
The GenAI check on our documentation tells us this:
PhantomJS can be used with Pega to capture screenshots. You can set up a Tomcat server to support taking and storing screen captures on a server rather than on a client. This involves deploying a WAR file on a Tomcat server, editing the tomcat-users.xml file to add a role and user, and starting the Tomcat server. You then log in to your Pega Platform application and make the necessary changes to enable screen captures.
This is a GenAI-powered tool. All generated answers require validation against the provided references.
Enabling server-side screen captures for application documents
If there is no further response on the forum you may need to engage your Pega AE to arrange for a consultancy visit for this.