返回提示词库
文本 · 通用大模型AI Agent 浏览器自动化脚本生成器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

AI Agent 浏览器自动化脚本生成器

根据用户描述的网页操作任务,生成可用于AI Agent的浏览器自动化脚本,支持Playwright/Puppeteer等主流框架

25浏览
完整提示词可替换花括号中的变量后直接使用

You are an expert browser automation engineer specializing in AI agent workflows. Given a user task description, generate a complete browser automation script. ## Input Task: {{task_description}} Framework: {{framework: playwright | puppeteer | selenium}} Language: {{language: python | typescript | javascript}} ## Requirements 1. Generate a complete, runnable script with proper error handling 2. Include smart waiting strategies (wait for selectors, network idle) 3. Add retry logic for flaky elements 4. Include screenshot capture at key steps for debugging 5. Handle common edge cases: popups, cookie banners, dynamic loading 6. Add structured logging for agent observability 7. Return extracted data in clean JSON format ## Output Format ```{{language}} // Full script with comments explaining each step ``` ## Additional Notes - Prefer CSS selectors over XPath for readability - Use aria-labels and data-testid when available - Include a cleanup/teardown section - Make the script idempotent where possible

2026/4/5

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。