• English
  • Platform environment setup

    This section covers environment setup across all supported platforms. Before integrating with Midscene Test or the JavaScript SDK, select your target platform, connect your device or browser, and verify model and UI interactions in Playground.

    Midscene uses multimodal vision models to understand screenshots, operating directly on the rendered UI rather than relying on the underlying DOM or native view hierarchy. This allows the same interaction and assertion approach to work across native apps and cross-platform frameworks alike.

    Choose a platform

    Platformnpm packageConnection methodTypical use cases
    Web@midscene/webChrome extension (Playground); Playwright / Puppeteer (SDK integration)Web testing and browser automation
    Chrome Bridge@midscene/webChrome extensionReusing existing login sessions and tabs in desktop Chrome
    Android@midscene/androidadbAndroid apps and system UI automation
    iOS@midscene/iosWebDriverAgentiOS apps and system UI automation
    HarmonyOS@midscene/harmonyHDCHarmonyOS NEXT apps and system UI automation
    Desktop@midscene/computerNative mouse/keyboard or RDPWindows, macOS, and Linux desktop application automation

    Validation workflow

    Every platform guide follows the same four-step workflow:

    1. Install prerequisites: Set up Node.js, model credentials, and the platform's connection tools and system permissions.
    2. Connect and launch Playground: Verify the device or browser connection, start Playground, and confirm that the live screen preview loads.
    3. Run an action and an assertion: Execute an aiAct instruction in Playground, verify the outcome with aiAssert, and inspect the execution steps and screenshots.
    4. Integrate into your project: Once validated, integrate with a test runner or standalone script.

    For Web, the Chrome extension Playground lets you quickly test model behavior and page interactions, while browsers launched by Playwright / Puppeteer and Node.js connections over Chrome Bridge are verified separately during project setup. For mobile and desktop platforms, Playground connects directly to your target device or display.

    Next steps

    Once your environment and Playground are verified, choose how to integrate Midscene:

    Note: Model credentials entered in the Playground UI are stored locally in the browser and are not automatically shared with test or script processes. Copy your verified settings into your project's .env file and load them as shown in the integration guides, while keeping the required device connection tools, services, and permissions active.