









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
How to handle exceptions in a program using the Try catch activity, how to handle common exceptions in UiPath, and how to log and take screenshots of the workflow execution. It also covers the Slow step, Highlighting, and Break activities used for debugging. examples and screenshots to illustrate the concepts.
Typology: Study notes
1 / 15
This page cannot be seen from the preview
Don't miss anything!
Exception handling is a way to handle exceptions for a process that the program or the procedure has failed to execute. For handling exceptions in a program, the best practice considered is to use the Try catch activity. The Try catch activity can be found in the Activities panel. By dragging and dropping the Try catch activity into the workspace, we can handle exceptions. For handling errors in the Try catch block, we can divide the whole process into four parts just to make it simpler:
When working on UiPath, especially on the web, we may encounter this type of error. This is because the UI element was not found due to the dynamic behavior of the web page. To handle this exception, we have to make changes in the selector attributes or we have to add new attributes to the selector so that the UI element can be easily found. For example, if we have a variable which is dynamically changing, we can use a wildcard so that it can be easily found by the robot. We can edit the dynamic attribute of the selector using wildcard characters. Another way is to attach it to the live element.
We may encounter runtime errors while working in UiPath. To rectify these errors, one of the best practices is to use the Try catch activity, which can be used to handle exceptions at runtime. By keeping an alternative inside the catch block, we can also overcome the error which we encountered before.
This type of error occurs when the environment in which we are trying to use the Click activity does not support Simulate or Send message activity (used by us to click the UI element). Sometimes, either SimulateClick or the SendWindowMessages may be checked. In both cases, when an exception is thrown we just have to uncheck the appropriate box. UiPath has a multi-process architecture that offers to execute each workflow separately in the executor. Executors are managed by UI robots. So, if any executor stops working, then the entire process will not be affected.
Client logs basically enable a server to record connections. These logs can be used by content providers in various scenarios, such as to generate billing, to trace media server usage, or to deliver suitable quality content depending on the speed of the client's server. For client logging in UiPath, we have an NLog configuration file which makes it easy and flexible to integrate with databases, servers, or any other NLog targets. Logging can be configured with this NLog.config file. UiPath Studio, Robot, and workflow execution generate log messages on the client side:
\Users\Username\AppData\Local\UiPath\app-17.1.6435, by setting the Log parameter from 0 to 1 inside the
If you have configured the UiPath server, then all logs generated by the execution are also sent to the server. You can take a screenshot anytime by pressing Ctrl + PrtScrn. There are various techniques provided by UiPath Studio for debugging in order to check whether the workflow is running successfully or to find out errors in order to rectify them. At the top of the UiPath window, we can see various available methods of debugging inside the EXECUTE block, as shown in the following screenshot:
When we click on Step into , the relevant part will start to execute; after we click on Step over , execution will jump to the next part, and so on
This is an activity in the EXECUTE block through which we can reduce the execution speed of a particular process or activity. This way, we can identify each and every process and keep an eye on where to find the error. In the Output panel, all activities or steps can be viewed. The following screenshot shows how to use the Slow step activity:
As indicated by the arrow in the preceding screenshot, when we click on Slow step the execution time for this particular step increases.
Highlighting is used to highlight the steps we have taken during automation and to identify each and every step in the workflow. It is very useful while debugging and its panel can be found in the Options menu of the Execute section in the Ribbon:
The Break activity is used to break a process at a certain point. Suppose we have a sequence performing seven activities together and we want to break the execution at a certain activity. For this, we can use the Break activity, as shown in the following screenshot:
Collecting crash dumps basically refers to collecting information when your UiPath Studio crashes. We can enable and disable crash dumps. These dumps provide us with information regarding the UiPath crash. Memory dumps are of two types:- full dumps and minidumps. Full dumps provide us with complete information about the encountered crash while minidumps provide us with just the main information regarding the crash. When a crash is encountered, we first have to identify the process which has crashed. Usually, a dialog will appear on the screen indicating the nature of the crash and the application involved. A UiPath process could crash, such as UiStudio.exe, Uiexplorer.exe, or Uilauncher.exe, or the target application you want to automate may crash.
The following are the steps to enable crash dumps:
To disable crash dumps, perform the following steps:
A user may encounter an error in UiPath and want to report it.
If you are an Enterprise customer, then you can report the error to the UiPath community in a very simple way: