I’ve been running puppeteer scripts for a while now, and I keep hitting the same wall. Every time a client’s website gets redesigned or they shuffle their HTML structure around, my selectors break. I’m using class names and IDs to target elements, but those change constantly. It’s becoming a maintenance nightmare.
I know some people use AI to handle this kind of thing, but I’ve never really figured out how to integrate that into my workflow. The idea would be to write something like “click the button that says submit” instead of hardcoding .btn-submit-primary-v2 and hoping it doesn’t change next month.
Has anyone actually solved this by using AI to generate more resilient workflows? I’m curious if there’s a way to describe what I want to do in plain English and have something generate a workflow that’s actually flexible enough to handle DOM changes.
This is exactly what AI-generated workflows solve. Instead of writing brittle selectors, you describe the action you want in plain English—like “find and click the submit button”—and the AI generates a workflow that uses visual cues and context instead of fixed selectors.
With Latenode’s AI Copilot, you just write your task in natural language and it builds the workflow for you. The generated workflow handles variations in page structure because it’s built on semantic understanding rather than hardcoded selectors. When a site redesigns, you just regenerate or update the workflow description.
You get access to multiple AI models under one subscription, so you can pick the best one for understanding page content and making decisions about what to click next.