Capture screen shot for unexpected Errors. - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: Capture screen shot for unexpected Errors. (/Thread-Capture-screen-shot-for-unexpected-Errors) Pages:
1
2
|
Capture screen shot for unexpected Errors. - uma87 - 08-10-2011 Hi, While running my tests, i get some unexpected Errors like " Error found click here to go back " . for this situation i added a recovery senario. but my requirement is can i capture or make a note of such errors to confirm that error has occured/exists . Also is there any option to check after which step it occured? RE: Capture screen shot for unexpected Errors. - sshukla12 - 08-10-2011 U can capture the screen shot for the error. Use this in the recovery scenario u had created, and save at desired location. Code: Desktop.CaptureBitmap(Imagename,True) Correct me if wrong Regards, Sankalp RE: Capture screen shot for unexpected Errors. - uma87 - 08-10-2011 If i Write this line "Desktop.CaptureBitmap(Imagename,True)" at the start or end of the script will it capture all the errors and save in required loaction or i have define this every time through out the script? Image name here is the one which we save in recovary scenario? RE: Capture screen shot for unexpected Errors. - sshukla12 - 08-10-2011 Desktop.CaptureBitmap(Imagename,True) will take the screen shot of the current active screen. If its an error msg box it will capture it. So its better 2 use it in recovery scenario. When error occurs recovery scenario will triggers and this will capture the screen shot of the error. Correct me if wrong Regards, Sankalp RE: Capture screen shot for unexpected Errors. - akankhyap@yahoo.co.in - 01-07-2012 HI, The method suggested by you to include the screenshot code in the function invoked by recovery scenario is just taking the screenshot of the QTp window without the runtime error window. I am unable to figure out how to take the screenshot of the runtime error window (thrown due to object identification failing) and save it in a location. I am able to invoke my recovery scenario and call the function (below is the code for the function called by the recovery scenario): Code: Function RecoveryFunction1(Object, Method, Arguments, retVal) But unfortunately its not takeing the screenshot of the runtime error window. Can anyone pls help!!! Thanks Akankhya RE: Capture screen shot for unexpected Errors. - ravi.gajul - 01-07-2012 Go to tools--->options--->Run-->ScreenCapture then select the check box "Save still image captures to result" and choose "for errors and warnings" in dropdown you will then see the Error snapshot in the result file generated. RE: Capture screen shot for unexpected Errors. - ravinarkhede29 - 10-29-2014 hiii. I am facing same problem. I want application screenshot along with error message that QTP/UFT popup showing(screenshot of error message) Please help me Thank you RE: Capture screen shot for unexpected Errors. - ravinarkhede29 - 10-30-2014 @ ravi.gajul Not showing error popup Only showing application screenshot RE: Capture screen shot for unexpected Errors. - ravi.gajul - 10-30-2014 I doubt in your case whether this would work.This is mainly for object based errors and checkpoints.However, if you are using QTP 9.5 or above, you have an option to save the entire test run as a movie. It definitely is an overhead in terms of space and performance but it really helps when debugging becomes a nightmare. RE: Capture screen shot for unexpected Errors. - vinod123 - 11-03-2014 @ 'uma87' you should start with following code Code: RegisterUserFunc "Page", "CaptureScreenshot", "CaptureScreenshot" Code: Browser("micclass:=Browser").Page("micclass:=Page").CaptureScreenshot micPass, "<h4 align = ""Center"">Page SuccessFully Displayed</h4>" Code: Public Sub CaptureScreenshot( ByRef Sender, ByVal micStatus, ByVal descriptionStr ) |