Some checks are pending
CI — CoM Config Validation / Validate JSON Configs (push) Waiting to run
CI — CoM Config Validation / Validate YAML Configs (push) Waiting to run
CI — CoM Config Validation / Lint Shell Scripts (push) Waiting to run
CI — CoM Config Validation / Secret Detection (push) Waiting to run
CI — CoM Config Validation / Lint Markdown (push) Waiting to run
CI — CoM Config Validation / Validate CODEOWNERS (push) Waiting to run
Public, sanitized mirror of an AI orchestration command center: agents, skills, MCP servers, slash-command workflows. All infrastructure identifiers, hostnames, mesh IPs/subnets, repo paths, maintainer identity, and hardware fleet specifics scrubbed to <placeholders>; session debug logs and host-specific memory removed. No live credentials. Verified clean by automated leak sweep. See SANITIZATION.md. churchofmalware.org . authorized research only
35 lines
1.0 KiB
Python
35 lines
1.0 KiB
Python
from playwright.sync_api import sync_playwright
|
|
|
|
# Example: Capturing console logs during browser automation
|
|
|
|
url = 'http://localhost:5173' # Replace with your URL
|
|
|
|
console_logs = []
|
|
|
|
with sync_playwright() as p:
|
|
browser = p.chromium.launch(headless=True)
|
|
page = browser.new_page(viewport={'width': 1920, 'height': 1080})
|
|
|
|
# Set up console log capture
|
|
def handle_console_message(msg):
|
|
console_logs.append(f"[{msg.type}] {msg.text}")
|
|
print(f"Console: [{msg.type}] {msg.text}")
|
|
|
|
page.on("console", handle_console_message)
|
|
|
|
# Navigate to page
|
|
page.goto(url)
|
|
page.wait_for_load_state('networkidle')
|
|
|
|
# Interact with the page (triggers console logs)
|
|
page.click('text=Dashboard')
|
|
page.wait_for_timeout(1000)
|
|
|
|
browser.close()
|
|
|
|
# Save console logs to file
|
|
with open('/mnt/user-data/outputs/console.log', 'w') as f:
|
|
f.write('\n'.join(console_logs))
|
|
|
|
print(f"\nCaptured {len(console_logs)} console messages")
|
|
print(f"Logs saved to: /mnt/user-data/outputs/console.log") |