cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture screenshots in Blue Prism?

AjmalMoideen
Level 2
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

MichalBogucki
Level 3
Hi, you can use code block and create object which will make screenshots 🙂 eg. in C# code

GopalBhaire
Level 10
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; }

GopalBhaire
Level 10
Instead of saving to folder you can get the output in image data item