I’ve been running puppeteer scripts in production for a while now, and honestly, the fragility gets to me. Every time the client tweaks their site layout or changes a button class, my entire automation breaks. I end up spending hours debugging selectors and rewriting portions of the script just to keep things running.
I started thinking about this differently though. What if instead of manually writing out all the puppeteer logic and hoping it survives the next UI update, I could describe what I actually want to do in plain language? Like “click the login button, fill the email field, wait for the dashboard to load” and have something actually build that workflow for me.
Then I wouldn’t need to maintain brittle CSS selectors or rewrite logic every time the markup shifts. The workflow generation would theoretically adapt or at least give me a clearer structure to work from.
Has anyone dealt with this kind of brittleness before? How do you keep your automations from falling apart when designs change?