Screen shot with email


#1

Hi,

How can I take the screen shots in all the exceptions with date and time in the code and save in a particular location.
finally it will send a mail to concern people. Please help me the scenarios ?

Thanks.


#2

@ssirigann sreedhar, use try catch block for your script. as and when your bot stops immediately try catch block will start executing 2nd part of try-catch block.

inside 2nd part of try-catch block, use send outlook mail message activity and create body with screenshot link.so that screen shot will be included in the mail message body and you will get an email with screenshot.
for screenshot, please use screenshot activity.
image also make sure you are giving desktop as a default screenshot area so that it will capture everything including error and don’t make it highlight.

This is how can we make bot more interactive and it will communicate with respective stake holders when it need attention… :wink:
hope my inputs are useful


#3

Thanks Krishna this is helpful information, I will let you know once it is implemented .


#4

Hi Krishna,
Is there any other scenarios like take screen shot and save in a folder and notification will sent via email using take screen shot and save image.

Thanks


#5

Basically, screen shot will explain where bot got stuck… so it is not advisable to save it into a folder.
of course, you can save in a local path location but it is not advisable. When you start collecting all these screenshots and saving them into local folders then bot will create un necessary garbage. so the general design will be as follows:

  1. take screenshot.
  2. save in default location (common to every PC like temp etc… ) folder and collect screenshot name with full file path.
  3. paste/ attach same link in the email body so that screenshot will be circulated by email.
  4. delete the screenshot saved in the default location.

that’s end the work flow.
in some cases. we can create a email body template and use that template as a body of email and every time you will get nice information in the email.

it’s all depends on your ability to think and design what you need to delight your client.

Hope my inputs are useful.


#6

Thank you so much Krishna