How to save error screen shot and send it over email
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-12-21 12:27 PM
Hello everyone,
Could anyone help me, how can I build the functionality in Blue prism which can save the captured screenshots of the error on one drive or SharePoint folder and send the screenshot path link over email with the exception message.
Thanks,
------------------------------
Alex J
------------------------------
Could anyone help me, how can I build the functionality in Blue prism which can save the captured screenshots of the error on one drive or SharePoint folder and send the screenshot path link over email with the exception message.
Thanks,
Alex
------------------------------
Alex J
------------------------------
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-12-21 01:30 PM
Can anyone help me for the same to fix
------------------------------
Alex J
------------------------------
------------------------------
Alex J
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-12-21 02:59 PM
Hi Alex,
For this scenario,, I would suggest creating a custom business object to capture screenshot. You can follow the below steps:
1) First create a business object named 'Utility-Screenshots' and the in the page description stage of the 'Initialise' action, add the below dependencies and namespaces under the 'Code Options' tab while selecting the language as 'Visual Basic':

Now, create a new action called 'Take Screenshot' with two input parameters called 'Screenshot Folder Path' (Text) and Screenshot File Name' (Text) as shown below:

Add the code stage as shown above and use the below input parameters and code. No output parameter as such is required :


The code is as follows:
Test Results:


From the process studio, you can easily invoke this action whenever you are in the unhappy path from you 'Recover' and 'Resume' stage and once the screenshot has been saved at the given file path, you can use either 'SMTP/POP3' or Outlook VBO to send an email with this screenshot as an attachment
Let me know if it helps!!
------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
For this scenario,, I would suggest creating a custom business object to capture screenshot. You can follow the below steps:
1) First create a business object named 'Utility-Screenshots' and the in the page description stage of the 'Initialise' action, add the below dependencies and namespaces under the 'Code Options' tab while selecting the language as 'Visual Basic':
Now, create a new action called 'Take Screenshot' with two input parameters called 'Screenshot Folder Path' (Text) and Screenshot File Name' (Text) as shown below:
Add the code stage as shown above and use the below input parameters and code. No output parameter as such is required :
The code is as follows:
' Initialize variables
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
'Set screen related parameters
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppRgb)
'Generate screenshot
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(0, 0, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
'Save Screenshot
screenshot.Save(Screenshot_Folder_Path+"\"+Screenshot_File_Name)
screenshot.Dispose
Test Results:
From the process studio, you can easily invoke this action whenever you are in the unhappy path from you 'Recover' and 'Resume' stage and once the screenshot has been saved at the given file path, you can use either 'SMTP/POP3' or Outlook VBO to send an email with this screenshot as an attachment
Let me know if it helps!!
------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-21 06:44 PM
Thanks a lot Devneet for the detailed info.
------------------------------
MuraliKrishna
Senior Consultant - Automation Developer
------------------------------
------------------------------
MuraliKrishna
Senior Consultant - Automation Developer
------------------------------
