• English
  • See interfaces like a humanE2E testing in natural language

    Midscene.js helps developers bring AI to E2E testing with a vision-based GUI Agent and an extensible testing framework for web, mobile, and desktop apps.

    15k+Github Stars
    #2No.2 in Github trending
    WRITE A TEST

    Describe steps and expectations in natural language

    @midscene/test + YAML test cases

    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"

    Vitest + JavaScript

    import { test } from 'vitest';
    import { PlaywrightAgent } from '@midscene/web/playwright';
    
    // Model configuration, page setup, and cleanup omitted
    test("Find headphones under $100", async () => {
      const agent = new PlaywrightAgent(page);
      await agent.aiAct("Search for headphones and filter the results to prices under $100");
      await agent.aiWaitFor("The filtered search results are visible");
      await agent.aiAssert("There are products in the search results, and each costs less than $100");
    }, 180_000);
    PLATFORMS

    One API, across platforms

    @midscene/test

    YAML for test cases TypeScript for extensions

    Organize cases in natural language

    Combine UI actions, assertions, and business Nodes in YAML to describe your test flows.

    Make business operations reusable

    Implement data setup, API calls, and cleanup in TypeScript Nodes that different cases can reuse.

    Generate a Node Spec automatically

    Export registered Nodes and input schemas as Markdown so developers and AI agents can discover project capabilities and maintain tests together.

    Explore Midscene Test
    YAML cases
    TypeScript extensions
    Node Spec
    # cases/users.yaml
    # Example: prepare user data, then search and verify through the UI. Configure a model and Web environment first, and replace the example URL.
    
    beforeEach:
      - user.create: { name: Alice }
      - gotoUrl: https://your-app.example/users
    
    cases:
      - name: Find a new user
        steps:
          - aiAct: Search for the user Alice
          - aiAssert: The search results show the user Alice

    Write your first E2E test in natural language