Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers Playwright browser UI testing patterns: selectors, Page Object Model, visual regression, network interception, and MCP integration.
96% 100%+4 ptsof test cases passed
Passed 23 of 23 test cases with the skill, and 22 of 23 without it.
3 of 3 safety checks passed
56 agent runs
Patterns for browser-based UI verification using Playwright. Reliable, maintainable, fast E2E tests.
| Priority | Selector | Example | Why |
|---|---|---|---|
| 1 | Role | getByRole('button', { name: 'Submit' }) | Accessible, semantic |
| 2 | Label | getByLabel('Email') | Accessible, user-facing |
| 3 | Test ID | getByTestId('submit-btn') | Stable, explicit |
| 4 | Text | getByText('Sign in') | Readable but fragile |
| 5 | CSS | page.locator('.btn-primary') | Last resort |
NEVER: XPath, auto-generated IDs, DOM structure selectors.
export class LoginPage {
constructor(private page: Page) {}
get emailInput() { return this.page.getByLabel('Email'); }
get passwordInput() { return this.page.getByLabel('Password'); }
get submitButton() { return this.page.getByRole('button', { name: 'Sign in' }); }
async login(email: string, password: string) {
await this.emailInput.fill(email);
await this.passwordInput.fill(password);
await this.submitButton.click();
}
}
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.