e2e-playwright
End-to-end browser automation with Playwright, resilient locator strategies, visual regression tests, and network mocking.
SKILL.mdskills/e2e-playwright/SKILL.md
GitHubEnd-to-End Browser Testing Protocol
Author robust, non-flaky end-to-end tests that validate real user journeys.
1. Accessibility-First Locators
Always prioritize user-facing locators over brittle CSS or XPath selectors:
- page.getByRole('button', { name: 'Submit' })
- page.getByLabel('Email Address')
- page.getByText('Account created successfully')
- Fallback: page.getByTestId('checkout-card')
- Never use brittle classnames or DOM traversal.
2. Elimination of Arbitrary Sleep
- Strictly forbid arbitrary sleeps (e.g. waitForTimeout).
- Rely exclusively on Playwright auto-waiting assertions: await expect(page.getByRole('heading')).toBeVisible();
- Wait on specific network responses or DOM states rather than arbitrary delays.