Comment by hackgician
Comment by hackgician 9 days ago
Playwright codegen is incredibly powerful, but still pretty brittle. Its DOM selectors are still hardcoded, so you run the risk of Playwright selecting an unsustainable DOM selector. With Stagehand, the code is self-healing since it's dynamically generating Playwright every time, making it much more resilient to minor DOM changes
How do you avoid this becoming horrendously expensive per run? Are the results cached if the DOM doesn't change?