Set Up Playwright Mobile Testing

Playwright mobile testing capabilities let you automate and debug mobile web or hybrid applications with Android devices and emulators.

To get started, set up ADB (Android Debug Bridge), the command-line tool that connects Playwright to Android devices. This guide shows how to install and configure ADB on Windows for use with the Playwright mobile bridge.

Step 1 — Install ADB

There are two main ways to install ADB on Windows: directly from Google, or via a package manager.

Option 1 — Install from Google

  1. Download the SDK Platform-ToolsHead to the official Android developer site and download: Android SDK Platform-Tools for Windows
  2. Unzip the tools Extract the ZIP file to a fixed location, e.g. C:\Android\platform-tools.
  3. Add ADB to your path: So you can run ADB from any terminal, update your system path:
    • Search for “Edit system environment variables” in Windows.
    • Click Environment Variables…
    • Select Path.
    • Click EditNew, then add the location of the zip file (e.g. C:\Android\platform-tools)
    • Click OK to save.

Option 2 — Install via Package Manager

If you prefer an easier, command-line installation, use one of the following:

  • Use Chocolatey, if it is installed:

    1
    
    choco install adb -y
    
  • Use WinGet, which is available in modern Windows:

    1
    
    	winget install --id=Google.PlatformTools -e
    

Step 2 — Verify Installation

After ADB is installed, confirm that it works:

1
2
adb version
adb devices

You should see:

  • A version line that indicates your ADB build.
  • Your connected Android device listed (after enabling USB Debugging and accepting the RSA prompt on your device).

Step 3 — Using ADB with Playwright Mobile Bridge

When launching the Playwright mobile bridge, you can either:

  • Use the system path (if you added ADB there), or
  • Pass the absolute path to your adb.exe.
    This tells Playwright exactly where to find ADB if it is not globally available.

After setup is complete, your Playwright environment can interact with real Android devices or emulators for automated mobile testing workflows.