You are on page 1of 3

UiPath Operators

Some common operators for


i.
Ø
Initializing a datatable
dt_1 = New
System.Data.DataTable
Cheat Sheet various purposes in ii. Filtering a datatable
programming. Ø Select method can be used,
Layout Diagrams i. Assignment / Comparison returns an array of Datarows.
Ø = (equals) Ø dt_Array =
Used to integrate activities into Ø > / >= (greater than / greater dt_1.Select(“Age=’30’”)
workflow design. than or equal to)
Ø < / <= (less than / less than or Arrays
i. Sequence
Ø Linear representation of equal to) A collection that can store
activities that follow each other Ø <> (not equals)
multiple values of one of the
in a fixed order. ii. Mathematical many data types, with a fixed
Ø Easy to understand & is suited Ø + (addition)
size.
for simple & small scenarios. Ø - (subtraction)
ii. Flowchart Ø * (multiplication) i. Initializing an array
Ø Each step is represented by Ø / (division) Ø strArray = new System.
different symbols connected iii. Boolean String () {}
by arrows. Ø NOT Ø where () is the length & {}
Ø Flexible & can showcase Ø AND (&&) contains the values in the
decision points, ideal for more Ø OR (||) array.
complex workflows. Ø String [ ]
iii. State Machine Variables
Ø Represented by flowcharts Lists
with conditional arrows called Store data and pass them
between activities. Similar to arrays, but, with a
transitions (State Diagrams).
flexible size, making it more
Ø Suited for high-level process
diagrams of transactional Can be created from the Context versatile.
business process templates. Menu with keyboard shortcut
i. Initializing a list
(CTRL + K), an Assign activity,
Control Flow or from the Variables Panel.
Ø strList = new
System.Collections.Generic.
The order in which particular i. String List (of String)
actions are taken with the help of Ø Text of any kind Ø List <String>
loops that help automate (“aBc123@#$”) Ø Items can be added using an
repetitive tasks. Ø Must be placed within Add To Collection activity.
quotation marks (“ ”).
i. If ii. Int32 Arguments
Ø Contains a statement & two Ø Whole numbers (1, 55, 999)
conditions. Ø Storage capacity of 32 bits. A kind of variable that also stores
Ø The Then section is executed data but passes them between
iii. Boolean
if statement is True, Else workflows / projects instead of
Ø True or False
section if it is False.
iv. DateTime just between activities.
ii. While
Ø Dates & Times (“yyyy/MM/dd”
Ø If the condition is met, actions
– format can be changed). Can be created in the Arguments
in the body are executed.
Ø Use the .Now function for the Panel.
iii. Do While actual date & time.
Ø Actions are first executed,
iv. Generic Mandatory fields when creating
followed by the condition. If
Ø Any type of data (text,
the condition is met, the arguments:
numbers, datetimes)
actions are performed again. Name: Denomination of the
Ø Advantage:
iv. For Each 1. Convenience, flexible use argument.
Ø Iterates through a list of items, of variables. Direction: Direction of the
one at a time, and executing 2. No type considerations. argument.
actions in the body of the loop. Ø Disadvantage: Argument Type: Data type it
1. Lack of specific handling stores.
Flow Decision methods. (String
manipulation methods i. In
An activity that executes either cannot be used directly as Ø Can only be used within the
one of the two branches, by they only work for String given workflow.
default named True & False. variables) ii. Out
2. Imprecise expression Ø Can be used to pass data
Execution depends upon whether evaluations. outside the given workflow.
the condition is met or not. iii. In / Out
Datatables Ø Can be used both within and
It is equivalent to the If activity but outside the workflow.
A type of variable that can store
can only be used in Flowcharts.
big pieces of information, and act
as a database or spreadsheet
with rows and columns.

Commonly used in extraction of


structured data from websites, or
Excel files.

All Rights Reserved. CFB Bots Pte Ltd.


Data Manipulation i. Full Selectors Excel Automation
Ø Contains all the elements
Usage of some common needed to identity an UI Some of the activities that are
predefined methods for Strings Element, including the top- used in Excel automation.
and others. level window.
Ø Recommended when UiPath.Excel.Activities package
Let str be a string variable with switching between multiple required.
value: “Hello World! “ windows.
ii. Partial Selectors Excel activities in the scope
i. Trim Ø Does not contain information require Excel to be installed &
Ø str.Trim() about the top-level window.
Ø Removes leading & trailing opened.
Ø Activities containing partial
spaces. selectors are enclosed in a Workbook activities does not.
Ø Result: “Hello World!” container that contains a full (Works in the background)
ii. Split selector of the top-level
i. Excel Application Scope
Ø strA.Split({“ window.
“},StringSplitOptions.None) Ø Container that enables you to
Ø Recommended when work with other Excel activities
Ø Splits the string by a spacing performing multiple actions in
& where you specify the .xlsx
and store each part into a the same window.
file to work with.
string array.
Ø Result: strA(0) = “Hello”, str(1) Wildcards ii. Read Range / Cell
= “World!” Ø Reads the specified Excel file
Symbols that allow dynamically- /Cell and stores it to a
iii. Substring
changing attributes in a selector DataTable / String variable.
Ø str.Substring(0,5)
Ø Takes a substring of the string by replacing character(s). iii. Write Range
starting from index 0 with a Ø Writes data from a DataTable
length of 5. i. Asterisk (*) to an existing Excel file,
Ø Result: “Hello” Ø Replaces zero or more creates a new one if it does
characters. not exist.
iv. Remove
Ø str.Remove(0,5) ii. Question Mark (?) Ø Overwrites existing data.
Ø Takes a substring to remove Ø Replaces a single character. iv. Append Range
instead of keep, starting from Ø Appends data from a
index 0 with a length of 5.
Recordings DataTable to an existing Excel
Ø Result: “World” file, creates a new one if it
Record and replay actions for
does not exist.
v. Replace automation, with the ability to
Ø str.Replace(“!”,”~”) Ø Does not overwrite existing
modify & parametrize the data.
Ø Replaces ‘!’ found in the string recorded sequence.
with ‘~’ v. Insert / Delete Column
Ø Result: “Hello World~ ” Ø Insert or delete a column from
Certain activities cannot be an Excel file or DataTable
vi. Contains
recorded such as Keyboard having specified the Column
Ø boolVar = Str.Contains(“o”)
shortcuts, Mouse hovers, and, Name & Sheet Name.
Ø Checks whether the string
contains the letter “o” and Right-Clicks. vi. Output Data Table
returns a Boolean value Ø Writes a DataTable into a
based on the result. String using CSV format.
F2 can be used to pause the
Ø Result: boolVar = “True” recording for 3 seconds.
vi. ToString PDF Automation
Ø intAge.ToString() i. Basic Some of the activities that are
Ø Converts the variable type to Ø Generates full selectors for
each activity without a
used in PDF automation.
a string.
vii. CInt container, resulted workflow is
slower than those with UiPath.PDF.Activities package
Ø Cint(str)
Ø Converts the variable type to containers. required.
an integer. Ø Suitable for single activities. i. Read PDF Text
viii.Environment.NewLine ii. Desktop Ø Reads all characters from a
Ø “Line1: “ + str + Ø Generates a container with the specified PDF file & stores it in
Environment.NewLine + selector of the top-level a String variable.
“Line2: Hey!” > window and, partial selectors Ø Preferred activity as Read
Ø Generates a line break for each activity. PDF With OCR is error prone.
Content afterwards will be on Ø Suitable for all types of ii. Read PDF With OCR
the next line. desktop apps and multiple Ø Reads all characters from a
Ø Result: Line1: Hello World! actions. specified PDF file using OCR
Line2: Hey! iii. Web technology & stores it in a
Ø Designed for recording in web String variable.
Selectors apps & browsers & generates Ø Use only if required to extract
Store attributes of a graphical containers. text in an image of the PDF.
Ø Simulate Click/Type input iii. Anchor Base
user interface element and its methods by default.
parents. Ø When looking to extract
iv. Citrix specific values, use the
Ø Designed for virtualized Anchor Base activity.
Can be created automatically by environments or SAP, permits Ø Works well with a Find
using the Attach to Live only image, text & keyboard Element / Image activity as the
Element feature or manually from automation. anchor (for handling structural
UiPath Explorer. Ø Requires explicit positioning. changes), followed by a Get
Text to extract the value.

All Rights Reserved. CFB Bots Pte Ltd.


Screen Scraping Debugging Keyboard Shortcuts
Another method for extracting Functions of debugging are Some keyboard shortcuts for
data from documents (e.g. PDF located in the Execute tab. various activities to save time.
files) using the Screen Scraping
Wizard. Various functions for identifying i. File Management
and removing errors in a project. Ø Ctrl + Shift + N (Create new
i. FullText blank process)
Ø Default method, the fastest Ø Ctrl + O (Open previously
and the most accurate. i. Break created workflows)
Ø Works only with desktop Ø Pause the debugging process at Ø Ctrl + L (Open Log files folder)
applications. any given moment.
Ø Ctrl + S (Save currently
ii. Native Ø Available when debugging is in
opened workflow)
Ø Able to extract screen progress.
Ø Ctrl + Shift + S (Save all
coordinates of the text. ii. Step Into opened workflows)
Ø Works with applications that Ø Allows us to analyse our
ii. Comments
are built to render text with activities step-by-step.
Ø Ctrl + D (Ignore an activity by
GDI. Ø Opens & highlights containers.
placing it in a Comment Out
iii. OCR Ø Available when debugging is container)
paused.
Ø Not as accurate but can Ø Ctrl + E (Remove an activity
extract text which the two iii. Step Over placed in a Comment Out
other methods cannot. Ø Debugs the next activity after the container)
Ø Has different OCR engines current container.
iii. Debugging
such as Google Tesseract & Ø Highlights containers without
Ø F7 (Runs currently opened
Microsoft Modi. opening them.
workflow in debug mode)
Ø Available when debugging is
Ø F8 (Checks currently opened
Email Automation paused. workflow for validation errors)
iv. Validate
Some of the activities that are Ø F9 (Mark selected activity with
Ø Ensures all variables, arguments, a breakpoint)
used in Email automation.
& imports are properly configured Ø Shift + F9 (Removes all
& used across the workflow. breakpoints in the currently
UiPath.Mail.Activities package Ø Should be one of the first steps opened workflow)
required. before execution of the workflow. Ø F11 (During debugging, Step
i. Save Mail Message v. Breakpoints Into function)
Ø Saves the email message to Ø Points to pause the debugging Ø Shift + F11 (During
specified folder. If no folder is process on an activity which may debugging, Step Over
specified, it is saved to project trigger execution issues. function)
folder. Ø Can be created from the iv. Recording
Ø Files in existing folder with the Execution tab or Context Menu Ø Alt + Ctrl + W (Opens Web
same name will be overwritten. vi. Slow Step recording toolbar)
ii. Save Attachments Ø Allows us to take a closer look at Ø Alt + Ctrl + B (Opens Basic
Ø Saves the mail message any activity during debugging at recording toolbar)
attachments to specified four different available speeds. Ø Alt + Ctrl + C (Opens Citrix
folder. If no folder is specified, vii. Options recording toolbar)
it is saved to the project folder. Ø Allows us to focus on fragile Ø Alt + Ctrl + D (Opens Desktop
Ø Files in existing folder with the parts in our workflow, as such, recording toolbar)
same name will be overwritten. having UI elements highlighted Ø F2 (Add delay while recording)
iii. Retrieving unread emails during debugging or activities Ø F3 (Specify a custom recording
Ø Get Outlook Mail Messages & logged into the Output Panel. region)
Get IMAP Mail Messages. vii. Log Message / Write Line / Ø F4 (Choose UI Framework to
iv. Sending email messages Message Box record with, Default/AA/UIA)
Ø Send Outlook Mail Message & Ø These activities can also be used v. Workflow Execution
Send SMTP Mail Message to show the output of our Ø F5 (Runs currently opened
workflows, value of our variables workflow)
More resources at: & arguments. Ø F12 (Stops execution of
https://studio.uipath.com/ current workflow)
https://activities.uipath.com/ vi. Selected Activity
https://forum.uipath.com/ Ø Ctrl + T (Places activity inside
With compliments from: a Try section of Try-Catch
activity)
Ø Ctrl + N (Creates a new
Sequence Diagram)
Ø Ctrl + C (Copy selected
activity)
Ø Ctrl + V (Pasted copied
activity)

Output methods for Screen Scraping


Methods Speed Accuracy Background Text Position Hidden Text Citrix
Full Text 100% 100% Yes No Yes No
Native 80% 100% No Yes No No
OCR 30% 98% No Yes No Yes
All Rights Reserved. CFB Bots Pte Ltd.

You might also like