18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

can't capture screen shot of whole window

chaudharypareshchaudharyparesh Members
edited November -1 in Sahi - Open Source
Hi All,

I m using This function for screen shot

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:/path/"+$filename+".png");
javax.imageio.ImageIO.write(image, "png", file);
} catch (e) {
print(e);
}
}


It's Works Good Before install mac theme in ubuntu.

After install MacTheme in ubuntu ,This function capture screen shot but not whole window.
bottom portion of screenshot display only black background ,

IF anybody use Ubuntu then try to install mactheme And after Run Sahi screenshot function.

For Mac theme Link http://www.webupd8.org/2010/09/make-ubuntu-look-like-mac-osx-in.html


Any idea

Thanks

Comments

Sign In or Register to comment.