feat: PLANNING体系首版(00路线图/02任务总表/03执行协议/I-03/I-04/registry42口径)+M1止血交付
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
"""Debug: check what the page actually renders."""
|
||||
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})
|
||||
|
||||
# Capture console logs
|
||||
logs = []
|
||||
page.on("console", lambda msg: logs.append(f"[{msg.type}] {msg.text}"))
|
||||
|
||||
page.goto("http://localhost:5173/", wait_until="networkidle")
|
||||
page.wait_for_timeout(3000) # Wait longer for SPA to render
|
||||
|
||||
# Get page title and URL
|
||||
print(f"URL: {page.url}")
|
||||
print(f"Title: {page.title()}")
|
||||
|
||||
# Get body HTML (first 2000 chars)
|
||||
body_html = page.evaluate("document.body.innerHTML.substring(0, 2000)")
|
||||
print(f"\nBody HTML (first 2000):\n{body_html}")
|
||||
|
||||
# Check for navbar
|
||||
has_navbar = page.evaluate("!!document.querySelector('.navbar-container')")
|
||||
print(f"\nnavbar-container exists: {has_navbar}")
|
||||
|
||||
# Check for any visible elements
|
||||
all_divs = page.evaluate("document.querySelectorAll('div').length")
|
||||
print(f"Total divs: {all_divs}")
|
||||
|
||||
# Print console logs
|
||||
print(f"\nConsole logs ({len(logs)}):")
|
||||
for log in logs[:20]:
|
||||
print(f" {log}")
|
||||
|
||||
page.screenshot(path=r"c:\Users\12914\Desktop\vscode\shots\debug_1920.png")
|
||||
browser.close()
|
||||
Reference in New Issue
Block a user