Token导航 LogoToken导航

MCP Server · 开发工具

playwright MCP work

使用Playwright构建的自动化UI测试工具,用于探索和验证公共网站(如Flipkart、YouTube、IMDb、DemoQA)的关键用户流程。测试使用可访问性优先的定位器、弹性回退和Playwright跟踪功能进行可靠的调试。

未说明官方级别未说明来源级核验工具 0
调试工具TypeScript浏览器自动化

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
rohitsharma007
提供方
rohitsharma007

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

playwright MCP work 属于开发工具类 MCP Server,公开资料标注 0 个工具,通过传输方式未标注接入,客户端适配情况以官方文档为准,没有现成的安装命令;接入前先确认权限范围。

分类

开发工具

传输方式

未说明

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

PMCP Playwright Project

Automated UI tests built with Playwright (TypeScript) to explore and validate key user flows across public sites (e.g., Flipkart, YouTube, IMDb, DemoQA). Tests use accessibility-first locators, resilient fallbacks, and Playwright tracing for reliable debugging.

Repository Structure

  • .github/

- generate_tests.prompt.md — guidance to consistently generate tests: navigate, explore key functionality, implement a Playwright TypeScript test, run with trace, iterate until passing.

  • .vscode/

- mcp.json, settings.json — editor configuration and integration settings.

  • docs/

- testing-guardrails.md — standard operating procedures, locator strategies, overlay handling, and running/trace review commands.

  • tests/

- flipkart-home.spec.ts — homepage smoke test for Flipkart; validates core structure and linked tiles. Planned to align with guardrails. - flipkart-search.spec.ts — Flipkart search flow; dismisses overlay, finds search box via guardrails, asserts results and product tiles. Passing with trace. - imdb-search.spec.ts — IMDb search flow (pattern similar to other search tests). - popular-flow.spec.ts — Example of a broader user journey or combined smoke checks (site-specific). - smoke-home.spec.ts — Generic homepage smoke test example (validate landmarks/tiles). - youtube-search.spec.ts — YouTube search flow (pattern similar to Flipkart/IMDb). - _template.spec.ts — reusable template showing how to apply guardrails in a basic search test; copy and adapt per site. - fixtures/ - sample.txt — sample fixture file for tests that read from disk. - utils/guardrails.ts — shared helpers: - dismissOverlays(page) — closes known modal overlays and backdrops. - searchInput(page) — resilient search locator (role → placeholder → generic input). - assertCoreStructure(page) — verifies visible header, main, footer, or #container.

  • test-results/

- Per-test run artifacts; folders include screenshots, videos, and trace.zip archives. - .last-run.json — metadata for the most recent test execution.

  • playwright.config.ts — Playwright configuration (project settings, reporter/timeouts, etc.).
  • package.json / package-lock.json — dependencies and scripts.

How Files Connect (End-to-End Flow)

  • Authoring:

- Use .github/generate_tests.prompt.md as the checklist to create new tests. - Start from tests/_template.spec.ts to quickly scaffold a new spec. - Import guardrails from tests/utils/guardrails.ts to standardize overlay handling, core structure assertions, and resilient locators.

  • Execution:

- Run tests via npx playwright test and enable tracing for debugging. - Tests produce artifacts under test-results/ with a trace.zip for each run.

  • Debugging:

- Open traces using npx playwright show-trace --port . - Inspect actions, assertions, DOM snapshots; iterate on selectors based on evidence.

  • Configuration:

- playwright.config.ts applies global settings (e.g., projects/browsers, timeouts, reporter). CLI flags like --headed and --trace=on complement the config.

Standard Testing Flow (SOP)

  1. Navigate and explore the target site in a headed browser.
  2. Close overlays and confirm a single key functionality (e.g., search, product tiles).
  3. Close exploration, implement a focused Playwright test in tests/ using TypeScript.
  4. Prefer getByRole/getByLabel/getByPlaceholder; rely on Playwright auto-waiting.
  5. Run with --trace=on; iterate until the test passes.
  6. Review the trace to validate actions and DOM; adjust selectors if needed.

Commands

  • Run a specific test headed with trace:

- npx playwright test tests/flipkart-search.spec.ts --headed --trace=on

  • Run all tests:

- npx playwright test

  • Open a trace:

- npx playwright show-trace test-results//trace.zip --port 9360

Adding New Tests

  • Copy tests/_template.spec.ts and adapt the URL and flow.
  • Import and call dismissOverlays(page), assertCoreStructure(page), and searchInput(page).
  • Focus on one meaningful assertion of the flow’s success (e.g., URL change, visible results/tiles).

Conventions

  • Keep tests small, descriptive, and site-focused.
  • Use accessibility-first selectors with resilient fallbacks.
  • Avoid arbitrary timeouts; leverage Playwright’s auto-wait.
  • Validate navigation via expect(page).toHaveURL(...) and core structure visibility.

Notes on Current Tests

  • flipkart-search.spec.ts passes and includes a trace.zip under test-results/flipkart-search-Flipkart-s-3b9bc-hes-and-shows-product-tiles-chromium/.
  • flipkart-home.spec.ts can be refactored to use guardrails.ts for robustness (overlay dismissal and improved search locator).

This README serves as the central reference for how the project’s folders, files, and execution flow connect. Use the guardrails to keep new tests consistent, resilient, and easy to debug with Playwright traces.

Local Setup

  • Prerequisites: Node.js 18+, npm 9+, Git
  • Clone the repo: git clone https://github.com/rohitsharma007/playwright_mcp_work.git
  • Change directory: cd playwright_mcp_work
  • Install dependencies: npm install
  • Install Playwright browsers: npx playwright install
  • Start MCP server (IDE integration): npm run mcp (manual: npx @playwright/mcp@latest)
  • Run all tests: npx playwright test
  • Run a specific test headed with trace: npx playwright test tests/flipkart-search.spec.ts --headed --trace=on
  • Open a trace viewer: npx playwright show-trace test-results//trace.zip --port 9362
  • Generate selectors interactively (optional): npx playwright codegen https://www.flipkart.com/

Common Troubleshooting

  • Overlays blocking interactions: use dismissOverlays(page) helper in tests; in exploration, press Escape or close ✕.
  • Selector stability: prefer getByRole, getByLabel, getByPlaceholder; avoid strict href matching.
  • Slow loads: do not add timeouts; rely on Playwright’s auto-waiting with correct locators and expect assertions.

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

UI测试TypeScript本地部署自动化测试Playwright可访问性测试调试工具

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
playwright MCP work

MCP World · 本页

0未说明未标注1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

playwright MCP work 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

playwright MCP work 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

playwright MCP work 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

playwright MCP work 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

playwright MCP work 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP