Custom Skills (ourdigital-custom-skills/): - 00-ourdigital-visual-storytelling: Blog featured image prompt generator - 01-ourdigital-research-publisher: Research-to-publication workflow - 02-notion-organizer: Notion workspace management - 03-research-to-presentation: Notion research to PPT/Figma - 04-seo-gateway-strategist: SEO gateway page strategy planning - 05-gateway-page-content-builder: Gateway page content generation - 20-jamie-brand-editor: Jamie Clinic branded content GENERATION - 21-jamie-brand-guardian: Jamie Clinic content REVIEW & evaluation Refinements applied: - All skills converted to SKILL.md format with YAML frontmatter - Added version fields to all skills - Flattened nested folder structures - Removed packaging artifacts (.zip, .skill files) - Reorganized file structures (scripts/, references/, etc.) - Differentiated Jamie skills with clear roles 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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") |