Comment by righthand
9 days ago
I’m curious how this compares to playwrights already built in codegen:
https://playwright.dev/docs/codegen-intro
Is a chat bot easier to reiterate a test?
9 days ago
I’m curious how this compares to playwrights already built in codegen:
https://playwright.dev/docs/codegen-intro
Is a chat bot easier to reiterate a test?
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?
The purpose of using Playwright is to basically write deterministic workflows in deterministic automation code. We have basic prompt caching right now that works if the DOM doesn't change (as you mention), but also the best way to reduce token cost is to reduce reliance on AI itself. You have the most control over how much you want to rely on AI v. how much you want to write repeatable Playwright code.
3 replies →