How to capture screenshots in Blue Prism?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-05-17 12:44 PM
I was wondering if there is any internal libraries that helps the end users capture the screenshots of the steps covered.
The method which I am following is to enter print screen throgh sendkeys and paste the clipboard to any software ( MS PAINT) and then saving the file.
I wanted to understand if there is any better way to handle this scenario.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-05-17 01:06 PM
Hi,
you can use code block and create object which will make screenshots 🙂 eg. in C# code
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-05-17 03:30 AM
Try this:
Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
success = false;
error="";
folder = folder.TrimEnd('\\');
try{
Graphics graphics = Graphics.FromImage(bitmap as Image);
graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);
if (bitmap != null)
{
bitmap.Save(@folder+"\\+fileName+"".png"");
success = true;
}
}
catch(Exception e)
{
error = e.ToString();
success = false;
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-05-17 03:31 AM
Instead of saving to folder you can get the output in image data item
