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>
40 lines
1.4 KiB
Python
40 lines
1.4 KiB
Python
from playwright.sync_api import sync_playwright
|
|
|
|
# Example: Discovering buttons and other elements on a page
|
|
|
|
with sync_playwright() as p:
|
|
browser = p.chromium.launch(headless=True)
|
|
page = browser.new_page()
|
|
|
|
# Navigate to page and wait for it to fully load
|
|
page.goto('http://localhost:5173')
|
|
page.wait_for_load_state('networkidle')
|
|
|
|
# Discover all buttons on the page
|
|
buttons = page.locator('button').all()
|
|
print(f"Found {len(buttons)} buttons:")
|
|
for i, button in enumerate(buttons):
|
|
text = button.inner_text() if button.is_visible() else "[hidden]"
|
|
print(f" [{i}] {text}")
|
|
|
|
# Discover links
|
|
links = page.locator('a[href]').all()
|
|
print(f"\nFound {len(links)} links:")
|
|
for link in links[:5]: # Show first 5
|
|
text = link.inner_text().strip()
|
|
href = link.get_attribute('href')
|
|
print(f" - {text} -> {href}")
|
|
|
|
# Discover input fields
|
|
inputs = page.locator('input, textarea, select').all()
|
|
print(f"\nFound {len(inputs)} input fields:")
|
|
for input_elem in inputs:
|
|
name = input_elem.get_attribute('name') or input_elem.get_attribute('id') or "[unnamed]"
|
|
input_type = input_elem.get_attribute('type') or 'text'
|
|
print(f" - {name} ({input_type})")
|
|
|
|
# Take screenshot for visual reference
|
|
page.screenshot(path='/tmp/page_discovery.png', full_page=True)
|
|
print("\nScreenshot saved to /tmp/page_discovery.png")
|
|
|
|
browser.close() |