try the below function this may help you, jus give the path of the location you want save the screen shot
Public Function DesktopCapture On Error Resume Next Dim filename, Lfilename,datestamp datestamp = Day(date) &"-"& Month(date) &"-"& Year(Date) &"_"& Hour(Now) &"."& Minute(Now) &"."& Second(Now) filename = datestamp & ".png" Lfilename = Path you want save the snapshot & "\" & filename Desktop.CaptureBitmap Lfilename, true Reporter.ReportEvent micWarning,"","<<img src='" & Lfilename & "'>" End Function On Sep 20, 4:26 am, "Dhanasekar Subramaniam" <[EMAIL PROTECTED]> wrote: > hi > you can use capture error option under one of the QTP settings,it comes > under options r settings. > > Thanks > Dhanasekar Shttp://testingideas.wordpress.com > > 2008/9/19 KANDUKURI NARESH <[EMAIL PROTECTED]> > > > > > Hi, > > According to my knowledge, > > even you can use the "CaptureBitmap" option for each and every hierarchy... > > where you feel that Error will come... > > For Ex: > > > Browser("gmail").CaprureBitMap "path\knk.bmp", 1 > > > It is better to save in the ".bmp" format... > > > On Wed, Sep 17, 2008 at 12:50 PM, Mathi_QA Engineer <[EMAIL PROTECTED] > > > wrote: > > >> Hi, > >> Anyone please help me how to take the screen shot of the failure test > >> cases and add them in the test results for the Jaav application.. It > >> would be helpful If you help with the script.. > > >> Thanks in Advance > > -- > Regards, > Dhanasekar S.http://testingideas.wordpress.com > --------------------------------------------------------- > Let us make the World Greenerhttp://www.greenpeace.org/international/ > ----------------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -~----------~----~----~----~------~----~------~--~---
