fix(executor): 修复FastAPI端点执行Playwright报asyncio检测错误
- playwright_executor.py: 在工作线程中设置 asyncio.set_event_loop(None) 绕过 Playwright 的 asyncio 事件循环检测
- execution_service.py: 优化 run_all_cases_sync 日志输出,清理调试 print 语句
- CLAUDE.md: 新增踩坑记录 #9,更新 Playwright 正确模式第 5 条
- HANDOFF.md: 更新状态为已修复,重构文档结构
根因:Playwright sync_playwright().start() 内部使用 asyncio.get_running_loop() 检测,
在 FastAPI run_in_executor 工作线程中需将事件循环设为 None 才能绕过检测
Co-Authored-By:
Claude <noreply@anthropic.com>
正在显示
此差异已折叠。
请
注册
或者
登录
后发表评论