Skip to main content
Glama

playwright-mcp

playwright-mcp の使い方

導入

playwright-mcp(Model Context Protocol)は、AIアシスタントとブラウザ自動化のギャップを埋める強力なツールです。AIモデルがウェブブラウザと対話し、DOM要素を検査し、ユーザーインタラクションを記録し、より高精度なPlaywrightテストスクリプトを生成することを可能にします。このガイドでは、playwright-mcpの効果的な設定と使用方法について説明します。

ツール

ブラウザ インターフェースで利用可能なツール:

ブラウザツールボックス

  1. DOMを選択 (🎯): クリックすると、ページからHTML要素を選択してキャプチャします。テストケースのセレクターを記録する際に使用します。
  2. 画像を選択 (📸): 特定の要素のスクリーンショットをキャプチャします。ビジュアルテストやドキュメント作成に便利です。
  3. インタラクションの記録 (📋): クリック、入力、ナビゲーションといったブラウザインタラクションを記録します。これらのインタラクションは自動的にセレクターを生成し、Claude や Cursor などの MCP クライアントにコンテキストとして渡すことで、テストケースの作成に役立ちます。

MCPコマンド

  1. init-browser : Playwright ブラウザを初期化します。
  2. get-context : テストケースの作成に使用するウェブサイトのコンテキストを取得します。
  3. execute-code : 現在のページに対してカスタム Playwright JS コードを実行します。
  4. get-screenshot : 現在のページのスクリーンショットを取得する
  5. get-full-dom : 現在のページの完全なDOMを取得します。(代わりにget-context使用をお勧めします)

もっと詳しく知る

さらに詳しく知りたいですか? 完全なドキュメントをご覧ください。

📖ドキュメントを見る

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Playwright MCPサーバーは、Webページとのインタラクションや要素の検査を可能にすることで、AI駆動型のPlaywrightテスト生成を可能にします。CursorなどのIDEと統合されており、リアルタイムのコンテキストを提供することで、テストの精度と効率性を向上させます。

  1. 導入
    1. ツール
      1. ブラウザツールボックス
      2. MCPコマンド
    2. もっと詳しく知る

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        A MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.
        Last updated -
        Python
        Apache 2.0
        • Apple
      • -
        security
        A
        license
        -
        quality
        A browser automation server providing Playwright capabilities for controlling web browsers, capturing screenshots, extracting content, and performing complex interactions through an MCP interface.
        Last updated -
        Python
        Apache 2.0
        • Apple
      • -
        security
        F
        license
        -
        quality
        A MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.
        Last updated -
        5
        TypeScript
      • -
        security
        F
        license
        -
        quality
        A service that provides Playwright browser automation functionality through Model Context Protocol (MCP), allowing clients to use Playwright features via SSE connections.
        Last updated -
        2

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ashish-Bansal/playwright-mcp'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server