Did anyone succeeded in getting Informative screenshot of the activity from the exception information.
Idea:
If robot fails to find a selector/enter a data into a field an exception is thrown which is catched either by GlobalHandler or TryCatch.
Here we can send an email to a customer about exception and further steps to take. Yet, as this is unknown exception not yet handled, we can not give specifics to the customer. And information with a generic “Click - Document” activity name does not gives enough information for the end user it would be extremely usefull to not only get the activity name, but also activity informative screenshot.
This would allow user to understand what exactly robot was doing before getting an exception.
Error info has Activity ID as well as Activity Instance, but I was unable to find a solution how to link these to the informative screenshot.
Not really. Imagine we have interface with 500 elements and robot fails to find a selector for 1 in any of 30 steps robot is programmed to perform in the said screen.
When catches, robot will send a generic email to a customer “Sorry, I have failed to perform a task because of unknown error, here’s the exception message”
Now user has to deduce which of 500 elements robot was trying to interreact with.
If we can instead just say - “I have failed in THIS activity and here’s an informative screenshot” - end used would know exactly what was robot intended to do without developer’s interaction.
In Try Catch Activity
Use “Take Screenshot” Activity In Finally Block.
To send email use exception.message for real time exception tracking.
You can also use it in catch block based on your requirements.
PFA SS.
A generic screenshot will display the situation about the interface. It will not give user the information about which button robot was trying to interact with
And so, after email with a generic screenshot, end user will email a developer about “what’s the problem here” and developer should investigate into code to look which element failed.
We can not take a screenshot of the element as… well… the selection already failed and so we can not target it by a selector.
In UiPath Studio we have these informative screenshots which allows us - as a developers to easier understand the code base of the robot.
What I am asking is if we could use the same screenshots as a base to inform a user as well.
Yet the problem is understanding WHAT to read as in error info the only information is ActivityID/ActivityInstance and I am yet to find a link between ActivityID and XAML
These does not give the information I am looking for.
The focus is on the end user, who has 0 DEV experience and how to display the relevant information for him. No exception message or source is simple enough for the end user to understand.
Screenshot is - this is why we are trying to find the ability to display it.
Yes Same Scenerio I have Developed In My Company As Well, Thats why i am telling you to place “Take ScreenShot” Activity inside “Finally Block/Catch Block” it will send Informative SS of any exception where the bot stays and stucks.
In If condition you can also check if message.exeception contains “click” then login button not found can be send in email body ( just giving you example )
Would we are forced to imlement it we could think about using some markers on the Activity Display Name, which helps us later for the XAML Identification and parsing in order to calculate the Activity and its linked screenshot
Now user is left to understand what was robot trying to do. Maybe he was trying to press reply? Which one? On Your post or the bottom one? Or maybe robot was trying to press [Solution] As user is not sure what was robot trying to do - he needs help from developer.
The solution I am looking for is
Robot failed to press the button and send the same email just with additional text "the activity with exception name: Click: Reply
Activity Screenhot:
And this screenshot could be provided because in my code this activity looks like
Error.message will give you message and error.source will give activity name,
in your scenerio You will have to customzied your workflow with the conditions ( depends on your number of activties ) For example : if bot stucks on reply button , your bot will go in catch block and throw error for reply button , you have to check if log message contains “reply” keyword then in “THEN” block you will "send your customize message to your non tehcnical end user like : bot unable to click on reply button. similary you will have to customzie this for some scenerios.
As my borther @ppr Said, Implementing such a logic can result in an increased complexity, he is right but since your end user needs only non technical reasons i think this is very easy solution.
This solution require to manually updating each and every activity and not viable for a big automations.
This is why I am looking for a global solution, as mentioned preferably via GlobalHandler, where we have ActivityID but with this information we could not find a link to the activity itself.
It this link would exist - we could implement this logic once and it would work for all activities across all workflows in the same process.