agentsclimarketplace

Test playwright

Skill spideynolove/claude-code-in-action/02-mcp/test-playwright

The process I experienced firsthand through the https://anthropic.skilljar.com/claude-code-in-action course using real-world daily projects

Install
npx -y skills add spideynolove/claude-code-in-action --skill test-playwright

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Browser automation via Playwright MCP through mcporter. Use when you need to navigate pages, extract data, take screenshots, interact with UI elements, or scrape web content. All tools called via mcporter to avoid context pollution.

SKILL.md

4.2 KB, as published. Nobody here has run it

Playwright (MCPorter)

All tools called via mcporter:

npx mcporter call playwright.TOOL_NAME [args]

Core Workflow

Navigate

npx mcporter call playwright.browser_navigate url:"https://example.com"

Snapshot (preferred for data extraction — better than screenshot)

npx mcporter call playwright.browser_snapshot
# Save to file to avoid flooding context:
npx mcporter call playwright.browser_snapshot filename:"snapshot.md"

Screenshot

npx mcporter call playwright.browser_take_screenshot type:png filename:"page.png"
npx mcporter call playwright.browser_take_screenshot type:png fullPage:true filename:"full.png"

Wait for dynamic content

npx mcporter call playwright.browser_wait_for text:"Loaded"
npx mcporter call playwright.browser_wait_for time:2

Click (use ref from snapshot)

npx mcporter call playwright.browser_click ref:"e123" element:"Submit button"

Type into field

npx mcporter call playwright.browser_type ref:"e45" text:"search query" submit:true

Run arbitrary Playwright code

npx mcporter call playwright.browser_run_code \
  code:"async (page) => { return await page.title(); }"

Evaluate JS in page context

npx mcporter call playwright.browser_evaluate \
  function:"() => Array.from(document.querySelectorAll('table tr')).map(r => r.innerText)"

Common Patterns

Scrape table data

npx mcporter call playwright.browser_navigate url:"https://site.com/data"
npx mcporter call playwright.browser_wait_for time:2
npx mcporter call playwright.browser_snapshot filename:"raw.md"

Login then scrape

npx mcporter call playwright.browser_navigate url:"https://site.com/login"
npx mcporter call playwright.browser_snapshot
# use refs from snapshot for fields
npx mcporter call playwright.browser_type ref:"REF" text:"[email protected]"
npx mcporter call playwright.browser_type ref:"REF" text:"password" submit:true
npx mcporter call playwright.browser_wait_for text:"Dashboard"

Tab management

npx mcporter call playwright.browser_tabs action:list
npx mcporter call playwright.browser_tabs action:new
npx mcporter call playwright.browser_tabs action:select index:0

Network inspection

npx mcporter call playwright.browser_network_requests includeStatic:false

Tool Reference (22 tools)

ToolPurpose
browser_navigateGo to URL
browser_snapshotAccessibility tree (use for data extraction)
browser_take_screenshotVisual screenshot
browser_clickClick element by ref
browser_typeType text into element
browser_fill_formFill multiple fields at once
browser_select_optionSelect dropdown option
browser_hoverHover over element
browser_dragDrag and drop
browser_evaluateRun JS in page context
browser_run_codeRun Playwright code snippet
browser_press_keyPress keyboard key
browser_wait_forWait for text/element/time
browser_navigate_backBrowser back
browser_tabsList/create/close/select tabs
browser_network_requestsInspect network traffic
browser_console_messagesGet console output
browser_handle_dialogAccept/dismiss dialogs
browser_file_uploadUpload files
browser_resizeResize browser window
browser_installInstall browser (if missing error)
browser_closeClose browser

When to Use

  • Frontend UI testing (visible browser by default — no extra config needed)
  • Pages requiring JavaScript rendering / SPAs
  • Extracting tables/prices from web pages
  • Automated form submission and interaction flows
  • Screenshots of web pages

Anti-Patterns

❌ Don't call browser_snapshot without filename: when output is large — floods context ❌ Don't load playwright MCP in .claude.json alongside this skill — mcporter only ❌ Don't add --headless to mcporter.json for UI testing — defeats the purpose

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.