Module 4:
Recording and Scraping
Prepared by : Mrs. Swati Chilunkar
Contents
• Recording Introduction
• Recording Types
• Automatic Recording
• Manual Recording
• Scraping :
• UI Elements
• Output-or-screen-scraping-methods
• Examples-of-using-output-or-screen-scraping-methods
• About-web-scraping
• Example-of-using-web-scraping
• Data scraping
Recording
Recording
• Robotic Process Automation (RPA) is a technology that automates
repetitive tasks by mimicking human interactions with digital systems.
• Recording is one of the key features of RPA tools, allowing users to
capture actions like mouse clicks, keyboard inputs, and data entry,
which can then be converted into an automation workflow.
• RPA tools provide different types of recorders to handle various
applications, such as desktop, web, and image-based environments.
• By using recording features, organizations can significantly reduce
manual effort, improve efficiency, and ensure process accuracy.
Challenges in Recording for RPA
• Limited Flexibility – Recorded workflows may need adjustments
when application interfaces change.
• Dependency on UI Elements – If an application UI is updated,
recorded actions might break, requiring reconfiguration.
• Performance Issues – Excessive reliance on recording without
optimization may lead to inefficient and slow automation.
• Handling Dynamic Elements – Some web and desktop applications
have dynamic elements that are difficult to capture accurately.
Advantages of Recording in RPA
• Faster Automation Development – Recording reduces the time required to create automation
scripts by automatically capturing actions.
• User-Friendly Approach – Even non-technical users can build automation workflows
without extensive programming knowledge.
• Accuracy and Consistency – Automated workflows reduce human errors and ensure
consistency in repetitive tasks.
• Scalability – Recorded processes can be reused and modified to handle complex workflows.
• Cost Efficiency – Reduces operational costs by minimizing manual effort and increasing
productivity.
Real-World Applications of Recording in
RPA
• Data Entry Automation – Recording helps automate data entry from
emails, Excel, or web forms into enterprise applications.
• Customer Support Automation – Capturing agent interactions can
help automate repetitive customer service tasks.
• Invoice Processing – RPA bots can extract, validate, and enter invoice
details into accounting systems.
• HR Onboarding – Automates employee onboarding by recording
data entry into HRMS systems.
• Report Generation – Automates downloading, formatting, and
sharing reports from various enterprise tools.
Recording Types
Recording Types
• Basic Recorder (Desktop Recorder)
• Captures general mouse clicks and keyboard inputs.
• Suitable for automating simple desktop applications.
• Web Recorder
• Specifically designed for automating web-based applications.
• Captures interactions like clicking links, entering text, and selecting dropdowns.
• Smart Recorder (AI Recorder)
• Uses AI to recognize elements dynamically.
• More resilient to UI changes compared to Basic Recorder.
Recording Types
•Screen Recorder (Image-Based Recording)
•Captures actions based on screen coordinates.
•Used when elements cannot be identified using selectors (e.g., virtual
environments).
•Custom Recorder (Manual Recording)
•Allows users to define actions manually for greater control.
•Used in complex workflows where automated recording is insufficient.
Automatic Recording
Automatic Recording
• Automatic Recording in Robotic Process Automation (RPA) refers
to the feature where the RPA tool captures user interactions with
applications and translates them into automation workflows without
manual intervention.
• This feature helps speed up bot development by automatically
identifying UI elements, recording actions, and generating automation
scripts.
Advantages of Automatic Recording
• Speeds Up Development – Eliminates the need to manually define
each step.
• User-Friendly – Non-programmers can create automation workflows
easily.
• Increases Accuracy – Captures exact user actions, reducing errors in
automation.
• Enhances Productivity – Quickly creates bots that automate
repetitive tasks.
Challenges of Automatic Recording
• Less Flexibility – Directly recorded workflows might not handle
exceptions well.
• UI Dependency – If UI elements change, automation may break.
• Performance Issues – Unoptimized recorded workflows can be
slower than manually designed ones.
Use Cases of Automatic Recording
• Data Entry Automation – Automating form filling and data
extraction.
• Invoice Processing – Capturing invoice details and entering them into
ERP systems.
• Customer Service – Automating ticket responses based on recorded
interactions.
• HR & Payroll Processing – Recording employee data updates for
HRMS automation.
How to Use Automatic Recording in
UiPath
• Step 1: Open UiPath Studio
• Launch UiPath Studio and create a new Process or Project.
• Step 2: Select the Recorder
• Go to Design Tab → Recording and choose the appropriate recording type (Basic,
Desktop, Web, etc.).
• Step 3: Start Recording
• Click Record, and UiPath will capture all user interactions like clicks, typing, and
navigation.
• Step 4: Edit and Enhance the Workflow
• After recording, UiPath converts actions into an automation sequence.
• You can edit, add conditions, loops, or exception handling as needed.
• Step 5: Run the Automation
• Click Run to test the recorded workflow.
• If needed, make modifications for better efficiency and reliability.
Manual Recording
Manual Recording
• Manual Recording in UiPath refers to the process of creating
automation workflows by manually defining activities instead of
relying on automatic recording.
• It provides greater flexibility and control over the automation
process, allowing developers to customize each step according to
specific requirements.
When to Use Manual Recording?
• The process involves complex logic that automatic recording cannot
handle.
• The UI elements change dynamically, making recorded selectors
unreliable.
• You need to optimize and customize recorded workflows for better
efficiency.
• The automation requires conditional statements, loops, and exception
handling.
Advantages of Manual Recording in
UiPath
• More Control & Flexibility – Allows customization and
optimization.
• Better Handling of Dynamic UI – Unlike automatic recording, you
can fine-tune selectors.
• Improved Performance – Eliminates unnecessary recorded actions,
making automation faster.
• Scalability – Manual workflows are easier to scale and modify for
future requirements.
Challenges of Manual Recording
• Time-Consuming – Requires manual effort compared to automatic
recording.
• Requires UI Knowledge – Developers must understand selectors and
UI hierarchy.
• Higher Learning Curve – Beginners may find it difficult compared
to automatic recording.
Steps for Manual Recording in UiPath
• Step 1: Open UiPath Studio
• Launch UiPath Studio and create a new Process or Project.
• Step 2: Add Activities Manually
• Navigate to the Activities Pane and search for the required activity.
• Drag and drop activities like Click, Type Into, Get Text, If Conditions, Loops into the
workflow.
• Step 3: Configure UI Elements
• Use UI Explorer to identify and validate selectors for buttons, text fields, and other elements.
• Modify selectors to make them dynamic (avoid hardcoded values).
• Step 4: Add Control Flow Elements
• Implement decision-making activities like If, Switch, While, and For Each.
• Use Try-Catch blocks for error handling to make automation robust.
• Step 5: Test and Debug
• Run the workflow using the Debug Mode to check for errors.
• Make adjustments if needed and optimize the process.
Scraping
Data scraping
Data Scraping
• Data Scraping in UiPath is a technique used to extract structured data
from websites, applications, and documents.
• It allows RPA bots to collect and process large volumes of data
efficiently. UiPath provides two main methods for data extraction:
1. Data Scraping (Structured Data Extraction) – Extracts tables, lists, and
patterns from web pages.
2. Screen Scraping (Unstructured Data Extraction) – Captures text from
images, PDFs, and Citrix environments.
Data Scraping (Structured Data
Extraction)
• Steps for Data Scraping in UiPath
• Step 1: Open UiPath Studio and create a new project.
• Step 2: Navigate to Design Tab → Data Scraping.
• Step 3: Click on the "Extract Wizard" and select the web page or application.
• Step 4: Choose the first element and then the second element to define the
pattern.
• Step 5: Select whether to extract text, numbers, URLs, or other attributes.
• Step 6: Configure pagination if data spans multiple pages.
• Step 7: Store the extracted data in a DataTable variable for further processing.
Screen Scraping (Unstructured Data
Extraction)
• This method is used when data is not structured, such as text
embedded in images, PDFs, or Citrix environments.
• Methods of Screen Scraping
• Full Text – Extracts text accurately and quickly.
• Native – Extracts text with formatting and is faster than OCR.
• OCR (Optical Character Recognition) – Used for image-based text
extraction (Google OCR, Tesseract, or Microsoft OCR).
Steps for Screen Scraping in UiPath
• Step 1: Open UiPath Studio and go to Design Tab → Screen
Scraping.
• Step 2: Select the area where the text is present.
• Step 3: Choose Full Text, Native, or OCR based on the type of data.
• Step 4: Store the extracted data into a variable or DataTable.
Comparison: Data Scraping vs. Screen
Scraping
Feature Data Scraping Screen Scraping
Data Type Structured (tables, lists) Unstructured (images, PDFs)
Speed Fast Slower due to OCR processing
Accuracy High OCR-based methods may have errors
Use Case Web and app automation Citrix, PDFs, and scanned documents
Advantages of Data Scraping in UiPath
• Automates repetitive data extraction tasks
• Handles large volumes of data efficiently
• Works with web applications and desktop apps
• Can integrate with databases, Excel, and APIs
Use Cases of Data Scraping in UiPath
• E-commerce Automation – Extract product details from Amazon,
Flipkart, etc.
• Financial Data Extraction – Scrape stock market prices, exchange
rates.
• HR Automation – Extract resumes and process job applications.
• Invoice Processing – Scrape invoice details from scanned PDFs.
UI Elements
UI element
• UI element scraping in Robotic Process Automation (RPA) refers to
extracting data from user interface elements like text boxes, labels,
buttons, dropdowns, and tables in applications or websites.
• RPA tools like UiPath, Automation Anywhere, and Blue Prism
provide built-in features for UI scraping, but you can also use code to
handle UI elements and scrape data.
Steps for UI Element Scraping in RPA:
1. Identifying UI Elements: RPA tools use selectors (like XPath, CSS
selectors, or UI element attributes) to locate UI elements on the screen.
2. Scraping Text/Data: Extract text or values from UI elements like
labels, input fields, dropdowns, and tables.
3. Interaction with UI Elements: You can interact with these UI
elements to extract data, like reading text or checking if a button is
enabled or disabled.
Common UI Scraping Techniques in RPA
1. Selectors:
1. UI elements can be identified by selectors (unique identifiers for elements like ID,
name, class, XPath).
2. Make sure to use reliable selectors that won’t change dynamically. Tools like UiPath
provide ways to validate and fine-tune selectors.
2. OCR (Optical Character Recognition):
1. For scraping data from scanned images, non-interactive applications, or legacy
software, OCR is a useful method.
2. RPA tools integrate with OCR engines like Google OCR or Microsoft OCR to extract
text from images or screen regions.
3. Regular Expressions:
1. For dynamic text that needs further filtering or parsing, regular expressions can be
used to match and extract specific patterns.
4. Waits and Timeouts:
1. When scraping UI elements, use Wait for Element or Timeout functionality to handle
cases where the UI elements are not immediately available or if the screen takes time
to load.
Output-or-screen-scraping-met
hods
Output or Screen Scraping Methods
• Output or Screen Scraping Methods in Robotic Process Automation
(RPA) are techniques used to extract data or information from the screen or
output of applications where direct access to the underlying data (e.g.,
through APIs or databases) isn't available.
• These methods allow an RPA bot to interact with the graphical user
interface (GUI) and "read" or capture the content displayed on the screen.
• There are two primary types of output or screen scraping techniques:
1. Text-Based Scraping (Structured and Unstructured)
• This method extracts text from visible elements such as labels, input fields, buttons, and other UI
components.
• It can also handle unstructured text displayed in non-standardized formats.
2. Image-Based Scraping (OCR-Based)
• This method uses Optical Character Recognition (OCR) to capture and extract text from images,
non-selectable UI elements, or screenshots.
1. Text Scraping:
• Text scraping involves extracting readable text from UI elements on the screen.
There are two common approaches:
• Standard UI Element Scraping: RPA tools can interact with UI elements like
text fields, labels, buttons, or tables and extract visible text directly. This is the
most reliable method because it doesn’t depend on the screen's visual
representation.
• For example, in UiPath:
• The "Get Text" activity can be used to extract text from a specific UI element (like a
label or a textbox).
• Get Attribute activity can be used to scrape attributes like the value of a dropdown or
the state of a checkbox.
• For example, in Automation Anywhere:
• Use the "Text Scraping" command to capture text from specified regions of the screen
or applications.
• The "Screen Scraping" command can also be used to capture text from areas where
text cannot be copied directly.
1. Text Scraping:
• Screen Scraping (Using Regions): Sometimes, UI elements are not
directly accessible (e.g., images, embedded text in custom controls). In
this case, a region of the screen can be specified, and text will be
extracted from that region.
• Screen Scraping: Tools like UiPath have a Screen Scraping wizard
that allows you to define a region of the screen from which you want
to scrape text. This is often useful for applications that do not expose
text in a structured way.
• In UiPath:
• The Screen Scraping activity uses a combination of OCR and text
recognition to extract text from screen images.
2. Image-Based Scraping (OCR-Based)
• Optical Character Recognition (OCR) is an essential method for screen
scraping, particularly when the text is embedded in images or when dealing
with applications where text cannot be directly copied.
• OCR Scraping: RPA tools employ OCR to convert text in images, scanned
documents, or non-selectable UI elements into readable text. OCR can be
used when traditional methods of text scraping are not possible (e.g.,
image-based buttons, legacy systems, etc.).
• Google OCR, Microsoft OCR, and Tesseract OCR are some of the common OCR
engines used in RPA tools.
• For example, in UiPath:
• The "Screen Scraping" activity utilizes OCR engines like Google OCR, Microsoft
OCR, or Tesseract to capture text from images.
• This method is useful for capturing text from scanned documents, images, or
applications that do not allow direct text extraction.
3. Recording Screen Coordinates
(Region-Based Scraping):
• This method is especially useful when you want to capture data from specific
regions on the screen, such as part of a report, or a section in an application that
consistently appears in the same area.
• Screen Coordinates: Using screen coordinates, you can define specific regions
to scrape text or images from. This is useful when data consistently appears in
the same position but is not exposed through standard UI elements.
• In UiPath:
• The "Get Text" activity allows you to define a screen region from which to extract text.
• "Click" and "Type Into" activities can be used to interact with specific regions of the
screen based on coordinates.
• In Automation Anywhere:
• Use Screen Scraping to define a region for scraping data from a part of the screen.
Methods of Output Scraping Based on
Data Type
• 1. Structured Data Scraping (Tables and Grids):
• Many RPA tools support structured data scraping, like web tables or grids, and
automatically map rows and columns for extraction.
• Example in UiPath: The Data Scraping wizard is a powerful tool that can
extract data from tables or grids on a screen. It automatically identifies rows
and columns and stores them in a structured format like a DataTable.
• 2. Unstructured Data Scraping (Free Text or Labels):
• For extracting text from unstructured elements, OCR or region-based scraping
is often used.
Key Considerations and Challenges in
Output Scraping
• Accuracy: OCR-based scraping can introduce errors, especially when the
text is hard to recognize or has a low contrast with the background.
• Resolution and Quality: The quality of the image or screen can impact the
effectiveness of OCR. Always try to ensure good resolution and minimal
noise when using OCR.
• Dynamic Content: Some content on the screen may change dynamically
(e.g., loading spinners, popups). It’s essential to incorporate wait times or
timeouts in your RPA flow to ensure that content is available before
scraping.
• Performance: Screen scraping can be slower compared to other methods,
especially when OCR is involved. Consider optimizing your workflow to
reduce the time spent on scraping.
Examples-of-using-output-or-sc
reen-scraping-methods
About-web-scraping
Web scraping
• Web scraping is the process of extracting data from websites. It
typically involves sending HTTP requests to a webpage, extracting the
HTML content, and parsing that content to retrieve useful data.
• Web scraping is a common technique used in Robotic Process
Automation (RPA), data collection, and data analysis to gather
information from web pages that doesn’t have an API or other
structured data access methods.
1. HTML Parsing
• RPA tools can extract data by parsing the HTML structure of a
webpage. HTML elements are identified using CSS selectors, XPath,
or UI elements (like buttons, tables, divs, etc.).
• Example Use Case: Scraping product names, prices, and descriptions
from an e-commerce site.
• XPath and CSS Selectors: RPA tools allow you to extract specific
elements from the webpage using XPath or CSS selectors, which
identify HTML elements based on their tag, ID, class, or other
attributes.
2. Browser Automation (UI Interaction)
• In cases where data is dynamic (e.g., requires clicks, dropdown
selections, or interactions to load), RPA tools can control a browser to
simulate user behavior and extract the information.
• Simulating User Interactions: Tools like UiPath, Automation
Anywhere, or Blue Prism provide browser automation features to
click buttons, navigate through pages, and extract data from the
rendered webpage.
• Example: If you need to scrape data from a website after selecting
filters or navigating to different tabs, the bot can perform these actions
(like clicking on a "Next" button or selecting a dropdown option).
3. Scraping Structured Data (Tables, Lists,
Grids)
• Many websites display data in structured formats like tables or grids.
RPA tools provide specific functionalities for scraping this structured
data in a row-by-row or column-by-column format.
• Example in UiPath:
• Data Scraping Wizard: UiPath's Data Scraping wizard automatically detects
and extracts structured data (like tables) from web pages, identifying columns,
rows, and headers.
• The output is typically stored in a DataTable format, making it easier to
manipulate or export.
4. Screen Scraping (OCR-Based)
• When the text on a webpage is embedded in images or cannot be
selected or copied (e.g., in custom-designed controls or scanned
documents), Optical Character Recognition (OCR) can be used to
extract the text from the screen.
• OCR methods are generally less accurate than direct scraping but work
in cases where other methods fail.
• In UiPath:
• Screen Scraping activity uses OCR engines (e.g., Google OCR, Microsoft
OCR, Tesseract OCR) to extract text from non-selectable content on the
screen.
5. Dealing with Dynamic Web Pages
(JavaScript Content)
• Some websites use JavaScript to dynamically load content.
Traditional web scraping techniques might not work in such cases, as
the data is rendered only after the page is fully loaded via JavaScript
execution.
• Solution: Use browser automation tools like Selenium (which can
be integrated into RPA platforms) to simulate interactions and ensure
that dynamic content is fully loaded before scraping the data.
• In UiPath, you can use:
• Use Browser activity to open the web page and interact with dynamic content.
• Delay activity to wait for content to load completely.
6. Using APIs for Web Scraping
• If a website exposes an API (which is often a more efficient and
structured way to get data), RPA tools can make HTTP requests to
retrieve data in a structured format (usually JSON or XML).
• Example: Many e-commerce websites provide APIs to fetch product
details or reviews, which are much easier to work with than scraping
HTML.
• In UiPath, you can use the HTTP Request activity to interact with
the API.
Best Practices for Web Scraping in RPA
• Check the [Link]: Ensure that scraping a website is allowed by
checking the [Link] file. If the site disallows scraping, respect that.
• Handle Errors Gracefully: Websites can change or experience
downtime, so make sure your RPA workflows can handle such scenarios,
such as retrying failed actions or logging errors for manual intervention.
• Throttle Your Requests: Implement delays between scraping actions to
avoid overwhelming the server and potentially getting blocked.
• Monitor for Website Changes: Websites may change their layout or
structure, which can break your scraping workflows. Regularly monitor
the websites to detect changes in HTML structure or layout.
• Data Validation: After scraping, always validate the extracted data to
ensure accuracy before using it for further processing.
Important Questions
• Define recording in RPA with one example.
• List different types of recording available in RPA tools.
• What are UI elements in RPA?
• Identify any two screen scraping methods.
• Define web scraping.
• State one difference between data scraping and screen scraping.
• List any two applications of web scraping in RPA.
• Apply recording techniques to automate a login process.
• Analyze the role of UI elements in reliable automation.
• Compare automatic and manual recording with suitable examples.
• Apply screen scraping techniques to extract data from desktop applications.
Important Questions
• Analyze the working of web scraping in extracting structured data.
• Evaluate the effectiveness of different scraping methods.
• Analyze challenges in scraping dynamic web content.
• Design an RPA workflow to extract data from a website using web scraping.
• Analyze the selection of appropriate scraping methods for different scenarios.
• Evaluate recording techniques in terms of speed, accuracy, and maintainability.
• Design a bot to extract and store data from multiple web pages using scraping.
• Analyze how UI element identification impacts scraping accuracy.
• Evaluate different approaches to handle dynamic and unstructured data extraction.
• Propose a scalable data extraction framework using recording and scraping
techniques.