Playwright Commander — Playwright 命令器
v1.0.0使用Playwright与网页浏览器交互的技能,实现高级UI自动化、分析和调试。
运行时依赖
安装命令
点击复制本土化适配说明
Playwright Commander — Playwright 命令器 安装说明: 安装命令:["openclaw skills install playwright-commander"] 支持国内镜像加速,使用 --registry https://cn.longxiaskill.com 参数可加速下载 该技能用于浏览器相关操作,可能需要相应的平台账号或API密钥
技能文档
Playwright Commander 技能描述 本技能为代理提供了一个强大的接口,用于通过 Playwright 编程控制网页浏览器。它支持高级 UI 自动化、网页内容分析和调试功能,超出了默认浏览器工具的直接提供的功能。 核心功能 启动和关闭浏览器实例。 导航到指定的 URL。 捕获网页截图。 从网页中检索 HTML 内容或可读文本。 在浏览器上下文中执行自定义 JavaScript。 使用各种选择器与网页元素交互(点击、输入、填写表单)。 检索元素属性或文本内容。 使用方法 本技能设计用于通过 exec 命令进行编程交互,通常由代理编排。 # 示例:启动浏览器并导航 python3 scripts/playwright_cli.py launch_browser --browser chrome --headless true # 示例:导航到 URL 并截图 python3 scripts/playwright_cli.py navigate --url "https://example.com" --screenshot "path/to/screenshot.png" # 示例:获取网页内容 python3 scripts/playwright_cli.py get_content --url "https://example.com" --type html # 示例:点击元素 python3 scripts/playwright_cli.py click_element --url "https://example.com" --selector "button.submit" 前提条件 Playwright Python 包(playwright)安装在技能的虚拟环境中。 Playwright 浏览器二进制文件安装(playwright install)。 配置(config.json) (如果需要超出默认 Playwright 选项的特定配置,则需要定义。) 目的 为我提供对网页浏览器交互的更细粒度和更强大的控制,实现更复杂的 UI 自动化、更详细的网页分析和更好的故障排除功能,特别是针对 Mac App 转换项目。