Playwright 網站測試
Playwright 網站測試
讓 Coding Agent 透過 Playwright CLI 操作瀏覽器、產生測試與檢查 trace。
Microsoft / Playwright · 官方文件 · 測試與除錯
來源狀態
可用來源
資源類型
教學指南
此項目是教學文件,不是可直接安裝的 Skill 套件。
與類似 Skill 有什麼不同?
- 網頁應用程式測試
Playwright 是瀏覽器工具的官方文件指南;Webapp Testing 是運用瀏覽器進行 Web 應用測試的技能流程。
來源描述的能力
這些是來源描述的可能操作,不代表 2lus 已授予權限或已測試。
尚未列出能力,請審查原始來源。
這個 Skill 是什麼?
為瀏覽器互動提供指引與參考,涵蓋 session、mock、測試產生與除錯;不是只靠文字猜測 UI。
可以做什麼?何時適合使用?
- 重現表單或導航錯誤。
- 替關鍵流程設計 E2E 測試。
- 利用 trace 與截圖定位不穩定互動。
如何使用
- 準備獲授權的測試網站、測試帳號與可接受的操作範圍。
- 依官方文件準備 CLI 與 Skill,指定要觀察的使用流程。
- 經批准後執行,檢查 trace 與斷言,遮蔽 cookie 和敏感資料。
使用前你需要準備
- 預期與實際行為
- 去識別化錯誤紀錄和相關程式
你可以替換:
[test framework]、[failure]
環境與相依需求
- Playwright CLI 與瀏覽器依賴;對目標網站的測試授權。
使用範例與 Prompt
以下是 2lus 撰寫的示範需求;請替換為你有權處理的檔案與專案,不代表已執行或保證結果。
入門
使用 Playwright Skill 規劃登入頁的測試案例,先只列步驟與預期結果,不啟動瀏覽器。
實務
我授權在測試站驗證聯絡表單,使用測試資料,檢查成功與錯誤訊息,不接觸正式資料。
進階
分析已提供的失敗 trace,找出不穩定的定位器或等待條件;修正測試前先說明證據,遮蔽 session 資料。
實用提醒
- 明確禁止付款、正式刪除或其他不可逆操作。
限制與注意事項
- 需要實際瀏覽器權限;trace 可能含敏感資料,不能公開原始 session。
安全注意事項
- 先審查來源與相依工具,只處理獲准的資料;密鑰、個資與登入狀態不得放入提示或公開輸出。
使用與設定
查看官方教學支援平台
Claude Code — 文件記載,未做實機相容性測試 官方文件 ↗
GitHub Copilot — 文件記載,未做實機相容性測試 官方文件 ↗
Cursor — 文件記載,未做實機相容性測試 官方文件 ↗
來源與授權
來源查核日期(非安全認證): 2026-09-29
請參考原始來源授權條款
原始來源 ↗ 授權條款 ↗ 官方文件 ↗相關 Skills
使用第三方 Skill 前,請先檢查來源、權限與執行內容。安裝指令只供查看與複製,不會由 2lus 執行。
2lus AI Skills Library 提供 Skill 的整理與使用導覽。第三方 Skill 的內容、授權與可用性以原始來源為準。使用或安裝前,請自行確認其權限與執行內容。
Playwright
Guide coding agents through browser interaction, test generation and tracing with Playwright CLI.
Microsoft / Playwright · Official documentation · Testing & Debugging
Source status
Active source
Resource type
Guide
This entry is documentation, not an installable skill package.
How is this different from similar skills?
- Web Application Testing
Playwright is official browser-tool documentation; Webapp Testing is a skill workflow for testing web applications with a browser.
Documented capabilities
These are operations described upstream, not permissions granted or tested by 2lus.
Capabilities not declared here; review the original source.
What is this skill?
Provide browser-workflow references for sessions, mocking and debugging rather than guessing UI behavior from prose.
Use cases and when to use it
- Reproduce form or navigation failures.
- Design E2E checks for critical flows.
- Inspect traces and screenshots for flaky interactions.
How to use it
- Prepare an authorized test site, account and operation boundaries.
- Set up the CLI and skill using upstream guidance and define the journey.
- Run only with approval; inspect assertions and traces while redacting secrets.
What you need
- Expected and actual behavior
- Redacted errors and relevant code
You can replace:
[test framework], [failure]
Environment and dependencies
- Playwright CLI/browser dependencies and authorization to test the target.
Usage and prompt examples
These example requests were written by 2lus. Substitute files and projects you may use; examples are not executed results or guarantees.
Beginner
Use the Playwright skill to plan login-page test cases with expected outcomes. Do not launch a browser yet.
Practical
I authorize contact-form checks on our test site using test data. Check success and validation errors without touching production data.
Advanced
Analyze this provided failure trace for unstable locators or waits. Explain evidence before changing tests and redact session details.
Tips
- Explicitly exclude payment, production deletion and other irreversible actions.
Limitations
- Browser execution permission is required; traces may contain sensitive session data.
Security notes
- Review sources/dependencies and process only authorized data; keep credentials, personal data and session state out of prompts and public outputs.
Usage and setup
View official guideSupported agents
Claude Code — Documented; not runtime-tested Documentation ↗
GitHub Copilot — Documented; not runtime-tested Documentation ↗
Cursor — Documented; not runtime-tested Documentation ↗
Sources and license
Source check date (not a safety certification): 2026-09-29
Refer to the original source license terms
Original source ↗ License terms ↗ Documentation ↗Related skills
Before using a third-party skill, review its source, permissions and executable content. Commands are for viewing and copying only; 2lus does not execute them.
2lus AI Skills Library provides curated educational guides. Third-party content, licenses and availability are governed by their original sources. Review permissions and executable content before use or installation.