Robotic Process Automation (UiPath)

Detailed Answers for IE1 Paper: 1 Point = 1 Mark

Internal Exam 1 (January 2026)

  1. Locate and Add: Search for the Delay activity in the Activities panel and drag-and-drop it directly between the "Click Submit" and "Click Close" activities within your workflow sequence.
  2. Access Properties: Click on the newly placed Delay activity and navigate to the Properties panel on the right side of the UiPath Studio interface to locate the Duration field.
  3. Time Configuration: Input the exact timespan format 00:00:10 (representing Hours:Minutes:Seconds) into the Duration property to instruct the robot to halt all operations for exactly 10 seconds.

  1. Build the Table: Drag a Build Data Table activity, click "DataTable...", and define the schema: create a String column named 'Student_Name', an Int32 column named 'Roll_No', and a String column named 'Class'. Add random mock data into the rows and save the output to a variable named dt_Students.
  2. Set up the Loop: Drag a For Each Row in Data Table activity into the sequence directly below the build step, and provide the dt_Students variable as the input table to iterate through.
  3. Extract and Display: Inside the body of the loop, insert a Message Box activity and use the expression CurrentRow("Student_Name").ToString + " | " + CurrentRow("Roll_No").ToString + " | " + CurrentRow("Class").ToString to extract and display the respective cell values of each iteration.

  1. Data Extraction: First, use an Assign activity to extract the last character of the student's ID number (using string manipulation like studentID.Substring(studentID.Length - 1)) and store it in a String variable named lastDigit.
  2. Configure Switch: Drag a Switch activity into the workflow, ensure its TypeArgument property is set to String, and place the lastDigit variable into the Expression field.
  3. Define Cases: Add distinct cases to the Switch block: Case "1" executes an assign/message for "Red House", Case "2" executes for "Blue House", Case "3" executes for "Green House". Finally, configure the built-in Default section to output "Guest House" for any remaining scenarios.

Step-by-Step RPA Logic:

  1. Create a new Integer variable named highestSales to keep track of the maximum value found.
  2. Use an Assign activity to initialize highestSales to the very first item in the array using the expression: highestSales = SalesArray(0).
  3. Drag a For Each activity into the workflow to iterate through every element in the collection.
  4. Configure the For Each loop by providing SalesArray as the input list and ensuring the TypeArgument is correctly set to Int32 (the item variable can be named currentSale).
  5. Inside the Body of the For Each loop, drag and drop an If activity to establish a conditional check.
  6. In the Condition property of the If activity, write the expression: currentSale > highestSales to compare the current array item against the stored maximum.
  7. Inside the Then branch of the If activity (which triggers if a new highest number is found), place an Assign activity. Set it to update the variable: highestSales = currentSale.
  8. Outside and below the entire For Each loop, add a Write Line activity with the text highestSales.ToString to print the final highest value to the Studio Output panel.

  1. Establish Source Context: Use an Attach Browser activity directed at the e-commerce web application to ensure the robot is interacting with the correct active window.
  2. Data Extraction: Within the browser scope, use a Get Text (or Get Full Text) UI automation activity, utilizing "Indicate on screen" to capture the required order information into a string variable.
  3. Populate Clipboard: Use the Set To Clipboard activity, passing the extracted string variable as input, to temporarily load the order data into the operating system's native clipboard memory.
  4. Establish Target Context: Use a second Attach Browser activity to switch the automation focus to the logistics fulfillment portal.
  5. UI Navigation: Use a Click activity to place the cursor directly inside the specific target input field on the logistics portal.
  6. Retrieve Clipboard Data: Utilize the Get From Clipboard activity to pull the stored data out of memory and assign it to a new local string variable.
  7. Data Entry (Pasting): Use a Type Into activity to input the retrieved variable into the portal, OR alternatively, use a Send Hotkey activity configured to send Ctrl + V to simulate a human paste command.
  8. Efficiency & Accuracy Justification: This clipboard approach vastly improves efficiency by eliminating manual tab-switching and improves accuracy by completely removing the risk of human transcription errors (typos) during data transfer.

  1. Variable Initialization: A While activity requires the developer to manually declare and initialize a counter variable (e.g., Assign counter = 5) prior to the loop. A For Each loop inherently operates on a pre-existing collection without needing a manual starting integer.
  2. Condition Evaluation: The While loop dynamically evaluates a Boolean expression (e.g., counter <= 50) at the beginning of every cycle. Conversely, For Each automatically continues until it exhausts all items in the provided array/list.
  3. Increment Mechanism: Inside a While loop, the developer must explicitly add an Assign activity to step up the value (counter = counter + 5). A For Each loop automatically increments to the next indexed item in the collection automatically.
  4. Implementation Complexity (For Each): To achieve this specific 5-to-50 increment task using For Each, the developer would be forced to artificially generate a static array `[5, 10, 15, 20... 50]` beforehand, which is highly inefficient and rigid.
  5. Implementation Ease (While): The While activity requires only a starting number, a limit condition, and a mathematical addition step, making it highly flexible if the increment size or upper limit changes in the future.
  6. Conclusion/Suitability: The While activity is structurally vastly superior for this scenario because the termination condition is based on a dynamic mathematical boundary, whereas For Each is strictly designed for iterating over a known, finite list of objects.

Step-by-Step RPA Logic:

  1. Create Default: Use an Assign activity to securely set a variable (defaultPass of type SecureString). Expression: (new System.Net.NetworkCredential("", "123456")).SecurePassword.
  2. Display Default: Use a Message Box activity to display the password by converting it back to a readable string using the expression: new System.Net.NetworkCredential("", defaultPass).Password.
  3. Initialize Counter: Use an Assign activity to create an Integer variable named attemptCount and set its initial value to 0.
  4. Implement Loop: Drag a Do While (or While) loop container into the workflow to manage the retry logic. Set the condition to allow looping only while attemptCount < 3.
  5. Prompt User: Inside the loop, add an Input Dialog activity. Check the "IsPassword" property (so characters type as asterisks) and save the user's input into a SecureString variable named userPass.
  6. Compare Strings: Drag an If activity to evaluate the match. Since SecureStrings cannot be directly compared with an "=" operator, convert both to strings in the condition: new System.Net.NetworkCredential("", userPass).Password = new System.Net.NetworkCredential("", defaultPass).Password.
  7. Success Path: Inside the Then branch of the If block, place a Message Box displaying "Success!", followed immediately by a Break activity to forcibly exit the loop and grant access.
  8. Failure Path: Inside the Else branch, place a Message Box displaying "Failure/Try Again", followed by an Assign activity to manually increment the attempt counter: attemptCount = attemptCount + 1. After 3 failures, the loop terminates naturally.