Robotic Process Automation (UiPath)

Detailed Answers: 1 Point = 1 Mark

Paper A: AIT402-A (May 2024)

  1. Visual Representation: Flowcharts provide a clear, 2D visual layout of complex business processes, making it easier to read and debug than linear sequences.
  2. Complex Branching: Unlike sequences, flowcharts allow for multiple execution paths and non-linear logic using specific activities like Flow Decision or Flow Switch.
  3. Optimal Use Cases: They are best suited for designing workflows that require continuous looping, multiple decision points, or complex rule-based routing where the process does not have a single, straight path from start to finish.

  1. Selector Generation: Basic recording generates a complete, full selector for every individual activity, whereas Desktop recording generates partial selectors enclosed within a main container.
  2. Use of Containers: Basic recording does not use window containers, which makes execution slower. Desktop recording uses containers (like Attach Window), which speeds up the bot by maintaining the window context.
  3. Application Scope: Basic recording is ideal for simple, isolated actions that span across multiple different application windows, while Desktop recording is highly optimized for executing multiple sequential actions within the same desktop application.

  1. Click Activity (Purpose): Simulates a physical human mouse click on a specified User Interface element, such as a submit button, a hyperlink, or a checkbox in an application.
  2. Click Activity (Configuration): It is highly customizable and can be configured to perform single clicks, double clicks, left clicks, or right clicks based on the target element's specific requirements.
  3. Type Into Activity (Purpose): Simulates keyboard keystrokes to send text inputs to a designated UI element, typically used for entering data into web forms or logging into applications.
  4. Type Into Activity (Features): It includes advanced properties such as "Empty Field" (to clear existing text before typing) and the ability to send special hotkeys like Enter, Tab, or Escape alongside the text string.
  5. Message Box Activity (Purpose): Displays a synchronous pop-up dialog box to the user on the screen containing a specified text message or the output of a variable.
  6. Message Box Activity (Use Case): It is commonly utilized by developers for debugging data during workflow execution, alerting the user of process completion, or pausing the automation until human acknowledgment is received.

Step-by-Step Program Execution:

  1. Initiate the workflow by dragging and dropping a Sequence container to structure the linear process.
  2. Add an Input Dialog activity from the Activities panel to prompt the user to provide a numerical input.
  3. Configure the Input Dialog by setting the Dialog Title to "Number Checker" and the Input Label to "Enter a number:".
  4. In the Properties panel of the Input Dialog, click the Output/Result field and press Ctrl+K to declare an integer variable named num.
  5. Drag and drop an If activity directly below the Input Dialog to introduce the mathematical decision-making logic.
  6. In the Condition property of the If activity, input the modulo expression: num mod 2 = 0 to check for a remainder.
  7. Locate the Then branch of the If activity (which executes when the condition evaluates to true) and insert a Message Box activity, setting its text property to "The number is divisible by two."
  8. Locate the Else branch of the If activity (which executes when the condition evaluates to false) and insert a second Message Box activity, setting its text property to "The number is not divisible by two."

  1. Definition: UiExplorer is an advanced, standalone component of UiPath Studio used to deeply inspect, view, and customize the UI hierarchy and selectors of target application elements.
  2. Purpose: It is essential for building robust automations when default selectors fail or become unstable due to dynamically changing application attributes (like a changing window title or generated ID).
  3. Feature - Visual Tree: It provides a comprehensive Visual Tree panel that displays the entire UI hierarchy of the application, allowing developers to choose more stable parent elements to anchor their selectors.
  4. Feature - Property Explorer: It displays all available attributes of a selected UI node, enabling users to manually check or uncheck attributes to create a more reliable and resilient custom selector.
  5. Example Scenario (The Problem): If a bot is automating Notepad, the initial selector might capture a highly specific title attribute, such as title='Untitled-Notepad'. If the user saves the file as "test", the title changes to "test-Notepad", causing the bot to fail because it cannot find the original title.
  6. Example Scenario (The Resolution): Using UiExplorer, the RPA developer can edit the selector's title attribute to replace the volatile file name with an asterisk wildcard, resulting in title='*-Notepad'. This dynamic selector ensures the robot recognizes the Notepad window regardless of the current file name.

Step-by-Step Program Execution:

  1. Begin the automation by adding a Sequence to the designer panel to structure the workflow.
  2. Search the Activities panel and drag the Get OCR Text activity into the newly created Sequence.
  3. Click the "Indicate on screen" option within the activity body and draw a bounding box over the specific image or screen area containing the target text.
  4. Inside the Get OCR Text activity container, verify that the Google OCR engine is present; if a different engine is there by default, replace it with Google OCR from the activities panel.
  5. In the Properties panel of the Google OCR engine, configure the Scale property (e.g., set to 2 or 3) to artificially increase the image resolution and improve text recognition accuracy.
  6. Click on the main Get OCR Text activity and navigate to its Properties panel to locate the Text output field.
  7. Place your cursor in the Text output field and press the keyboard shortcut Ctrl+K to create and assign a new String variable (e.g., extractedText) to store the result of the OCR read.
  8. Drag a Message Box activity directly below the OCR activity and pass the extractedText variable into it to display the successfully recognized text on the screen.

Paper B: AIT402-B (August 2024)

  1. Core Concept: Control flow dictates the specific execution order of activities in an automated process based on evaluating logical conditions, variables, or user inputs.
  2. Implementation Mechanisms: In UiPath, decision-making control flows are physically implemented using activities such as the If activity (used within linear Sequences) or the Flow Decision activity (used within Flowcharts).
  3. Dynamic Routing: By evaluating a boolean condition (True/False), control flow allows the robot to branch off and execute entirely different sets of activities, enabling the bot to handle various business scenarios and exceptions dynamically.

  1. Definition: Sequences form the simplest, most fundamental, and linear type of workflow project structure available in the UiPath Studio designer.
  2. Execution Order: They are designed to execute a predefined set of activities in a strict, top-to-bottom consecutive order without native support for complex, multi-directional branching.
  3. Optimal Application: Sequences are best suited for simple, straightforward processes where one step naturally follows the next, or they can be used as modular, nested components within larger, more complex Flowcharts to keep the project organized.

  1. Basic Recording: Generates full, independent selectors for every single step without using window containers. It is slightly slower but highly suitable for simple tasks involving isolated actions across multiple different application windows.
  2. Desktop Recording: Generates partial selectors enclosed within an 'Attach Window' container. It is highly efficient, faster, and more robust for performing multiple sequential actions within the same standard desktop application.
  3. Web Recording: Functions similarly to Desktop recording by utilizing partial selectors, but it uses web-specific containers like 'Attach Browser'. It is strictly optimized for navigating, scraping, and interacting with web applications and internet browsers.
  4. Citrix Recording: Used exclusively for virtualized environments (such as Citrix, VDI, or RDP connections) where the standard underlying UI selectors cannot be detected by the local UiPath robot.
  5. Citrix Modus Operandi: Because it cannot "see" the code of the application, Citrix recording relies entirely on Image Recognition, Optical Character Recognition (OCR), and keyboard shortcut simulation to interact with the visual interface.
  6. Comparison Summary: Basic, Desktop, and Web recordings are all selector-based and interact directly with the application's underlying code framework, whereas Citrix is image-based and interacts only with the surface-level pixels rendered on the screen.

Step-by-Step Program Execution:

  1. Open a new project in UiPath Studio and drag a Sequence container to the designer canvas.
  2. Locate the Get OCR Text activity from the Activities search bar and drop it into the Sequence.
  3. Use the "Indicate on screen" wizard tool within the activity to draw a precise bounding box around the target image containing the text to be scraped.
  4. Select an appropriate OCR engine to place inside the activity container, such as Tesseract OCR or OmniPage OCR, depending on the document's font style.
  5. Navigate to the OCR engine's properties panel and adjust the Profile setting (e.g., selecting 'Screen' or 'Scan') to optimize the extraction algorithm for your specific image source.
  6. Select the main Get OCR Text activity, open its Properties panel, and locate the Output -> Text field.
  7. Use the keyboard shortcut Ctrl+K in the output field to declare a new String variable, naming it imageText, to hold the extracted characters.
  8. Add a Write Line activity to the sequence and set its Text property to the imageText variable to print the extracted data to the Output console for verification.

  1. Method 1: Wait Element Vanish - This synchronization activity completely suspends the execution of the workflow until a specified UI element is no longer visible on the user's screen.
  2. Wait Element Vanish (Use Case) - It is highly effective and frequently used for pausing the bot during system loading screens, progress bars, or while a "Processing..." pop-up is active, ensuring the bot doesn't click prematurely.
  3. Wait Element Vanish (Configuration) - Developers must configure a 'TimeoutMS' property to define the maximum duration the bot should wait before throwing an exception, preventing the workflow from hanging infinitely if the element never vanishes.
  4. Method 2: Wait Attribute - This synchronization activity pauses the workflow until a specific HTML tag or application attribute of a designated UI element reaches a predefined target value.
  5. Wait Attribute (Use Case) - It is extremely useful when an element is visually present on the screen but not yet ready to be interacted with, such as waiting for a web Submit button's "state" attribute to dynamically change from "disabled" to "enabled".
  6. Wait Attribute (Configuration) - To use this method effectively, the developer must use UiExplorer to identify the exact attribute name (e.g., 'aastate' or 'innertext') and manually input the expected target string into the activity's properties panel.

Step-by-Step Program Execution:

  1. Create a new Sequence workflow and drag an Input Dialog activity into it to collect numerical data from the end-user.
  2. Configure the Input Dialog by setting the Title property to "Number Checker" and the Input Label string to "Please enter a whole number:".
  3. In the Result output property of the Input Dialog, press Ctrl+K to declare an integer data type variable named userInput.
  4. Drag an If activity from the control flow panel into the sequence directly below the Input Dialog.
  5. In the logical Condition field of the If activity, evaluate the mathematical remainder by typing the expression: userInput mod 2 = 0.
  6. Locate the Then branch of the If activity (which executes automatically if the remainder equals zero) and add a Message Box activity.
  7. Set the text property of the Message Box located in the Then branch to exactly "The number entered is Even."
  8. Locate the Else branch (which executes if the remainder is not zero) and add another Message Box activity, setting its text property to "The number entered is Odd."