Loading...
Loading...
Compare original and translation side by side
1. Navigate to application
2. Execute login steps
3. Check console for errors after each critical operation
4. Generate error report with screenshots
5. Provide debugging context1. 导航至应用程序
2. 执行登录步骤
3. 在每个关键操作后检查控制台是否有错误
4. 生成包含截图的错误报告
5. 提供调试上下文Use: mcp__playwright__browser_navigate
- Navigate to target URL
- Wait for page loadUse: mcp__playwright__browser_console_messages
- Read and discard initial load messages
- Establishes clean baseline for workflow monitoring使用: mcp__playwright__browser_navigate
- 导航至目标URL
- 等待页面加载完成使用: mcp__playwright__browser_console_messages
- 读取并丢弃页面加载时的初始消息
- 为工作流监控建立干净的基准Action: Click "Submit Order" button
→ mcp__playwright__browser_click
Wait: Order confirmation appears
→ mcp__playwright__browser_wait_for
Check: Console errors
→ mcp__playwright__browser_console_messages({ level: "error" })操作: 点击“提交订单”按钮
→ mcp__playwright__browser_click
等待: 订单确认页面出现
→ mcp__playwright__browser_wait_for
检查: 控制台错误
→ mcp__playwright__browser_console_messages({ level: "error" })| Level | Includes | When to Use |
|---|---|---|
| Critical errors only | After critical operations (checkout, submit) |
| Warnings + errors | During form validation, feature usage |
| Info + warnings + errors | General workflow monitoring |
| All messages | Detailed debugging scenarios |
mcp__playwright__browser_take_screenshotmcp__playwright__browser_snapshot| 级别 | 包含内容 | 适用场景 |
|---|---|---|
| 仅严重错误 | 关键操作后(结账、提交) |
| 警告 + 错误 | 表单验证、功能使用期间 |
| 信息 + 警告 + 错误 | 常规工作流监控 |
| 所有消息 | 详细调试场景 |
mcp__playwright__browser_take_screenshotmcp__playwright__browser_snapshotConsole Error Report
====================
Workflow: [workflow name]
Executed: [timestamp]
Total Errors: [count]
Critical Errors (level: error):
- [timestamp] [message]
Context: [operation that triggered]
Screenshot: [filename]
Warnings (level: warning):
- [timestamp] [message]
Context: [operation that triggered]
Info Messages:
- [summary if relevant]
Debugging Context:
- URL at time of error
- Page snapshot
- Network state (if available via browser_network_requests)
Recommendations:
- [specific debugging suggestions]控制台错误报告
====================
工作流: [工作流名称]
执行时间: [时间戳]
总错误数: [数量]
严重错误(级别: error):
- [时间戳] [消息内容]
上下文: [触发的操作]
截图: [文件名]
警告(级别: warning):
- [时间戳] [消息内容]
上下文: [触发的操作]
信息消息:
- [相关摘要]
调试上下文:
- 错误发生时的URL
- 页面快照
- 网络状态(若可通过browser_network_requests获取)
建议:
- [具体调试建议]level: "error"level: "warning"level: "error"level: "warning"✅ Console Monitoring Complete
Workflow: User Login Flow
Operations Monitored: 5
Console Errors: 0
Warnings: 0
All operations completed without console errors.✅ 控制台监控完成
工作流: 用户登录流程
监控的操作数: 5
控制台错误数: 0
警告数: 0
所有操作均无控制台错误完成。❌ Console Errors Detected
Workflow: Checkout Process
Operations Monitored: 8
Console Errors: 2 critical, 1 warning
Critical Errors:
1. [14:32:15] Uncaught TypeError: Cannot read property 'total' of undefined
Context: After "Apply Discount Code" click
Screenshot: checkout-error-1.png
2. [14:32:18] Failed to load resource: POST /api/payment 500
Context: After "Submit Payment" click
Screenshot: checkout-error-2.png
Warnings:
1. [14:32:10] [Deprecation] Synchronous XMLHttpRequest on the main thread
Context: During address validation
Debugging Recommendations:
- Investigate cart.total property initialization
- Check /api/payment endpoint for server errors
- Review discount code application logic❌ 检测到控制台错误
工作流: 结账流程
监控的操作数: 8
控制台错误数: 2个严重错误,1个警告
严重错误:
1. [14:32:15] Uncaught TypeError: Cannot read property 'total' of undefined
上下文: 点击“应用折扣码”后
截图: checkout-error-1.png
2. [14:32:18] Failed to load resource: POST /api/payment 500
上下文: 点击“提交支付”后
截图: checkout-error-2.png
警告:
1. [14:32:10] [Deprecation] Synchronous XMLHttpRequest on the main thread
上下文: 地址验证期间
调试建议:
- 调查cart.total属性的初始化逻辑
- 检查/api/payment端点的服务器错误
- 审核折扣码应用逻辑| Metric | Before (Manual) | After (Skill) | Improvement |
|---|---|---|---|
| Error Detection | Reactive (user reports) | Proactive (during automation) | +95% early detection |
| Debugging Time | 30-60 min (reproduce + debug) | 5-10 min (context provided) | 80% reduction |
| False Negatives | High (errors missed) | Low (systematic checking) | 90% reduction |
| Context Quality | Minimal (user description) | Rich (screenshots, state, messages) | 10x improvement |
| 指标 | 之前(手动) | 之后(使用本技能) | 提升效果 |
|---|---|---|---|
| 错误检测 | 被动(用户反馈) | 主动(自动化过程中) | 提前检测率提升95% |
| 调试时间 | 30-60分钟(重现+调试) | 5-10分钟(提供上下文) | 减少80% |
| 漏报率 | 高(错误被遗漏) | 低(系统性检查) | 减少90% |
| 上下文质量 | 极少(用户描述) | 丰富(截图、状态、消息) | 提升10倍 |
mcp__playwright__browser_navigatemcp__playwright__browser_console_messagesmcp__playwright__browser_snapshotmcp__playwright__browser_take_screenshotmcp__playwright__browser_clickmcp__playwright__browser_wait_formcp__playwright__browser_navigatemcp__playwright__browser_console_messagesmcp__playwright__browser_snapshotmcp__playwright__browser_take_screenshotmcp__playwright__browser_clickmcp__playwright__browser_wait_forerrorerrorlevel: "error"level: "warning"level: "info"level: "debug"browser_network_requestslevel: "error"level: "warning"level: "info"level: "debug"browser_network_requests