• English
  • 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.4’s visual capabilities to drive E2E testing. Try it out

    15k+Github Stars
    MITFully open source
    #2No.2 in Github trending

    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.

    YAML · @midscene/test
    Vitest + JavaScript
    beforeEach:
      - gotoUrl: https://your-shop.example
    
    cases:
      - name: "Find headphones under $100"
        steps:
          - aiAct: "Search for headphones and filter the results to prices under $100"
          - aiWaitFor: "The filtered search results are visible"
          - aiAssert: "There are products in the search results, and each costs less than $100"

    A GUI Agent built for testing

    Midscene’s GUI Agent brings visual actions and assertions to your existing Playwright, Puppeteer, or JavaScript tests.

    See, act, and verify like a human

    Midscene uses vision to complete tasks the way a person interacts with an app: look at the screen, find the target, act, and check the result. See real-world examples

    One API, across platforms

    Visual localization does not depend on a particular UI rendering stack. Platform adapters provide screenshots and actions, bringing the same approach to web, mobile, and desktop interfaces, including HTML canvas.

    PlatformPackageDescription
    Web@midscene/webPlaywright · Puppeteer · Desktop Chrome
    Android@midscene/androidDevices / emulators · ADB
    iOS@midscene/iosDevices / simulators · WebDriverAgent
    HarmonyOS@midscene/harmonyHarmonyOS NEXT · HDC
    Desktop@midscene/computermacOS · Windows · Linux, with remote RDP
    Custom interfaces@midscene/coreConnect through screenshots and actions

    Model options and cost

    Benchmarks

    A new E2E testing framework designed for natural language

    Midscene Test (@midscene/test) is designed from the ground up for natural-language E2E testing. Write actions and assertions in YAML, extend test steps with TypeScript Nodes, and manage setup, cleanup, retries, and execution reports within one framework. Get started with Midscene Test

    AI steps and Nodes in one YAML file

    Organize tests in YAML so people and AI agents can read, write, and review natural-language intent alongside code steps.

    cases/refund.yaml
    beforeEach:  - order.prepare: { status: paid }Node  - gotoUrl: ${shopUrl}/orders/latestNodecases:  - 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 }NodeafterEach:  - clearCookies: {}Node

    Customize your test project

    Extend Midscene Test with TypeScript Nodes for your business operations. Register them to make them callable from YAML, then generate a Markdown Node Spec describing the available operations and their inputs. People and AI agents can use the Spec to reference these Nodes in test cases. Develop custom Nodes

    1. nodes/order.ts
      defineNode({
        name: 'order.prepare',
        description: "Create a test order",
        inputSchema: z.strictObject({
          status: z.literal('paid'),
        }),
        async execute({ input }) {
          await orders.create(input);
        },
      });
    2. midscene-node-spec.md
      ### order.prepare
      Create a test order
      - status: "paid"
    3. case.yaml
      steps:
        - order.prepare:
            status: paid

    Who is using Midscene

    Next steps

    • 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
    • Let AI coding agents operate your UI: Connect them through Midscene Skills