|
|
|
|
Capture screen shot for unexpected Errors.
|
|
08-10-2011, 02:23 PM
Post: #1
|
|||
|
|||
|
Capture screen shot for unexpected Errors.
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? |
|||
|
08-10-2011, 02:31 PM
Post: #2
|
|||
|
|||
|
RE: Capture screen shot for unexpected Errors.
U can capture the screen shot for the error.
Use this in the recovery scenario u had created, and save at desired location. Desktop.CaptureBitmap(Imagename,True) Correct me if wrong Regards, Sankalp |
|||
|
08-10-2011, 02:49 PM
Post: #3
|
|||
|
|||
|
RE: Capture screen shot for unexpected Errors.
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? |
|||
|
08-10-2011, 02:53 PM
Post: #4
|
|||
|
|||
|
RE: Capture screen shot for unexpected Errors.
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 |
|||
|
01-07-2012, 02:50 AM
(This post was last modified: 01-07-2012 02:51 AM by akankhyap@yahoo.co.in.)
Post: #5
|
|||
|
|||
RE: Capture screen shot for unexpected Errors.
(08-10-2011 02:53 PM)sshukla12 Wrote: Desktop.CaptureBitmap(Imagename,True) will take the screen shot of the current active screen. 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): Function RecoveryFunction1(Object, Method, Arguments, retVal) path_error_file="C:\automation\qtp_screenshot\screenshot_app.png" Desktop.CaptureBitmap path_error_file,True Reporter.ReportEvent micFail,"Recovery scenario invoked","Recovery scenario invoked due to runtime error", path_error_file End Function But unfortunately its not takeing the screenshot of the runtime error window. Can anyone pls help!!! Thanks Akankhya |
|||
|
01-07-2012, 10:17 AM
Post: #6
|
|||
|
|||
|
RE: Capture screen shot for unexpected Errors.
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. |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Using QTP to capture screen shot | ravi.gajul | 7 | 7,288 |
08-28-2012 02:52 PM Last Post: vinod123 |
|
| Run time errors in SAP when QTP running | dverlaque | 3 | 1,329 |
07-25-2012 11:26 AM Last Post: Ankesh |
|
| Unexpected file Format | vinayaksarode | 3 | 2,019 |
01-30-2012 09:49 PM Last Post: ravi.gajul |
|
| Getting unexpected Pop up message while using Datatable.import | Punam K | 2 | 1,510 |
08-20-2011 08:48 PM Last Post: Arul |
|
| Attach screen shot to QC with QTP test run in QC | santu.qtp | 2 | 2,646 |
03-22-2011 03:28 PM Last Post: chandu |
|
User(s) browsing this thread: 1 Guest(s)
|
|

Search
Member List
Calendar
Help




