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
Validation workflow
Every platform guide follows the same four-step workflow:
- Install prerequisites: Set up Node.js, model credentials, and the platform's connection tools and system permissions.
- Connect and launch Playground: Verify the device or browser connection, start Playground, and confirm that the live screen preview loads.
- Run an action and an assertion: Execute an
aiActinstruction in Playground, verify the outcome withaiAssert, and inspect the execution steps and screenshots. - 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:
- Write YAML tests: Initialize a project, run test cases, and inspect reports with Midscene Test.
- Integrate with existing JavaScript tests: Use Playwright Test for Web, or Vitest for mobile and desktop.
- Write standalone automation scripts: Follow Write standalone automation scripts and pick the example for your platform.
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.

