0% found this document useful (0 votes)
82 views11 pages

Exp No: 8 Recording Mouse and Keyboard Actions in Uipath

Uploaded by

rohihrd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views11 pages

Exp No: 8 Recording Mouse and Keyboard Actions in Uipath

Uploaded by

rohihrd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Exp No: 8 Recording Mouse and Keyboard Actions in UiPath

Objective: To automate the process of recording and reproducing mouse and keyboard
actions using UiPath's recording features.

Materials Required:

 Computer with UiPath Studio installed

Procedure:

1. Create a New Project:


o Open UiPath Studio and create a new process.
2. Start Recording:
o Go to the "Design" tab and click on "Recording".
o Choose the type of recording you want to perform:
 Basic Recording: Ideal for simple tasks where you record clicks and
keyboard inputs.
 Desktop Recording: Provides more control and is useful for recording
interactions on a desktop application or web browser.
 Web Recording: Optimized for recording interactions in web
applications.
3. Perform Actions to Record:
o Mouse Actions:
 Click on elements like buttons or menus. UiPath will record the
coordinates and actions.
 Drag and drop actions if needed.
o Keyboard Actions:
 Type text into input fields.
 Use keyboard shortcuts (e.g., Ctrl+C, Ctrl+V).
4. Stop Recording:
o Click the "Stop" button on the recording toolbar to finish the recording.
5. Review Recorded Actions:
o UiPath will generate a sequence based on the recorded actions.
o Review the Generated Sequence:
 Inspect the generated activities in the workflow.
 Ensure that the recorded actions match your requirements and are
correctly placed.
6. Edit Recorded Actions (if necessary):
o Adjust Properties:
 Modify properties such as selectors or input values to ensure accuracy.
o Add Logic:
 Insert additional activities or logic if needed (e.g., conditions, loops).
7. Save and Run:
o Save the workflow.
o Run the automation to verify that it correctly reproduces the recorded mouse
and keyboard actions.
8. Test and Validate:
o Test the automation in different scenarios to ensure reliability.

1
o Verify that the automation performs the desired actions accurately and handles
various conditions.

Sample Input:

 Actions: Click a button, type text into a field, press Enter, and select a menu item.

Sample Output:

 The recorded sequence reproduces the mouse clicks and keyboard inputs as
performed during the recording session.

Results:

 The automation successfully records and replays mouse and keyboard actions,
replicating the steps performed during the recording process.

Notes:

 Selectors: Ensure that UI selectors are stable and reliable, as dynamic elements on the
screen may cause issues.
 Delay and Timing: Adjust delays and timing settings if the automation needs to wait
for elements to become available or for actions to complete.

2
Exp No: 9 Scraping Data from a Website and Writing to CSV

Objective: To extract data from a website and save it into a CSV file using UiPath's web
scraping and file handling activities.

Materials Required:

 Computer with UiPath Studio installed


 Website with data to be scraped (e.g., a table or list)

Procedure:

1. Create a New Project:


o Open UiPath Studio and start a new process.
2. Open the Target Website:
o Use the “Open Browser” activity to navigate to the website from which you
want to scrape data.
 Set properties:
 URL: https://example.com (Replace with the URL of the
target website)
 BrowserType: Chrome, Firefox, or whichever browser you
use.
3. Scrape Data from the Website:
o Use Data Scraping Wizard:
 Go to the “Design” tab and select the “Data Scraping” wizard.
 Click on the data you want to scrape (e.g., a table or list).
 Follow the prompts to configure the scraping settings and select the
columns of data you need.
 Define the output as a DataTable variable (e.g., scrapedDataTable).
4. Write Data to CSV File:
o Use Write CSV Activity:
 Use the “Write CSV” activity to save the scraped data into a CSV file.
 Set properties:
 FileName: C:\Path\To\Your\File.csv (Specify the path and
name of the CSV file)
 DataTable: scrapedDataTable (Variable containing the
scraped data)
5. Handle Errors:
o Use the “Try Catch” activity to handle any exceptions that might occur during
the scraping or file writing processes.
o Log or display error messages as needed.
6. Save and Run:
o Save the workflow.
o Run it to test the scraping and CSV writing process.
7. Verify Results:
o Open the generated CSV file to ensure that the data has been correctly written.
o Verify that the CSV file contains the expected data in the correct format.

3
Sample Input:

 Website URL: https://example.com/data


 Data to be Scraped: A table with columns like Name, Age, and Email

Sample Output:

 CSV File Path: C:\Path\To\Your\File.csv


 Example CSV Content:

Name,Age,Email
John Doe,30,[email protected]
Jane Smith,25,[email protected]

Results:

 The automation successfully scrapes data from the website and writes it to a CSV file
as specified.

Notes:

 Selectors and Stability: Ensure that the selectors used in the Data Scraping wizard
are stable and correctly target the desired elements on the website.
 Data Validation: Validate the scraped data to ensure accuracy and completeness.

4
Exp No: 10 Implementing Error Handling in UiPath

Objective: To incorporate error handling mechanisms into an RPA process to manage and
respond to exceptions and errors effectively.

Materials Required:

 Computer with UiPath Studio installed


 Sample workflow where error handling will be implemented (e.g., a workflow
performing data scraping and writing to a file)

Procedure:

1. Create or Open a Project:


o Open UiPath Studio and create a new process or open an existing workflow
where you want to add error handling.
2. Identify Error-Prone Areas:
o Determine which parts of the workflow are likely to generate errors (e.g., data
scraping, file operations, web interactions).
3. Implement Basic Error Handling:
o Use Try Catch Activity:
 Drag the “Try Catch” activity into the workflow where you want to
handle potential errors.
 Place the activities that might throw exceptions inside the “Try” block.
 Define what should happen if an error occurs by placing activities in
the “Catch” block.
4. Configure Exception Handling:
o Add Catch Blocks:
 Add specific exception types in the “Catch” block to handle different
types of exceptions (e.g., System.Exception,
UiPath.Core.ElementNotFoundException).
 Use the “Catch” block to log the error, notify the user, or perform
alternative actions.
o Example Actions in Catch Block:
 Log Error: Use the “Log Message” activity to log the exception
details.
 Send Notification: Use the “Send Email” activity to send a
notification about the error.
 Retry Operation: Use the “Retry Scope” activity to retry the
operation that failed.
5. Implement Global Exception Handling (Optional):
o Use Global Exception Handler:
 Implement a global exception handler to manage exceptions that occur
throughout the entire workflow.
 In UiPath Orchestrator, configure the global exception handler settings
to specify actions for unhandled exceptions.
6. Use Retry Mechanism (Optional):
o Use Retry Scope Activity:
 Implement the “Retry Scope” activity to automatically retry a specific
operation a certain number of times before throwing an error.

5
 Configure the retry logic and conditions to define when to stop
retrying.
7. Save and Test:
o Save the workflow.
o Run the process to test the error handling implementation.
o Simulate errors to ensure that the error handling mechanisms respond
correctly.
8. Verify and Validate:
o Verify that errors are handled as expected.
o Check logs, notifications, or alternative actions to ensure proper error
management.

Sample Input:

 An operation that may fail (e.g., accessing a web page, reading a file).

Sample Output:

 Error Log Entry: "Error occurred: System.Exception: File not found."


 Notification Email: "Subject: Error Notification, Body: An error occurred during the
workflow execution."

Results:

 The automation process successfully handles errors, logs exception details, and takes
appropriate actions based on the error type.

6
Exp No: 11 Web Scraping Using UiPath

Objective: To extract structured data from a website and store it into a format like CSV or
Excel using UiPath’s web scraping capabilities.

Materials Required:

 Computer with UiPath Studio installed


 Website with data to be scraped (e.g., a table or list)

Procedure:

1. Create a New Project:


o Open UiPath Studio and start a new process.
2. Open the Target Website:
o Use the “Open Browser” activity to navigate to the website from which you want to
scrape data.
 Set properties:
 URL: https://example.com (Replace with the URL of the target
website)
 BrowserType: Chrome, Firefox, or whichever browser you use.
3. Scrape Data from the Website:
o Use Data Scraping Wizard:
 Go to the “Design” tab and select the “Data Scraping” wizard.
 Click on the data element you want to scrape (e.g., a table or list).
 Follow the wizard steps:
 Indicate on Screen: Select the first item of the data you want to
scrape.
 Extract: UiPath will automatically suggest the data to be scraped
based on the pattern.
 Configure Columns: Confirm or adjust the columns to be extracted.
 Save the Data Table: Define the output as a DataTable variable (e.g.,
scrapedDataTable).
4. Filter and Process Data (Optional):
o Use activities like “Filter Data Table” or “Assign” to process or filter the extracted
data if necessary.
 Example: Filter data to include only rows where a certain condition is met.
5. Write Data to CSV or Excel:
o Write to CSV:
 Use the “Write CSV” activity to save the scraped data into a CSV file.
 Set properties:
 FileName: C:\Path\To\Your\File.csv (Specify the path
and name of the CSV file)
 DataTable: scrapedDataTable
o Write to Excel:
 Use the “Write Range” activity if you prefer saving the data to an Excel file.
 Excel File Path: C:\Path\To\Your\File.xlsx
 DataTable: scrapedDataTable
6. Handle Errors:
o Use the “Try Catch” activity to manage potential errors during the scraping or file-
writing processes.

7
 Log or Notify: Add activities to log error details or notify if an error occurs.
7. Save and Run:
o Save the workflow.
o Run the process to test the web scraping and data writing functionalities.
8. Verify Results:
o Open the generated CSV or Excel file to ensure that the data has been correctly
scraped and saved.
o Check that the data matches what was on the website and is correctly formatted.

Sample Input:

 Website URL: https://example.com/data


 Data to be Scraped: A table with columns like Name, Age, and Email

Sample Output:

 CSV File Path: C:\Path\To\Your\File.csv


 Example CSV Content:

graphql
Copy code
Name,Age,Email
John Doe,30,[email protected]
Jane Smith,25,[email protected]

Results:

 The automation successfully extracts data from the website and writes it to the specified
CSV or Excel file.

8
Exp No: 12 Email Query Processing Using UiPath

Objective: To automate the process of reading, processing, and responding to email queries
using UiPath’s email and automation capabilities.

Materials Required:

 Computer with UiPath Studio installed


 Email account with queries (e.g., Gmail, Outlook)
 UiPath Email Activities Package (available in UiPath Studio)

Procedure:

1. Create a New Project:


o Open UiPath Studio and create a new process.
2. Configure Email Connection:
o Add Email Activities Package:
 Ensure that the UiPath.Mail.Activities package is installed. If not, go to the
“Manage Packages” section and install it.
o Setup Email Account:
 Use activities like “Get IMAP Mail Messages” or “Get Outlook Mail
Messages” depending on the email provider.
 Configure the email connection settings:
 IMAP/SMTP Settings: Provide server details, port numbers, and
credentials if using IMAP/SMTP.
 Outlook: Use default settings for Outlook integration.
3. Read Incoming Emails:
o Use Get Mail Messages Activity:
 Configure properties to fetch emails from the inbox.
 MailFolder: “Inbox” (or other folders if needed)
 Top: Number of emails to retrieve (e.g., 10)
 Filter: Optional filter to specify criteria (e.g., unread emails)
4. Process Each Email:
o For Each Activity:
 Use a “For Each” activity to iterate over the emails retrieved.
o Extract Email Details:
 Extract and process details like subject, sender, body, and attachments.
 Use string manipulation or regular expressions to identify and handle
specific queries or data.
5. Respond to Emails:
o Compose Response:
 Use the “Send Outlook Mail Message” or “Send SMTP Mail Message” activity
to reply to the email.
 To: Sender’s email address
 Subject: Appropriate subject for the reply
 Body: Compose the response based on the query
o Attach Files (if needed):
 Attach files or documents using the attachment functionality of the “Send”
activity.
6. Handle Errors:
o Use Try Catch Activity:

9
 Implement error handling to manage any issues that occur during email
processing or sending.
 Log errors or notify stakeholders if something goes wrong.
7. Mark Emails as Read (Optional):
o Update Email Status:
 Use activities to mark emails as read or move them to a different folder after
processing.
 For example, use the “Move Mail Message” activity to organize processed
emails.
8. Save and Run:
o Save the workflow.
o Run the process to test email reading, processing, and response functionalities.
9. Verify Results:
o Check the email inbox and sent items to ensure that emails are processed and
responses are sent correctly.
o Verify that queries are handled as expected and responses are appropriate.

Sample Input:

 Incoming Email:
o Subject: “Request for Information”
o Body: “Please provide the latest sales report.”
o Sender: [email protected]

Sample Output:

 Response Email:
o Subject: “Re: Request for Information”
o Body: “Dear [Sender], Please find the latest sales report attached.”
o Attachment: Sales report file

Results:

 The automation successfully reads incoming email queries, processes them, and sends
appropriate responses.

10
11

You might also like