| || |
Taking screenshots of dlg boxes
In our software we have a warning error message dlg box that can appear from time to time. I have written a handler to take care of the dlg box(pressing the Ok button). What I am enquiring about is we want to if possible take a screenshot of the dlg box before pressing the ok button in the handler.
Re: Taking screenshots of dlg boxes
I have never tried this but it could work.
In your handler function call another function that gets a screen shot of the current dialog (ALT+PrntScrn) then pastes it into MS paint and saves it with a unique name (date/time stamp). After this is done close paint and return to your tests.
The draw back to this is that you have to launch MS paint during your test. If the dialog is a modal dialog then this could be a problem.