feat: PLANNING体系首版(00路线图/02任务总表/03执行协议/I-03/I-04/registry42口径)+M1止血交付
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
"""Debug: capture all console output and errors."""
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
page = browser.new_page(viewport={"width": 1920, "height": 1080})
|
||||
|
||||
logs = []
|
||||
page.on("console", lambda msg: logs.append(f"[{msg.type}] {msg.text}"))
|
||||
page.on("pageerror", lambda err: logs.append(f"[PAGE_ERROR] {err}"))
|
||||
|
||||
page.goto("http://localhost:5173/", wait_until="networkidle")
|
||||
page.wait_for_timeout(5000)
|
||||
|
||||
print(f"URL: {page.url}")
|
||||
|
||||
# Get all console logs
|
||||
print(f"\nAll console logs ({len(logs)}):")
|
||||
for log in logs:
|
||||
print(f" {log}")
|
||||
|
||||
# Try to get page errors from window.onerror
|
||||
errors = page.evaluate("""() => {
|
||||
const el = document.getElementById('root');
|
||||
return {
|
||||
rootContent: el ? el.innerHTML.substring(0, 500) : 'no root',
|
||||
rootChildren: el ? el.children.length : 0,
|
||||
}
|
||||
}""")
|
||||
print(f"\nRoot element: {errors}")
|
||||
|
||||
browser.close()
|
||||
Reference in New Issue
Block a user