Rpa best practices uipath

RPA best practices uipath

We will Know more details about “RPA best practices uipath”.

1). Use Callout activity to give a popup.

2). Postman UiPath link – https://postman.uipath.rocks/

3). UiPath Orchestrator API Guide – https://docs.uipath.com/orchestrator/reference#webhooks-requests

4). Build Dictionary, Count dictionary activity package – Workflow Manager Activities

5). Swagger API – https://platform.uipath.com/IshmeetBindra/IshmeetBindra/swagger/ui/index#/Queues

6). To get a range of numbers –

  • Ennumerate.Range(Start, Count)
  • System.Linq.Enumerable.Range(starting_num, count)

7). To get a token using python-

url = “https://platform.uipath.com/IshmeetBindra/IshmeetBindra/api/Account/Authenticate”

authentication_data = “””{

“tenancyName”: “IshmeetBindra”,

“usernameOrEmailAddress”: “ibindra1995@gmail.com”,

“password”: “Ishmeet1995@”

}”””

data = requests.post(url, json= json.loads(authentication_data))

token_data = json.loads(data.text)

token = “Bearer ” +  str(token_data[“result”])

8). To filter stuff from a list from ORchestrator API –

add ?$filter=Name%20eq%20’asset_url’ at the end of the link

9). To merge 2 lists into one ->

var allProducts = productCollection1.Concat(productCollection2).Concat(productCollection3).ToList();

10). Send multiple hot keys using single activity.

String.Join(“”, Enumerable.Repeat(“[k(tab)]”,3))

11). UiPath Native Citrix Requirements –

UiPath Automation package and UiPathRemoteRuntime (Citrix app) both must have same version

  1. Citrix Zenapp version 7 and up is supported only.

12). To fix the ‘AsEnumerable is not a      member of System.data.datatable’ -> Open XAML of project in notepad, add

<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>                                                                                                                                                                               (Use tags to figure out where to add it.)

Use this link for more reference                https://forum.uipath.com/t/asenumerable-is-not-a-member-of-system-data-datatable/69198

13). Linq query to compare multiple columns of 2 DataTables -> (Joining 2 tables at specific columns)

(From row_1 In output_dt.AsEnumerable join row_2 In output2_dt.AsEnumerable on row_1(0).ToString Equals                row_2(0).ToString and row_1(1).ToString Equals row_2(1).ToString  Select row_1).CopyToDataTable

Use where to apply not to condition ->

(From row_1 In output_dt.AsEnumerable join row_2 In output2_dt.AsEnumerable on row_1(1).ToString Equals row_2(1).ToString where row_1(0).ToString <> row_2(0).ToString  Select row_1).CopyToDataTable

14). If you are not getting proper result in regex select following options and try

  •       -> SingleLine
  • IgnorePatternWhitespace

These 2 options solve most of the errors.

 15). If you want something to happen via a trigger, then search for ‘User Events’ in activities. It provides a range of activities for the same.

Also use Trigger Based Automation as a template

16). Trigger activities has a property – Event Type –

  • Async – Event Controller gets executed after the action is performed
  • – Sync  – Event Controller gets executed before action is performed

17). LINQ Query .Where implementation-

query = dt.AsEnumerable

.Where(Function(dr) dr(“column name”).ToString = “something”).ToList

18). To run a job Dynamically via API –

You need to pass it as “Strategy”:number_of_times_job_should_execute.

Example- “Strategy”:1 means run job 1 time.

“Strategy”:15 means run job 15 times

19). To merge 2 list

Ans:- list1.Concat(list2)

20). To remove blank values from a list –

Ans:-  List_1.Except(New String() {“”,” “})

21). To add values to queueitem manually:

Ans:-

  • Queueitem1 = new QueueItem
  • Queueitem1.SpecificContent = new Dictionary(of String,Object)
  • Queueitem1.SpecificContent(key) = Value

or just use add to dictionary

22). Using Where method directly

inOut_dict_MasterData(“LineItemDetails”).Split(“|”c).Where(Function(x) len(x) <> 0).ToArray

23). To remove Duplicate values from a list you need to use Duplicate() method.

  • list_1.Duplicate()

24). If you want to find out the exact cell location then use LookupRange activity. It will return the exact location of the cell.

25). If you want to send hotkeys while typing -:

  1. [d(hotkey_name)] (Presses the key)
  2. [u(hotkey_name)] (Releases the key)

Example-

“%[d(lshift)]ishmeet[u(lshift)]”

Above prints ‘ISHMEET’ rather than ‘ishmeet’

26). #PDD (Process Definition Document/BFRD)

An initial document, a manuscript between business and RPA team, captured scope in minute detail, acts as a ‘statement of work’    for Robotics Development.

#SDD (SDD / EDD / TDD )

majorly a technical paperwork post-development which acts as a manual for further enhancements. This lists automation design,         specifications, customization, configurations, dependency on tools/APIs/DB/encryption.

This document is vital for future enhancements.

#SAD ( Solution Architecture Document)

a high-level document that contains the  ‘as-is’ & ‘to-be’ process flows. It can/should have an overview of Bot’s technical workflow.

#Deployment Guide

guide on how to deploy an @end environment, contains the environment dependency/prerequisites/additional configuration for smooth             #rpabots operation.       ( in #pegadev , this contains RuntimeConfig/common config/RPA service)

includes a rollback plan and disaster recovery.

27). Running a PowerShell Script :

Step 1. Check ‘IsScript’ property.

Step 2. Type in your script such as

“rasphone -d “”MSFTVPN””” + Environment.NewLine + “Start-sleep 10”

Step 3. Run the program.

28). Powershell Commands –

  1. To check Internet connectivity –

netsh interface show interface

  1. To connect to a specific VPN –

rasphone -d “VPN_Name”

  1. To check is we are connected to a specific VPN or not –
  2. Get-VPNconnection -Name “VPN_Name”
  3. Its output type is Microsoft.Management.Infrastructure.CimInstance
  4. Assign it to a variable and check the following                                                               powershell_output(0).CimInstanceProperties.Item(“ConnectionStatus”)
  5. If above is ‘connected’ it means that our VPN is connected, if not then run the command mentioned in section ‘b’

29). Format time via –

.ToString(“h:mm:ss tt”)  -> For non 24hr standard

.ToString(“HH:mm:ss tt”) -> For 24hr Standard

30). If you are not able to extract values from a Dropdown menu then simply use Extract Structured Data.

31). IF the element on which you want to click is not properly visible and your cursor is clicking somewhere you don’t want it to then check the simulate click option

32). To pick and place something –

Step1. Click activity with Click Type property = Mouse Down

Step2. Hover activity to place it in place.

Step3. Click activity with Click Type property = Mouse Up

33). In UiPath 10.0 version we have an Immediate Pannel, it gives us an in-depth result. For example, if we want to see that whats the value of the row’s item, just type

row.item(0) in its panel and hit enter. It will display it. Handy stuff.

34). Using Variables in Selectors without using string manipulation:

https://forum.uipath.com/t/how-to-use-variables-in-selectors-in-studio-dynamic-selectors-without-string-manipulation/154110

35). When you need to get some input from the user via Orchestrator use

  1. Create Form Task: Creates a form on Orchestrator to accept inputs.
  2. Wait From Task: Waits till the user fills in the Form

36). To get the last modified date of a file :

System.IO.File.GetLastWriteTime(strFilePath)

37). To Stamp the PDF –

Download UiPathTeam.PDF.Extensions.Activities

Use watermark pdf activity.

Properties –

Colour – XColor.FromKnownColor(XKnownColor.Blue)

Font – New PdfSharp.Drawing.XFont(“Arial”,60, XfontStyle.Bold)

Pages – “1-2” (For Range of Pages. “1” for a single page. )

If you want advanced control then write a python script for it.

38). How to connect to Postgres SQL –

https://forum.uipath.com/t/postgresql-with-uipath-how-to/83545

39). Use Project Settings to apply project level rules for common activities such as what should be BeforeDelay and AfterDelay of the activities and all.

You can also use the same for copying settings from production to debug or the other way around.

40). Use Run From this activity option to run from a particular activity. It also gives you a chance to modify variables before running.

41). Conditional Breakpoints – In the breakpoints tab, double click on any BP and add in the condition.

42). An orchestrator, we now have an auto-start process option in the Processes tab. This can be accessed via the drop-down menu on each individual process.

43). Background Process: It allows us to create a background process (with no foreground interaction) and allows us to run multiple such processes on a single machine.

44). By checking Hidden Property in Open Browser you can open a hidden chrome/firefox which is basically a background process

45). Selector Matching via REGEX

Syntax :

  1. Just replace the value via regex expression
  2. Add matching:identifier_name=’regex’ at the end of the selector.

Example :

<html app=’chrome.exe’ title=’Google’ />

<webctrl tag=’INPUT’ aaname=’^Google Sear\w\w’ matching:aaname=’regex’ idx=’2′ />

46). Fuzzy matching for selectors. If selector is not consistent and changes only a little bit always then we can use Fuzzy Matching.

Syntax :

Just add this at the end of the selector:

matching:title=’fuzzy’ fuzzylevel:title=’0.9′

Example :

<html app=’chrome.exe’ title=’Google’ />

<webctrl name=’btnK’ tag=’INPUT’ aaname=’Google Searfh’ matching:aaname=’fuzzy’ fuzzylevel:aaname=’0.9′ />

47). Non Greedy Selectors – Suppose you have 2 windows with similar selectors. Now sometimes UiPath will take incorrect instance at the place of the correct one.

To solve it just add the below at the end of the selectors.

idx = ‘*’

Visit our other tutorials : UIPath Guide PDF

Download the Uipath guide pdf

Conclusion:

I hope you liked this article about the “RPA best practices uipath”. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

 

SHARE THIS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.