เชฎเซเช–เซเชฏ เชธเชพเชฎเช—เซเชฐเซ€ เชชเชฐ เชœเชพเช“
JobCannon
เชฌเชงเชพ เช•เซŒเชถเชฒเซเชฏเซ‹

Playwright

Cross-browser end-to-end testing by Microsoft

โฌข เชŸเชฟเชฏเชฐ 2เชŸเซ‡เช•เชจเชฟเช•เชฒ
+$15k-
เชชเช—เชพเชฐ เชชเชฐ เช…เชธเชฐ
2 เชฎเชนเชฟเชจเชพ
เชถเซ€เช–เชตเชพเชจเซ‹ เชธเชฎเชฏ
เชฎเชงเซเชฏเชฎ
เชฎเซเชถเซเช•เซ‡เชฒเซ€
6
เช•เชฐเชฟเชฏเชฐ
เชเช• เชจเชœเชฐเชฎเชพเช‚

Playwright is Microsoft's modern E2E testing framework supporting Chromium, Firefox, and WebKit with a single API. Career path: QA Engineer (basic cross-browser testing, $95-120k) โ†’ SDET (Page Object Model, CI/CD integration, parallelization, $120-155k) โ†’ Lead/Architect (custom reporters, infrastructure at scale, $155-200k+). Salary premium: $15k-$30k above base QA (Playwright adoption bonus vs legacy Selenium shops). Tools: Playwright, Playwright UI Mode, Playwright Trace Viewer, Codegen, GitHub Actions, Docker, Allure, Percy. Shines vs Cypress: true parallelization, multi-tab/multi-origin, shadow DOM, faster execution, no flakiness from timing.

Playwright เชถเซเช‚ เช›เซ‡

Playwright is Microsoft's modern E2E testing framework supporting Chromium, Firefox, and WebKit with a single API. It offers auto-waiting, web-first assertions, tracing, and powerful capabilities like multi-tab, multi-origin, and shadow DOM testing. Playwright's codegen tool records user actions as test code, its trace viewer provides detailed debugging, and native support for multiple languages (JavaScript, Python, Java, C#) makes it versatile across teams.

๐Ÿ”ง เชŸเซ‚เชฒเซเชธ เช…เชจเซ‡ เช‡เช•เซ‹เชธเชฟเชธเซเชŸเชฎ
PlaywrightPlaywright UI ModePlaywright Trace ViewerCodegenGitHub ActionsDockerAllurePercy (visual regression)Test Automation FrameworksBrowserStackJenkins

๐Ÿ“‹ เชคเชฎเซ‡ เชถเชฐเซ‚ เช•เชฐเซ‹ เชคเซ‡ เชชเชนเซ‡เชฒเชพเช‚

๐Ÿ’ฐ เชชเซเชฐเชฆเซ‡เชถ เชชเซเชฐเชฎเชพเชฃเซ‡ เชชเช—เชพเชฐ

เชชเซเชฐเชฆเซ‡เชถเชœเซเชจเชฟเชฏเชฐเชฎเชงเซเชฏเชฎเชธเชฟเชจเชฟเชฏเชฐ
USA$95k$130k$175k
UKยฃ65kยฃ90kยฃ125k
EUโ‚ฌ70kโ‚ฌ95kโ‚ฌ135k
CANADAC$105kC$140kC$190k

๐ŸŽ“ เชชเซเชฐเชฎเชพเชฃเชชเชคเซเชฐเซ‹

๐ŸŽฏ Playwright เชจเซ‹ เช‰เชชเชฏเซ‹เช— เช•เชฐเชคเซ€ เช•เชฐเชฟเชฏเชฐ

โš– เชธเชพเชฅเซ‡ เชธเชฐเช–เชพเชฎเชฃเซ€ เช•เชฐเซ‹

โ“ FAQ

Playwright vs Cypress, which should I use?
Playwright: true parallelization, multi-tab/multi-origin support, shadow DOM, faster execution, enterprise-grade (Microsoft-backed). Cypress: developer experience, single-browser at a time, slower with large test suites, stuck at v13. Use Playwright for new projects, especially teams needing scale and reliability. Use Cypress if your team already invested and team velocity matters more than performance.
How do I avoid flaky tests in Playwright?
Playwright's auto-waiting eliminates most flakiness: actions wait for element stability (display, opacity, position), network idle, etc. Use locators (getByRole, getByText) instead of CSS selectors, they're resilient. Avoid manual wait() calls. If a test flakes: check for race conditions (e.g., data loading after navigation), use fixtures for setup/teardown, and run with `--retries=1` in CI. The Trace Viewer shows exactly what failed, use it.
What is the Page Object Model and why does Playwright need it?
POM encapsulates selectors and actions in reusable page classes. Example: `class LoginPage { fill(email, password) { โ€ฆ } }`. Reduces maintenance when UI changes, update the class, not 100 tests. Playwright doesn't force POM like Cypress does, but it's essential for scale. Implement as: fixtures for page objects, methods for actions, getters for locators.
How do I run Playwright tests in CI/CD?
Use GitHub Actions: `npm install -g @playwright/test && npx playwright install && npm run test:e2e`. Parallelize with shards: `--shard=1/4 --shard=2/4` etc. For artifacts: upload Trace Viewer output with `actions/upload-artifact@v3`. Docker: use `mcr.microsoft.com/playwright:v1.x-focal` for pre-installed browsers. Key: parallelization is Playwright's strength, use it.
How do I test visual regression with Playwright?
Use `expect(page).toHaveScreenshot()` for native snapshot testing, or integrate Percy for visual diffs. Native screenshots are good for component tests; Percy for E2E on live sites. Store baselines in git. Update with `--update-snapshots` when design changes are intentional. Consider region-specific snapshots for responsive layouts.
Can Playwright mock network requests and APIs?
Yes, use `page.route()` to intercept HTTP requests. Example: `await page.route('**/api/users', route => { route.abort('blockedbyclient') })`. Useful for: testing error states, controlling response delays, testing without backend. For API testing directly: `APIRequestContext` allows raw HTTP calls without a browser. BDD-friendly approach: mock external APIs, test UI logic in isolation.
How do I handle authentication in Playwright tests?
Two approaches: (1) Use cookies/localStorage from a logged-in session (fast, brittle if auth changes), store in `.auth` via `context.addCookies()`. (2) Log in via UI before each test using a fixture/hook (slow, mimics real user flow). Best: storage-based for most tests + 1-2 E2E login tests. Use BrowserContext isolation to parallelize authenticated tests.

เช–เชพเชคเชฐเซ€ เชจเชฅเซ€ เช•เซ‡ เช† เช•เซŒเชถเชฒเซเชฏ เชคเชฎเชพเชฐเชพ เชฎเชพเชŸเซ‡ เช›เซ‡?

เช•เชฐเชฟเชฏเชฐ เชฎเซ‡เชš เชŸเซ‡เชธเซเชŸ เช†เชชเซ‹ โ€” เช…เชฎเซ‡ เชฏเซ‹เช—เซเชฏ เชŸเซเชฐเซ‡เช•เซเชธ เชธเซ‚เชšเชตเซ€เชถเซเช‚.

เชฎเชพเชฐเชพ เชถเซเชฐเซ‡เชทเซเช -เชซเชฟเชŸ เช•เซŒเชถเชฒเซเชฏเซ‹ เชถเซ‹เชงเซ‹ โ†’

เชคเชฎเชพเชฐเซ‹ เช†เชฆเชฐเซเชถ เช•เชฐเชฟเชฏเชฐ เชชเชพเชฅ เชถเซ‹เชงเซ‹

2,521 เช•เชพเชฐเช•เชฟเชฐเซเชฆเซ€เช“เชฎเชพเช‚ เช•เซŒเชถเชฒเซเชฏ-เช†เชงเชพเชฐเชฟเชค เชฎเซ‡เชšเชฟเช‚เช—. เชฎเชซเชค.

เช•เชฐเชฟเชฏเชฐ เชฎเซ‡เชš เชŸเซ‡เชธเซเชŸ เช†เชชเซ‹ โ€” เชฎเชซเชค โ†’