playwright-mcp

Browser testing, web scraping, and UI validation using Playwright MCP. Use this skill when you need to test Streamlit apps, validate web interfaces, test responsive design, check accessibility, or automate browser interactions through MCP tools.

31 stars

Best use case

playwright-mcp is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Browser testing, web scraping, and UI validation using Playwright MCP. Use this skill when you need to test Streamlit apps, validate web interfaces, test responsive design, check accessibility, or automate browser interactions through MCP tools.

Teams using playwright-mcp should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/playwright-mcp/SKILL.md --create-dirs "https://raw.githubusercontent.com/sfc-gh-dflippo/snowflake-dbt-demo/main/.claude/skills/playwright-mcp/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/playwright-mcp/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How playwright-mcp Compares

Feature / Agentplaywright-mcpStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Browser testing, web scraping, and UI validation using Playwright MCP. Use this skill when you need to test Streamlit apps, validate web interfaces, test responsive design, check accessibility, or automate browser interactions through MCP tools.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Playwright MCP Testing

Automate browser testing, web scraping, and UI validation using Playwright MCP server for
comprehensive browser automation.

## Quick Start

**Core Testing Workflow:**

1. Navigate to application
2. Take snapshot (accessibility tree)
3. Interact with elements
4. Verify expected behavior
5. Take screenshots for documentation

## Key Tools

### Navigation & Waiting

- `browser_navigate` - Load URL
- `browser_wait_for` - Wait for time, text, or element

### Interaction

- `browser_click` - Click buttons and elements
- `browser_fill_form` - Batch fill multiple form fields
- `browser_type` - Type into inputs
- `browser_select_option` - Select dropdown options

### Validation

- `browser_snapshot` - Accessibility tree (for AI analysis)
- `browser_take_screenshot` - Visual capture
- `browser_console_messages` - Check for JavaScript errors

## Testing Patterns

### Page Load Verification

```sql
Navigate to http://localhost:8501
Wait 5 seconds
Take snapshot
Verify expected elements present
```

### Form Testing

```sql
Fill form fields (use browser_fill_form for speed)
Click Submit button
Wait for "Success" text to appear
Take screenshot
```

### Responsive Design

```sql
Resize to 375x667 (mobile)
Take screenshot
Resize to 1920x1080 (desktop)
Take screenshot
```

### Multi-Page Navigation

```sql
Navigate to homepage
Click navigation link
Verify URL changed
Verify new page content
```

## Best Practices

✅ **DO:**

- Use `browser_snapshot` for AI analysis
- Wait for content (3-5 seconds)
- Batch form fields with `browser_fill_form`
- Use element refs from snapshots for reliable clicks
- Check console for errors

❌ **AVOID:**

- Using screenshots when you need to interact
- Typing each field individually
- Skipping waits for dynamic content
- Ignoring console errors

## Common Workflows

### Pre-Deployment Testing

- Test all pages load without errors
- Verify navigation works
- Test forms submit successfully
- Check data displays correctly
- Validate responsive design (375, 768, 1920px)
- Check console for JavaScript errors

### Accessibility Validation

- Take snapshot of each page
- Verify interactive elements have labels
- Check heading hierarchy
- Verify form labels associated

### Visual Regression

- Take full-page screenshots
- Compare with baseline
- Document changes

## Quick Reference

### Common Test Flow

```sql
Navigate to http://localhost:8501
Wait 5 seconds
Take snapshot
Click element with ref from snapshot
Wait for "Success" text
Take screenshot
```

### Responsive Testing

```sql
Resize to 375x667  # Mobile
Take screenshot
Resize to 768x1024  # Tablet
Take screenshot
Resize to 1920x1080  # Desktop
Take screenshot
```

### Form Submission

```sql
Fill form fields (batch)
Click Submit
Wait for success message
Verify in snapshot
```

### Error Checking

```sql
Get console messages (onlyErrors=true)
Get network requests
Verify no 404s or 500s
```

---

## Troubleshooting

| Issue                      | Solution                                                               |
| -------------------------- | ---------------------------------------------------------------------- |
| Browsers not installed     | Run `npx @playwright/mcp browser install`                              |
| Element not found          | Take snapshot first to get current page state and exact ref            |
| Tests too slow             | Use `browser_fill_form` instead of multiple `browser_type`             |
| MCP not starting           | Restart IDE, verify `mcp.json` is valid JSON                           |
| Timeout errors             | Increase wait times or use `browser_wait_for` with specific conditions |
| Screenshots blank          | Ensure page is fully loaded before taking screenshot                   |
| Console errors not showing | Use `browser_console_messages` with `onlyErrors=true` parameter        |

---

## Resources

- `TESTING_PATTERNS.md` - Common test scenarios (coming soon)
- `STREAMLIT_TESTING.md` - Streamlit-specific patterns (coming soon)
- `ACCESSIBILITY.md` - Accessibility testing workflows (coming soon)
- `mcp-config.json` - MCP server configuration

Related Skills

task-master

31
from sfc-gh-dflippo/snowflake-dbt-demo

AI-powered task management for structured, specification-driven development. Use this skill when you need to manage complex projects with PRDs, break down tasks into subtasks, track dependencies, and maintain organized development workflows across features and branches.

task-master-viewer

31
from sfc-gh-dflippo/snowflake-dbt-demo

Launch a Streamlit GUI for Task Master tasks.json editing. Use when users want a visual interface instead of CLI/MCP commands.

task-master-install

31
from sfc-gh-dflippo/snowflake-dbt-demo

Install and initialize task-master for AI-powered task management and specification-driven development. Use this skill when users ask you to parse a new PRD, when starting a new project that needs structured task management, when users mention wanting task breakdown or project planning, or when implementing specification-driven development workflows.

streamlit-development

31
from sfc-gh-dflippo/snowflake-dbt-demo

Developing, testing, and deploying Streamlit data applications on Snowflake. Use this skill when you're building interactive data apps, setting up local development environments, testing with pytest or Playwright, or deploying apps to Snowflake using Streamlit in Snowflake.

snowflake-connections

31
from sfc-gh-dflippo/snowflake-dbt-demo

Configuring Snowflake connections using connections.toml (for Snowflake CLI, Streamlit, Snowpark) or profiles.yml (for dbt) with multiple authentication methods (SSO, key pair, username/password, OAuth), managing multiple environments, and overriding settings with environment variables. Use this skill when setting up Snowflake CLI, Streamlit apps, dbt, or any tool requiring Snowflake authentication and connection management.

snowflake-cli

31
from sfc-gh-dflippo/snowflake-dbt-demo

Executing SQL, managing Snowflake objects, deploying applications, and orchestrating data pipelines using the Snowflake CLI (snow) command. Use this skill when you need to run SQL scripts, deploy Streamlit apps, execute Snowpark procedures, manage stages, automate Snowflake operations from CI/CD pipelines, or work with variables and templating.

skills-sync

31
from sfc-gh-dflippo/snowflake-dbt-demo

Manage and synchronize AI agent skills from local SKILL.md files and remote Git repositories, generating Cursor rules with Agent Skills specification XML. This skill should be used when users need to sync skills, add/remove skill repositories, or set up the skills infrastructure.

schemachange

31
from sfc-gh-dflippo/snowflake-dbt-demo

Deploying and managing Snowflake database objects using version control with schemachange. Use this skill when you need to manage database migrations for objects not handled by dbt, implement CI/CD pipelines for schema changes, or coordinate deployments across multiple environments.

doc-scraper

31
from sfc-gh-dflippo/snowflake-dbt-demo

Generic web scraper for extracting and organizing Snowflake documentation with intelligent caching and configurable spider depth. Scrapes any section of docs.snowflake.com controlled by --base-path.

devcontainer-setup

31
from sfc-gh-dflippo/snowflake-dbt-demo

Create Universal DevContainers optimized for AI agentic workflows with Claude Code, Snowflake CLI, Cortex Code, and dbt. Use when setting up development containers, configuring devcontainer.json, scaffolding AI-ready environments, or when the user mentions devcontainers, containerized development, or Docker development environments.

dbt-testing

31
from sfc-gh-dflippo/snowflake-dbt-demo

dbt testing strategies using dbt_constraints for database-level enforcement, generic tests, and singular tests. Use this skill when implementing data quality checks, adding primary/foreign key constraints, creating custom tests, or establishing comprehensive testing frameworks across bronze/silver/gold layers.

dbt-projects-snowflake-setup

31
from sfc-gh-dflippo/snowflake-dbt-demo

Step-by-step setup guide for dbt Projects on Snowflake including prerequisites, external access integration, Git API integration, event table configuration, and automated scheduling. Use this skill when setting up dbt Projects on Snowflake for the first time or troubleshooting setup issues.