playwright-best-practices

Guide Playwright test development with best practices for organization and debugging.

Updated Jul 2, 2024
One-click install
npx skills add https://github.com/carloitaben/dotfiles --skill playwright-best-practices-carloitaben
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-best-practices
Source: https://github.com/carloitaben/dotfiles/tree/main/.config/opencode/skills/playwright-best-practices
Command: npx skills add https://github.com/carloitaben/dotfiles --skill playwright-best-practices-carloitaben

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance for writing, debugging, and maintaining Playwright tests, ensuring reliable and efficient end-to-end test automation.

Core Features & Use Cases

  • Test Organization: Structure tests effectively using Page Object Model and clear naming conventions.
  • Debugging: Troubleshoot flaky tests, selector issues, and timeouts with advanced techniques.
  • Use Case: When encountering a flaky test that intermittently fails due to timing issues, consult the debugging section to identify the root cause and apply appropriate waiting strategies or locator fixes.

Quick Start

Use the playwright-best-practices skill to learn how to fix flaky tests in Playwright.

Frequently Asked Questions about playwright-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix flaky Playwright tests caused by timing issues?

Fix flaky Playwright tests by consulting advanced debugging techniques to identify root causes, applying appropriate waiting strategies, and resolving locator issues and timeouts to ensure reliable E2E test execution.

What is the best way to organize Playwright E2E testing projects?

Organize Playwright E2E testing projects by structuring tests effectively using the Page Object Model and implementing clear naming conventions to maintain robust and scalable test automation suites.

Does Playwright support component and accessibility testing scenarios?

Playwright supports accessibility testing scenarios alongside E2E, component, API, and visual testing, providing detailed guidance on locators, assertions, and waiting strategies across diverse testing contexts.

How do I debug web testing selector issues and timeouts in Playwright?

Debug Playwright web testing selector issues and timeouts using advanced troubleshooting techniques that identify root causes of intermittent failures and apply appropriate locator fixes and waiting strategies.

Can I integrate Playwright web testing into CI/CD pipelines?

Integrate Playwright web testing into CI/CD pipelines using detailed guidance on advanced patterns, ensuring reliable and efficient end-to-end test automation execution within continuous integration workflows.