2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2007


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] How to get the screen shot of window of type int frame


  • Subject: Re: [QF-Test] How to get the screen shot of window of type int frame
  • From: "Robert Lahmer, QFS support" <support@?.de>
  • Date: Tue, 03 Apr 2007 17:45:38 +0200


Hello Nagaraj,

maybe the following SUT script will be helpful for you - just change
componentID and fileName according to your demands:


from java.io import FileOutputStream
from java.awt.image import BufferedImage
from com.keypoint import PngEncoderB

componentID = "frameSwing2.table"
com = rc.getComponent(componentID);
size = com.getSize()
bi = BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB)
com.paint(bi.getGraphics())

if "${qftest:windows}":
   fileName = "c:\\tmp\\cmpshot.png"
else:
   fileName = "/tmp/cmpshot.png"
fos = FileOutputStream(fileName)
fos.write(PngEncoderB(bi).pngEncode())
fos.close


Best regards,
   Robert


--On Dienstag, April 03, 2007 18:25:13 +0530 "Parandi, Nagraj S (Nagraj)**
CTR **" <nagarajs@?.com> wrote:

Hello,
	How to get the screen shot of a window of type int frame at any point of
execution? QFtest gets the screen shot only when there is an error. So is
there any way to get the screen shot of internal frame type window at any
point during the execution of the script?

Warm Regards,
Nagaraj
Alcatel-Lucent
INS India Development Centre
11th Km., Bannerghatta Road,
Arakere, Bangalore - 560076.
Direct Ph: +91 806 622 2064
Fax:       +91-80-2550 0071
e-mail:    nagarajs@?.com


_______________________________________________
qftest-list mailing list
qftest-list@?.de
http://www.qfs.de/mailman/listinfo/qftest-list




--
Robert Lahmer
Quality First Software GmbH                http://www.qfs.de
Tulpenstr. 41                           Tel: +49 8171 919874
DE-82538 Geretsried                     Fax: +49 8171 919876
GF: Gregor Schmid, Karlheinz Kellerer     HRB München 140833