Best Practices in UiPath Part - 2 | Skcript

This article is the second part of best practices in Uipath. If you haven’t read the first part, click here. Here are some more tips you can follow to create robust workflows and better automation.

Let’s say we have a use case, where the bot should take screenshots of every page and save the screenshots in a folder. It works perfectly fine when we run it on a local machine, VDI or VM. If we minimize the VM or VDI, it causes an error (object reference is set to null) while saving the screenshots.

To overcome this issue, run the bot from the orchestrator with the following configuration.

  1. Login to Console should be set to False.
  2. Screen resolution should be set according to your desktop.
  3. Resolution Depth should be set 32.

Simulate actions play a very major role in automation. Simulate type, Simulate click and sendwindow messages are the properties of simulate actions. By default, these actions will be checked out. But it should be checked in for every activity which will make the actions run in the background.

Using browser elements and window elements is one of the best practices in Uipath. Instead of using selectors for attach browser or window activities, it will be more efficient if we use browser and window elements. Browser and window elements are efficient because, when there are two windows that have the same title and window name, the bot will not work properly as expected. This can be solved if we use browser and window elements.

Delays will be useful when you have to wait for an element or element to get processed successfully. Instead of delays, we can use the maximum timeout for each activity. By default, for all the activities, the timeout will be 30 seconds. The maximum timeout for an activity is 120000ms i.e 2mins. Let’s say we have a click activity with timeout 2mins. In this scenario, the click activity will wait up to 2mins for the element to appear. If the element appears within 2mins, the element will be clicked, else it will throw an error.

Selector regex can be used more efficiently in a scenario where we have a web page that has datatable if the correct ID is entered, else it will return NO DATA. The web page title will change to ABC if the data is present and if the data is not present, it will change to DEF. If we give * in the title, the uipath fails to validate the element. Selector regex will solve this issue efficiently by using this selector regex title: ‘ABC | DEF’ matching:title=‘regex’. This will validate whether the title contains ABC or DEF.

So, now that you have learned about the best practices, get out there, leverage the full power of RPA and maximize success.

Comments and Discussions Please enable JavaScript to view the comments.


This is a companion discussion topic for the original entry at https://www.skcript.com/svr/best-practices-in-uipath-part-2/

Do you need to execute tasks with percision and accuracy?

Grow and scale your organization easily by automating business crucial functions with Robotic Process Automation (RPA).