Agent skill
webapp-testing-wait-for-dynamic-content
Sub-skill of webapp-testing: Wait for Dynamic Content (+5).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/development/webapp-testing/wait-for-dynamic-content
SKILL.md
Wait for Dynamic Content (+5)
Wait for Dynamic Content
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("http://localhost:3000")
# CRITICAL: Wait for JS to execute
page.wait_for_load_state("networkidle")
# Now safe to interact
content = page.content()
browser.close()
Element Selection
By Text:
page.get_by_text("Submit").click()
page.get_by_text("Welcome", exact=False).wait_for()
By Role:
page.get_by_role("button", name="Submit").click()
page.get_by_role("textbox", name="Email").fill("test@example.com")
*See sub-skills for full details.*
## Form Interaction
```python
# Fill form
page.locator("#username").fill("testuser")
page.locator("#password").fill("password123")
page.locator("#remember").check()
page.get_by_role("button", name="Login").click()
# Wait for navigation
page.wait_for_url("**/dashboard")
Screenshots
# Full page
page.screenshot(path="full.png", full_page=True)
# Element only
page.locator(".main-content").screenshot(path="element.png")
# Viewport only
page.screenshot(path="viewport.png")
Console Logs
# Capture console output
console_messages = []
def handle_console(msg):
console_messages.append({
"type": msg.type,
"text": msg.text
})
*See sub-skills for full details.*
## Network Monitoring
```python
# Capture requests
requests = []
def handle_request(request):
requests.append({
"url": request.url,
"method": request.method
})
*See sub-skills for full details.*
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?