See interfaces like a human
E2E testing in natural language
Midscene.js provides a vision-based GUI Agent and a natural-language E2E testing framework for web, mobile, and desktop apps.
🔥 Latest news Starting with v1.16, Midscene supports using Jev 1.14’s visual capabilities to drive E2E testing. See what’s new
Describe steps and expectations in natural language
Describe what a user wants to do and what they should see. Express the same intent in YAML or in your existing JavaScript tests.
A GUI Agent built for testing
Midscene’s GUI Agent brings visual actions and assertions to your existing JavaScript tests. We recommend Playwright Test for web apps and Vitest for mobile and desktop apps.
See, act, and verify like a human
E2E testing verifies complete workflows from the user’s perspective, so Midscene tests the way a user does.
- ObserveRead screenshots, not the DOM
- ActFind the target, then tap, type, or scroll
- VerifyAssert on what users actually see
One API, across platforms
Visual localization does not depend on the UI rendering stack, so the same API works on web, mobile, desktop, and canvas-based interfaces.
@midscene/webAndroid@midscene/androidiOS@midscene/iosawait agent.aiAct('Search for headphones')@midscene/harmonyDesktop@midscene/computerCustom interfaces@midscene/coreModel options and cost
Benchmarks
- AndroidWorld: Pass@1 of 93.1% and Pass@3 of 97.4%. Read the benchmark report
- MobileWorld: Pass@1 of 78.6%, completing 92 of 117 tasks. Read the benchmark report
- AppControlBench: Pass@1 of 96.7%, passing 58 of 60 tasks. Read the benchmark report
A new E2E testing framework designed for natural language
Midscene Test (@midscene/test) is a natural-language E2E testing framework. Describe actions and expectations in YAML, and keep logic that needs precise control in TypeScript. Get started with Midscene Test
AI and business operations in one YAML file
Each YAML step calls a Node: an AI, platform, or custom business operation. Compose them into a test case.
beforeEach: - order.prepare: { status: paid }Business - gotoUrl: ${shopUrl}/orders/latestBusinesscases: - name: A paid order supports a full refund steps: - aiAct: Apply for a full refund and submitAI - aiAssert: The page shows that the refund was submittedAI - order.checkRefund: { status: refunding }BusinessafterEach: - clearCookies: {}BusinessTest cases maintained by people and AI
Wrap reusable business logic in custom Nodes. Midscene Test generates a Markdown Node Spec listing every Node and its inputs, so QA engineers and AI agents can write cases without reading TypeScript. Learn how to develop custom Nodes
Test framework capabilities
Midscene Test also includes the capabilities expected of a test framework: lifecycle hooks and cleanup, retries and timeouts, concurrent execution with isolation, and step-level reports.
Lifecycle hooks and cleanup
Prepare and clean up resources at the project, file, and case level with setup, fileSetup, beforeAll, beforeEach, and their counterparts. Cleanup still runs after failures, timeouts, or Ctrl+C.
Project lifecycleRetries and timeouts
Retry failed cases; each attempt reruns beforeEach, steps, and afterEach. Set step timeouts, keep going after a failed step with continue-on-error, and stop early with bail.
Handling failuresConcurrency and isolation
Run YAML files concurrently with maxConcurrentFiles. fileSetup gives each file its own page, Agent, or device, so concurrent files do not share state.
Concurrency and isolationStep-level reports
The HTML report records screenshots, inputs, outputs, errors, and Agent replay for every step. A #runner-step=last-error link opens the latest failed step from CI notifications or PR comments, and summary.json and result.md are written for scripts and AI agents.
Output and reportsWho is using Midscene
Next steps
- Understand the basics: Learn how the GUI Agent works and explore its core capabilities in The Basics
- Try visual interaction: Follow the quick start to try natural-language actions and assertions
- Create a test project: Write and run YAML test cases with Midscene Test
- Write tests with code: Integrate with Playwright Test for web apps or Vitest for mobile and desktop apps
- Run standalone automation workflows: Write scripts with the JavaScript SDK
To let AI coding agents operate your UI, explore Midscene Skills.



