How UiPath Healing Agent Rescued Our MES Automation from Frequent UI Failures


📌 Introduction

In the ever-evolving world of enterprise applications, even small UI changes can bring critical automations to a standstill. This was exactly the challenge we faced with our MES (Manufacturing Execution System) interface when a routine front-end update disrupted our inventory workflow. Manual fixes weren’t scalable, and we needed a smarter way to ensure automation continuity. That’s where UiPath’s Healing Agent stepped in — acting as a silent guardian, intelligently recovering from UI selector breaks without human intervention.

In this blog, we’ll walk through a real-world use case where we implemented Healing Agent in a complex MES automation — highlighting its role, implementation strategy, and business impact.


🏭 Use Case Background: MES-Based Inventory Template Automation

Our internal MES system includes several tightly coupled modules — one of them being Part SMH Master, used for managing stock and design part updates. Previously, a UiPath robot automated the process of downloading templates, collecting supplier data, comparing and filtering part numbers, and finally uploading updated records. This process involves multiple UI elements: dropdowns, tables, export buttons, and pop-up confirmations.

However, after a seemingly minor UI redesign of the MES portal, this critical automation started failing silently. The root cause? Broken UI selectors due to HTML structure changes, updated element names, and layout shifts.


❌ Problem Statement: Fragile UI Automation Breaks Down

Let’s break down the issues we were facing:

  • MES UI changes broke selectors: Existing selectors were no longer identifying key fields like download links, supplier dropdowns, and upload buttons.

  • Manual fix was not scalable: Each fix required debugging, inspecting new attributes, modifying selectors, testing, and republishing the automation — wasting hours.

  • Bot downtime increased: Every UI tweak meant manual intervention and lost automation uptime.

  • Inconsistent failures: Some suppliers worked, others failed — making the automation unreliable and hard to monitor.

We needed a solution that could adapt to UI changes automatically, especially for a process that spans multiple pages and elements.


✅ The Healing Agent Approach: Smarter Selector Recovery

Instead of rebuilding our selectors from scratch, we chose to enable UiPath's Healing Agent — a feature designed to intelligently recover broken selectors by using historical execution metadata, fuzzy matching, and UI structure learning.

🔧 Implementation Highlights

We identified key automation stages that were prone to selector breaks:

  1. Download template from MES system

  2. Export supplier data from multiple sub-pages

  3. Upload updated template after data processing

Here’s how we redesigned the process:

🧠 Healing Agent in Action

  • During Download Template: The bot could no longer click the ‘Download’ button due to a changed id and new div layout. Healing Agent intercepted the failure, found the best match using old element history and visual hierarchy, and recovered automatically.

  • During Supplier Data Export: Since each supplier had slightly different page layouts, traditional selectors failed frequently. Healing Agent adapted to each supplier's layout change and applied dynamic healing logic during runtime.

  • During File Upload: The Confirm button’s location and tag structure had changed. The Healing Agent recognized this and allowed the upload step to proceed smoothly.

All of this happened without any human debugging or selector editing.


🔄 Process Flow Overview (with Healing Agent)

Start → Login to MES → 
    ↓
Healing Agent Layer (Active)  
    ↓
Download Template → Export Supplier Data → Merge/Filter → Validate Parts → Upload Template →
 Send Summary → End

💡 Healing Agent sits in the middle layer and oversees the UI interactions — dynamically healing selectors wherever needed.


✅ UiPath Solution Workflow with Healing Agent


1. Start Process

  • Initialize the bot

  • Load required configuration (file paths, supplier list, mail settings)


2. Login to MES Portal

  • Use secure credentials from Orchestrator Assets

  • Navigate to MES home screen


3. Healing Agent Activated

  • Enable UiPath Healing Agent globally for the workflow

  • This monitors and auto-recovers broken selectors during execution


4. Download Template from MES

  • Navigate to “Part SMH Master” page

  • Use dynamic selectors for the Download Template button

  • Healing Agent auto-heals if selector fails due to UI change


5. Loop Through Supplier Pages

  • For each supplier in config list:

    • Navigate to the supplier-specific planning page

    • Click “Requisition Sheet Generation”

    • Export the supplier data

    • Healing Agent handles variations in page layout or element attributes


6. Merge and Filter Data

  • Combine all exported supplier files

  • Sort by Part Number (A–Z) and Design Level (Z–A)

  • Filter rows where SMH = 0.00000

  • Clean columns, remove duplicates

  • Add column “Year = 2016”


7. Extract First 3 Distinct Part Numbers

  • Group filtered data by Part Number

  • Select first 3 distinct values


8. Download Part Details from MES

  • Navigate to “Part SMH Master”

  • Search each of the 3 part numbers

  • Export their current details to Excel


9. Compare and Update Template

  • Compare Part No and Design Level with the new merged data

  • If match found:

    • Copy columns D to J from Part SMH file

    • Paste into the downloaded template


10. Upload Updated Template

  • Go to “Part SMH Master”

  • Click Upload Template button

  • Choose updated Excel file

  • Click Confirm on popup

  • Healing Agent intervenes if selector mismatches happen


11. Send Completion Email

  • If upload is successful:

    • Send summary email with success message

  • If upload fails:

    • Attach updated template in failure email for review


12. End Process

  • Clean temporary files

  • Log status to Orchestrator

  • Exit bot gracefully


🔁 Key Healing Agent Checkpoints:

  • Download Template → Auto-recover from changes in buttons or labels

  • Supplier Export → Auto-adjust to each supplier’s UI variation

  • Upload Template → Heal any updated popup/button selectors



📈 Business Impact: Resilient Automation at Scale

After integrating Healing Agent, we observed immediate and measurable benefits.

⏱️ Time & Cost Savings

  • Saved 6–8 hours of manual effort per incident (no need to inspect selectors, re-record, or test workflows)

  • Zero downtime from minor UI changes — bot ran with 100% success across UI updates

🔄 Improved Maintainability

  • Maintenance tasks dropped by 80%

  • Team could focus on new automations instead of firefighting broken ones

📦 Increased Scalability

  • Confidently scaled the bot to support more suppliers and processes

  • Healing Agent handled all UI variances in supplier export pages

📬 Improved Reporting

  • Bot auto-sends email on success or failure

  • Failure summary includes auto-healed UI history for audit


💬 Real-World Lessons & Tips

  • Enable Healing Agent from the start if you’re working with legacy or unstable web UIs.

  • Healing Agent works best when past successful runs exist — so avoid resetting execution history frequently.

  • Combine Healing Agent with robust logging and retry mechanisms to create enterprise-grade resilience.

  • Avoid over-specifying selectors; Healing Agent thrives when flexible selectors are used (e.g., fuzzy anchors).


🧩 Final Thoughts

The UiPath Healing Agent isn't just a nice-to-have; it's a game-changing automation safeguard. In our MES automation scenario, it helped us transform a fragile, failure-prone workflow into a self-healing, robust automation that continues to save effort and reduce risk every day.

By placing the Healing Agent in the center of our design — not just as a fallback but as an integral part of the runtime — we’ve unlocked a new standard of reliability in RPA.

If your automations are constantly breaking due to UI changes, don’t wait. Let Healing Agent do the healing — so your team can do the building.


Ref Image:

🌟 Stay Ahead in RPA with UiPath 🌟

💡 Follow us for daily updates and exclusive insights into the world of RPA

🔍 Discover the Latest Trends
🚀 Master RPA Tools & Techniques
💼 Gain Expert Insights and Advice

👉 Be Part of the RPA Revolution Today!
🔔 Subscribe Now for Exclusive Content and Updates!

Comments

Popular posts from this blog

UiPath RPA for Freshers: A Step-by-Step Guide to Learning with Practical Tips & Projects

A Beginner's Guide to Document Understanding in UiPath: Unlocking the Power of Intelligent Automation

The Rise of Agentic Automation: A UiPath RPA Story