← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #179984]: Can we capture screenshot failed test cases in test link

 

Question #179984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/179984

Dileep Sarkar posted a new comment:
Hi RAI,

Please find the solution for the screecapture by using java.robot(). its
working fine.

	public void captureScreen(String fileName) throws Exception 
	{     
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();   
		Rectangle screenRectangle = new Rectangle(screenSize);   
		Robot robot = new Robot();    
		BufferedImage image = robot.createScreenCapture(screenRectangle);    
		ImageIO.write(image, "png", new File(fileName));  
		}
very qucik response dude  thanks lot!!!!

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.