Show HN: Libretto PR 代理 —— 自动修复失败的 Playwright 脚本
Show HN: Libretto PR agents – Automatically fix failing playwright scripts

原始链接: https://libretto.sh/debug-agents

保留您现有的浏览器自动化测试。当测试失败时,Libretto 会自动分析实时页面,并提交一个包含代码修复建议的 GitHub Pull Request。 OpenLibretto 自动修复 Playwright 错误 libretto-agent 想要将 1 个提交合并到 main 分支 workflows/book-appointment.ts - await page.locator('input[name="username"]').fill(login); + await page.locator('input[name="login"]').fill(login); 经检查实时页面确认,登录字段的名称为 name="login"。

Libretto PR Agent 是一个全新的开源 TypeScript 库,旨在自动化维护现有的 Playwright 浏览器脚本。Libretto 无需开发者迁移到复杂的 AI 驱动浏览器框架,只需一行代码即可集成到当前的工作流程中。 当 Playwright 脚本运行失败时,该代理会利用浏览器的 CDP(Chrome DevTools Protocol)会话检查错误、分析页面,并自动生成包含修复建议的 GitHub 合并请求(Pull Request)。 主要功能包括: * **非侵入式:** 无需重写框架,即可与现有代码库兼容。 * **确定性:** 在保持硬编码 Playwright 脚本速度和可靠性的同时,增加了 AI 辅助的自动修复功能。 * **灵活性:** 免费且开源,开发者可以使用自己的 LLM API 密钥,并支持任何浏览器提供商。 通过自动处理调试和更新失效选择器或工作流的繁琐过程,Libretto 旨在降低维护生产级浏览器自动化任务的团队开销。源代码现已在 GitHub 的 Saffron Health 仓库中开源。
相关文章

原文

Keep the browser automations you already run. When one fails, Libretto investigates the live page and opens a GitHub pull request with a proposed code fix.

OpenLibretto autofix for Playwright failure

libretto-agent wants to merge 1 commit into main

workflows/book-appointment.ts

- await page.locator('input[name="username"]').fill(login);

+ await page.locator('input[name="login"]').fill(login);

The sign-in field is name="login", confirmed by inspecting the live page.

联系我们 contact @ memedata.com