Stagehand extends the power of Playwright, allowing you to reliably automate browsers in natural language.
npx create-browser-app
// Keep your Playwright code unchanged
page.goto("orderfood.com")
page.observe({
instruction: "Find the search bar"
})
page.extract({
instruction: "Extract the price of milk",
schema: z.object({ price: z.number(), }),
})
page.act({
action: "Click 'Add to cart'"
})