Forum Discussion
I suppose you can use OnLogCheckpoint event to create screenshots for every checkpoint.
Just create event handler function and put there
Log.Picture(Sys.Desktop.Picture())
Do you need the screenshot for a success or is it sufficient to get the screenshot for an error? If error screenshots are what you need, you can do that for all errors for your project under Tools | Current Project Properties | Project | Playback. There's a checkbox that says "post image on error" that will take a screenshot of your current desktop whenever an error is logged.
Personally, I choose the path of "less is more" with regards to writing to the log. If some test or validation passes within the larger test case, I choose not to log anything. I really only need to know when something fails and, if it does, details about the failure. So, since a failed object checkpoint can automatically generate a screenshot (see above), there's no need to do any other work to do so.
- karkadil7 years agoValued Contributor
I agree with Robert, in most cases it is enough to have the screenshot in case of error only
- shahid247 years agoContributor
Hi Robert,
Thanks for your reply. I wanted to get a expected vs actual screenshot on all checkpoints. Also I have by default enabled screenshot on error option. Currently TC takes a screen shot of the object like for exmaple shows the button that is being cheked but not the rest of the screen. hwo can this be done?
Thanks,
Shahid
Related Content
Recent Discussions
- 15 hours agodhundley