Objective is whenever an exception occurs BE or Application exception bot supposed to capture the image and send in email. I am using test suite.
Questions 1 : If i use take screenshot and store in local drive how this work when it is ran from a Test manager. Will it create any error ? Because file saved is location my system like C:\MyName\UiPath\ProjectName\Screenshot\Test.png
Is there any simple option like without saving the captured image in the local drive, just wanted to paste/attach in the mail ?
You can save it on network drive where Test manager have access to it. OR Create screenshot folder in project structure after email delete the screenshot if not needed further.
Create a sub folder named as Screenshot and save all the screenshots in this project folder. Make sure the path is given as reference path and not full path
After sending email - you can delete the screenshots
Ok. Since i am new to this Suite and Test Manager the doubt what i have is also i have few options pls share your ideas.
I am saving the Screenshot in my local drive and publishing it to Test Manager.
Will my code work from Test Manager while the control reaches the save screenshot (Which stores it in my local drive) will it throw any error ? OR
We have options to store Screenshots in assertions. How to take that and attach in send email activity? OR
Instead of saving these. I tried with clip board its copying and pasting it in my email so not saving the screenshot anywhere locally. Will this clipboard option works perfectly all the time ?
If you are currently storing it in your local drive, then you will need to give access to your local folder to the machine where your performing a test.
If you have successfully tested this using clipboard without saving it to any location it will also work perfectly.
In the “Take Screenshot” activity, avoid providing the full path(absolute path). Instead, use a simple name like “Screenshot.” When storing any file in a folder created within the Project folder, there is no need to specify the full path. Instead, use a short path (relative path) in the workflows.
By Providing path like this, there is no need to change the path after push into the Test Manager.
Currently i am storing it in c:\MyName\UiPath\ProjectName\Screenshot\Exception.png
Pls share a sample path so that it should work from Test Manager as well. Also share me some light on how this works, because publishing the code mentioning my local c:\ drive. I am assuming that Test Manager will try to access its c:\drive or something which means it will end up in
error? or inside the published package screenshot folder it will be saved ? Correct me if i am wrong.