Is there any way to capture complete browser screen using java or javascript?
<p>I want to capture complete browser, I am using below code to take screenshot....</p>

<pre><code>function takeSnapShot($filename)
{
    try 
    {
            var robot = new java.awt.Robot();
            var toolkit = new java.awt.Toolkit.getDefaultToolkit();
            var screenSize = toolkit.getScreenSize();
            var screenRect = new java.awt.Rectangle(0, 0, screenSize.width, screenSize.height);
            var image = robot.createScreenCapture(screenRect);
            var file = new java.io.File("D:/"+$filename+".png");
            javax.imageio.ImageIO.write(image, "png", file);
        }
    catch (e) 
    {
            Packages.java.lang.System.out.println(e);
        }
}
</code></pre>

<p>But it is capturing only visible part of the browser....so is there any way to capture complete browser screen?</p>

<p>Thanks in advance!!!</p>
