| || |
I heard that using ReporterManager we can capture a screen shot of application on errors and scave it to results screen, I have searched forum on this but could not find much help, can anyone help me how to use this ReporterManager for capturing screenshots.
Look in the project's help files, under the ScreenCapture report engine, and in the demo file.
As the demo file shows, you first need to start the ScreenCapture engine. For example:
<font class="small">Code:</font><hr /><pre>oReporterManager.StartEngine("ScreenCapture" , "Error Screens", "Prefix>Error -|Path>C:\Errors\" )</pre><hr />
This will start a ScreenCapture engine, called "Error Screens", which will save images with the prefix "Error -", to the folder "C:\Errors\". (a list of all possible settings is available in the project's help file).
Once the engine is active, every time you use the oReporterManager.Report command, it will save the current screen. If you want it to save images only for certain reports, you can add a filter. For example:
<font class="small">Code:</font><hr /><pre>oReporterManager.AddFilter("RegEx", "Error Screens", "WhatToSearch>Status|Pattern>Warning|Fai l")</pre><hr />
This will activate a regular expression filter on the Error Screens log, which will only log events with status=fail/warning. So only these events will activate the screen capture engine.
This is only the tip of the iceberg. Many more options are available through the project's documentation.