A diagnostic guide for automation that keeps failing: selector drift after portal redesigns, MFA walls, and UI-layer latency that compounds at volume. Covers Selenium, Playwright, Puppeteer, UiPath, Power Automate Desktop, and Automation Anywhere, with a routing table from symptom to fix.

Your bot worked for months. Then the portal shipped a redesign, or added an MFA step, or moved a button, and now the workflow that finance depends on is throwing errors at 2 a.m. If that story sounds familiar, this guide is the diagnostic. It covers every major tool class: browser automation frameworks (Selenium, Playwright, Puppeteer) and RPA platforms (UiPath, Power Automate Desktop, Automation Anywhere), because they all fail the same way, for the same structural reason. They operate at the UI layer, and the UI layer moves.
There are three stages to this problem, and most teams walk through them in order: debugging the break in front of you, recognizing the pattern of repeated breaks, and finally rethinking the architecture. Find your stage below, or jump straight to the routing table.
| Your situation | Likely cause | Recommended approach | Where an API fits |
|---|---|---|---|
| My bot broke once | A selector, wait, or credential went stale after a portal change | Re-inspect the page, patch the selector, add explicit waits | Not yet; patch and move on |
| It breaks every month | Selector drift from an actively developed portal, plus anti-bot friction | Centralize selectors, add monitoring, budget a maintenance rotation | Start pricing the alternative; recurring breaks are a structural signal |
| It's too slow for the volume I need | UI-layer execution: every step waits on a render | Parallelize bots or browser sessions, accept the concurrency ceiling | This is the strongest API signal; backend calls have no render wait |
| I need a permanent fix | The workflow depends on a layout you don't control | Move the workflow off the UI layer | An API-based integration, official or managed by Supergood, removes the UI dependency entirely |
Every tool surfaces the same underlying failure with a different error name. Selenium throws NoSuchElementException. Playwright throws TimeoutError waiting for a locator. Puppeteer times out on navigation. UiPath reports a selector not found. Power Automate Desktop fails on a UI element it can't locate. Automation Anywhere logs an object-cloning error. Different vocabularies, one event: the page changed, and the reference your automation held is now pointing at nothing.
The immediate fix is the same everywhere. Open the portal, inspect the element, find where it moved, and update the selector, anchor, or object repository entry. Add an explicit wait if dynamic content is racing your script. Re-run. For the tool-specific version of this triage, with named errors and their fixes, see the dedicated guides: why Selenium keeps breaking, why Playwright keeps failing, why Puppeteer keeps breaking, why UiPath bots break after portal updates, why Power Automate Desktop flows break, and why Automation Anywhere bots break.
The debugging stage is fine, once. The problem is when it becomes a subscription.
Selector drift is the single most common failure mode across every tool in this class, and it is not bad luck. UI-layer tools target CSS selectors, XPaths, or visual element coordinates. Those references become invalid the moment a designer moves a button, renames a class, or restructures a form. The portal's developers are not being careless; they are doing their job. Their UI is a product surface, not an API contract, and nobody promised you it would hold still.
The maintenance cycle looks like this: portal updates, bot breaks, a developer triages, the selector gets updated, and the cycle repeats next quarter. A typical enterprise portal redesigns meaningfully 1 to 3 times per year, and each break costs 4 to 16 hours of developer time to diagnose and patch. That is per workflow, per portal. Multiply by the number of bots in production and you get the standing maintenance rotation that most RPA programs quietly staff.
Two other recurring patterns belong to this stage:
Even when nothing is broken, UI-layer automation carries a structural cost that compounds with volume: latency.
RPA and browser automation operate at the UI layer, which means every step waits for a screen to render before the next action fires. A single RPA step typically takes 2 to 10 seconds: click, wait, read, repeat. Browser automation compounds this, because a headless browser must fully load the page, execute its JavaScript, and wait for dynamic content before a selector even resolves. Contrast a direct API call: sub-100ms, no render wait, no concurrency ceiling tied to UI threads.
Here is what that difference does at scale, for a representative 30-second UI workflow whose backend equivalent is a handful of API calls completing in about one second:
| Monthly runs | UI-layer bot time (30s/run) | API time (~1s/run) |
|---|---|---|
| 1,000 | ~8.3 hours | ~17 minutes |
| 10,000 | ~83 hours | ~2.8 hours |
| 100,000 | ~833 hours | ~28 hours |
At 10,000 monthly runs, that 83 hours of bot time starts colliding with per-bot concurrency limits, which is when teams start buying more bots or more hosted browser sessions to run the same work in parallel. Latency is not just a UX problem; it is a cost and reliability problem. Slow bots time out, hit session limits, and fail silently on dynamic portals. The full unit economics, including the ~$0.15 per-session floor for hosted browsers and the ~$1.00 realistic cost per completed multi-step workflow, are worked through in the true cost of browser automation past 10,000 calls a month.
Take one enterprise portal integration and add up a year of ownership. Assumptions stated, arithmetic only.
Assume two portal redesigns in the year at 10 dev-hours each, one authentication change at 8 hours, and 2 hours a month of routine babysitting (flaky waits, retries, credential rotation).
| Cost line | UI-layer automation (12 months) | API integration (12 months) |
|---|---|---|
| Redesign breaks | 2 × 10 hrs = 20 hrs | 0 hrs (no UI dependency) |
| Auth changes | 8 hrs | Handled by the integration layer |
| Routine babysitting | 24 hrs | ~0 hrs |
| Total dev time | ~52 hrs | ~0 hrs after setup |
Fifty-two hours is more than a working week of a senior engineer, every year, per portal, to keep one workflow standing still. The same year on an API integration is a rounding error, because the thing that breaks UI automation, the portal's visual layer changing, does not touch an integration that talks to the backend. That asymmetry is the whole argument of RPA vs API integration.
If the portal has an official API that covers your workflow, use it. That is the boring, correct answer, and the decision guide covers when it applies.
The hard case is the one this failure arc usually ends at: the portal has no public API, or the API doesn't cover the workflow your bot performs. That is the gap Supergood exists for. Supergood generates and maintains REST and MCP APIs for enterprise software that has no public API, by working at the network layer the portal's own frontend uses. Same backend, no page render, no selectors to drift. When the portal redesigns its UI, nothing happens to the integration, and when the backend itself changes, a maintenance agent detects it and ships the fix. The comparison pages walk through the specifics against each tool class: Supergood vs UiPath, Supergood vs Playwright, and Supergood vs RPA.
Tool-specific diagnostics, each with named errors, a routing table, and the worked maintenance math:
Why does my automation keep breaking? Almost always because it operates at the UI layer. Browser automation and RPA target CSS selectors, XPaths, or screen coordinates, and those references go stale the moment the portal ships a redesign, an A/B test, or a new authentication step. The tool didn't get worse; the surface it depends on moved.
What do I do when the website changes and breaks my automation? Short term: re-inspect the page, update the broken selectors, re-run, and budget 4 to 16 hours for the break. Long term: count how many times you've done this. Portals redesign 1 to 3 times a year, so if the workflow matters, the durable fix is moving it off the UI layer onto an API-based integration.
Why is my RPA so slow? RPA executes at human speed by design: every step waits for a screen to render, so a single step takes 2 to 10 seconds. A 30-second workflow at 10,000 monthly runs consumes ~83 hours of bot time and collides with per-bot concurrency limits. The equivalent API call completes in under a second.
How much does automation maintenance cost per year? Plan on 1 to 3 redesign breaks a year at 4 to 16 dev-hours each, per workflow, per portal, plus routine babysitting of waits, retries, and MFA prompts. The worked example above lands at ~52 hours a year for a single portal integration.
When should I stop patching and rethink the architecture? When the same workflow has broken more than twice in a year, when volume passes a few thousand runs a month, or when a silent failure has shipped wrong data downstream. Any one of those means maintenance is now a recurring cost, and the architectural fix pays for itself.