Playwright
A modern, fast browser automation framework by Microsoft with auto-wait, parallel execution, and multi-browser support.
Full definition
Playwright is a modern browser automation framework developed by Microsoft. It's designed for reliable end-to-end testing with features that address common Selenium pain points.
Key advantages over Selenium:
- Auto-wait: Automatically waits for elements to be ready — fewer flaky tests
- Multi-browser: Chrome, Firefox, Safari in one framework
- Parallel execution: Built-in parallel test running
- Network interception: Mock APIs, block resources, modify requests
- Trace viewer: Visual debugging with screenshots, DOM snapshots, network logs
- Code generation: Record interactions and generate test code
Playwright supports JavaScript/TypeScript, Python, Java, and .NET.
Example test: ```typescript test('user can login', async ({ page }) => { await page.goto('/login'); await page.fill('#email', 'user@test.com'); await page.fill('#password', 'password123'); await page.click('button[type="submit"]'); await expect(page).toHaveURL('/dashboard'); }); ```
Playwright is rapidly becoming the preferred choice for new automation projects due to its reliability and developer experience.