Loading...
Loading...
Compare original and translation side by side
Opinionated, production-tested Playwright guidance — every pattern includes when (and when not) to use it.
具有明确实践导向、经生产环境验证的Playwright指南——每种模式都说明了适用场景(以及不适用的场景)。
getByRole()page.waitForTimeout()expect(locator).toBeVisible()page.waitForURL()expect(locator)expect(await locator.textContent())baseURL20'on-first-retry'test.extend()expect()getByRole()page.waitForTimeout()expect(locator).toBeVisible()page.waitForURL()expect(locator)expect(await locator.textContent())baseURL'on-first-retry'test.extend()expect()| What you're doing | Guide | Deep dive |
|---|---|---|
| Choosing selectors | locators.md | locator-strategy.md |
| Assertions & waiting | assertions-and-waiting.md | |
| Organizing test suites | test-organization.md | test-architecture.md |
| Playwright config | configuration.md | |
| Fixtures & hooks | fixtures-and-hooks.md | |
| Test data | test-data-management.md | |
| Auth & login | authentication.md | auth-flows.md |
| API testing (REST/GraphQL) | api-testing.md | |
| Visual regression | visual-regression.md | |
| Accessibility | accessibility.md | |
| Mobile & responsive | mobile-and-responsive.md | |
| Component testing | component-testing.md | |
| Network mocking | network-mocking.md | when-to-mock.md |
| Forms & validation | forms-and-validation.md | |
| File uploads/downloads | file-operations.md | file-upload-download.md |
| Error & edge cases | error-and-edge-cases.md | |
| CRUD flows | crud-testing.md | |
| Drag and drop | drag-and-drop.md | |
| Search & filter UI | search-and-filter.md |
| 操作场景 | 指南 | 深度解析 |
|---|---|---|
| 选择选择器 | locators.md | locator-strategy.md |
| 断言与等待 | assertions-and-waiting.md | |
| 组织测试套件 | test-organization.md | test-architecture.md |
| Playwright配置 | configuration.md | |
| 测试夹具与钩子 | fixtures-and-hooks.md | |
| 测试数据 | test-data-management.md | |
| 认证与登录 | authentication.md | auth-flows.md |
| API测试(REST/GraphQL) | api-testing.md | |
| 可视化回归测试 | visual-regression.md | |
| 无障碍测试 | accessibility.md | |
| 移动端与响应式测试 | mobile-and-responsive.md | |
| 组件测试 | component-testing.md | |
| 网络模拟 | network-mocking.md | when-to-mock.md |
| 表单与验证 | forms-and-validation.md | |
| 文件上传/下载 | file-operations.md | file-upload-download.md |
| 错误与边界用例 | error-and-edge-cases.md | |
| CRUD流程测试 | crud-testing.md | |
| 拖拽测试 | drag-and-drop.md | |
| 搜索与筛选UI测试 | search-and-filter.md |
| Problem | Guide |
|---|---|
| General debugging workflow | debugging.md |
| Specific error message | error-index.md |
| Flaky / intermittent tests | flaky-tests.md |
| Common beginner mistakes | common-pitfalls.md |
| 问题场景 | 指南 |
|---|---|
| 通用调试流程 | debugging.md |
| 特定错误信息 | error-index.md |
| 不稳定/间歇性失败测试 | flaky-tests.md |
| 常见新手误区 | common-pitfalls.md |
| Framework | Guide |
|---|---|
| Next.js (App Router + Pages Router) | nextjs.md |
| React (CRA, Vite) | react.md |
| Vue 3 / Nuxt | vue.md |
| Angular | angular.md |
| 框架 | 指南 |
|---|---|
| Next.js(App Router + Pages Router) | nextjs.md |
| React(CRA、Vite) | react.md |
| Vue 3 / Nuxt | vue.md |
| Angular | angular.md |
| Topic | Guide |
|---|---|
| Multi-user & collaboration | multi-user-and-collaboration.md |
| WebSockets & real-time | websockets-and-realtime.md |
| Browser APIs (geo, clipboard, permissions) | browser-apis.md |
| iframes & Shadow DOM | iframes-and-shadow-dom.md |
| Canvas & WebGL | canvas-and-webgl.md |
| Service workers & PWA | service-workers-and-pwa.md |
| Electron apps | electron-testing.md |
| Browser extensions | browser-extensions.md |
| Security testing | security-testing.md |
| Performance & benchmarks | performance-testing.md |
| i18n & localization | i18n-and-localization.md |
| Multi-tab & popups | multi-context-and-popups.md |
| Clock & time mocking | clock-and-time-mocking.md |
| Third-party integrations | third-party-integrations.md |
| 主题 | 指南 |
|---|---|
| 多用户与协作测试 | multi-user-and-collaboration.md |
| WebSockets与实时功能测试 | websockets-and-realtime.md |
| 浏览器API(地理定位、剪贴板、权限) | browser-apis.md |
| 内嵌框架(iframes)与Shadow DOM | iframes-and-shadow-dom.md |
| Canvas与WebGL测试 | canvas-and-webgl.md |
| 服务工作线程与PWA测试 | service-workers-and-pwa.md |
| Electron应用测试 | electron-testing.md |
| 浏览器扩展测试 | browser-extensions.md |
| 安全测试 | security-testing.md |
| 性能与基准测试 | performance-testing.md |
| 国际化(i18n)与本地化 | i18n-and-localization.md |
| 多标签页与弹窗测试 | multi-context-and-popups.md |
| 时钟与时间模拟 | clock-and-time-mocking.md |
| 第三方集成测试 | third-party-integrations.md |
| Question | Guide |
|---|---|
| Which locator strategy? | locator-strategy.md |
| E2E vs component vs API? | test-architecture.md |
| Mock vs real services? | when-to-mock.md |
| 问题 | 指南 |
|---|---|
| 选择哪种定位器策略? | locator-strategy.md |
| 端到端测试 vs 组件测试 vs API测试? | test-architecture.md |
| 模拟服务还是使用真实服务? | when-to-mock.md |