Playwright IA: Midscene.js
About
Automate Playwright flows using natural language with Midscene.js and AI.
Details
- Author
- maurocor
- Categories
- Developer Tools, Automation, Other
- Tags
- #playwright
Jump to
Setup
Install Playwright IA: Midscene.js in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/maurocor/mcp-midscene
Follow the installation instructions in the repository README, then restart your MCP client.
Automate Playwright flows using natural language with Midscene.js and AI.
Proyecto de automation con Playwright e inteligencia artificial (Midscene).
-
Instala dependencias, ejecuta tests y visualiza el reporte para tener un primer vistazo del modo en que opera Midscene.
Configura el MCP Server de Midscene para que automatize lo que le pidas desde un prompt.
#linux export OPENAI_API_KEY="tu_api_key"
Ejecuta los tests con Playwright y genera un reporte en HTML:
Para visualizar el reporte generado, usa el comando:
open midscene_run/report/tu_reporte.html
Se abrirá automáticamente una ventana del navegador con el dashboard de resultados (flujos de MidSceneJS, capturas y trazas).
📂 MidScene: APIs básicas de operación de IA
Usa estas APIs en tus steps para que la IA haga el trabajo.
- ai o aiAction – Interacción general con IA
- aiTap – Operación de clic
- aiHover – Operación de hover (pasar el cursor)
- aiInput – Operación de entrada de texto
- aiKeyboardPress – Operación de teclado
- aiScroll – Operación de desplazamiento
- aiQuery – Consulta a IA
- aiAssert – Aserción de IA
- aiWaitFor – Espera basada en IA
Puedes encontrar más detalles en midscenejs.com/api
Permite usar lenguaje natural para automatizar flujos y generar pruebas conPlaywright, utilizando el agente de inteligencia artificialMidScenea través de suMCP Server.
- InstalaCursor.
- Abre este proyecto con Cursor.
- Configura el MCP en Cursor.
- Abre Cursor
- Ve a:File > Preferences > Settings
- Agrega la siguiente configuración en el apartadoMCP:
{ "mcpServers": { "mcp-midscene": { "command": "npx", "args": ["-y", "@midscene/mcp"], "env": { "MIDSCENE_MODEL_NAME": "gpt-4o-mini", "OPENAI_API_KEY": "<OPENAI_API_KEY>", "MCP_SERVER_REQUEST_TIMEOUT": "800000" } } } }
- No olvides ingresar tu OPENAI_API_KEY en el json.
Abre un chat enCursor(Ctrl + N) y escribe tu prompt. Por ejemplo:
Usa el MCP de Midscene para: 1. Open page https://practicetestautomation.com/practice-test-login/ 2. Type username incorrectUser into Username field 3. Type password Password123 into Password field 4. Push Submit button 5. Verify error message is displayed 6. Verify error message text is Your username is invalid! Al finalizar: Crea el test case en Playwright con midscene, en la carpeta e2e con nombre login, usa de ejemplo @sauce-demo.spec.ts Exporta OPENAI_API_KEY que esta en @mcp.json Ejecuta el test npx playwright test e2e/login.spec.ts --headed
Nota: En el prompt, brinda contexto (ej: "@mcp.json"). De esta manera, Midscene encuentra la información necesaria para cumplir tu solicitud con éxito (templates, API_KEYS, etc).
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
An AI agent for the Playwright MCP server, enabling automated web testing and interaction.
Generate Playwright BDD tests, GitHub Actions and Azure Pipelines with business-rule traceability, focused CodeGraph context and persistent Engram memory.
Autonomous QA MCP that tests web and macOS apps like a real engineer and verifies every bug.
A Playwright-based MCP server that exposes a live browser as a traceable, inspectable, debuggable and controllable execution environment for AI agents.
Browser automation via Chrome DevTools Protocol
Drive, inspect, and assert on real Electron desktop apps from an AI agent — agent-native, Playwright-style automation with accessibility refs, stable error codes, and retrying assertions
Playwright MCP for Godot, screenshots, SceneTree manipulation, and arbitrary GDScript execution at runtime through a local UDP bridge.
A lightweight, AI-powered end-to-end testing framework for CI workflows. Requires an OpenAI API key.
Automate web testing and tasks by connecting Claude Desktop with Playwright.
Create and manage end-to-end tests using the Octomind platform.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


