Advanced Tooling
1. Auto-Wait
Playwright automatically waits for elements to be visible and stable.
2. Mobile Emulation
typescript
// playwright.config.ts
import { devices } from '@playwright/test';
export default {
projects: [
{ name: 'Mobile Safari', use: { ...devices['iPhone 13'] } }
]
};
3. UI Mode
Run tests in a dedicated UI that shows every step clearly.
bash
npx playwright test --ui