You can use Playwright’s experimental Android API to automate Chrome for Android or an app’s Android WebView on a physical device or an Android Virtual Device (AVD) emulator. Playwright connects through authenticated ADB; this is not a way to automate every native Android app screen. For Chrome, discover the device and launch a persistent browser context. For a WebView, expose the app’s WebView for debugging, then attach to it and use Playwright page APIs.
What Playwright can test on Android
Playwright’s Android support is explicitly experimental. Its documented targets are Chrome for Android and Android WebView, with a connected physical Android device or AVD emulator as the target. The API can discover devices, report model and serial, run shell commands, take device screenshots, launch Chrome, attach to WebViews, and install APK files. See Playwright’s Android documentation and the AndroidDevice API reference.
This workflow is for browser content running in Chrome or a WebView. It does not establish that Playwright’s Android API automates native Android interface controls across arbitrary apps. Use a tool designed for native UI automation if your test needs to operate those controls.
Choose a real device, an emulator, or browser emulation
- Physical device: Use this when you need a real Android OS and hardware target. It must be connected and authenticated through ADB.
- AVD emulator: Use this when an Android OS target is needed but a physical phone is not. Playwright’s AndroidDevice reference describes connected devices as real hardware or emulated.
- Playwright device emulation: Use this for browser checks that need simulated parameters such as user agent, viewport, screen size, touch support, locale, timezone, geolocation, permissions, or color scheme. It is not an Android OS device connected through ADB, so it is not a substitute when actual Android Chrome or WebView behavior is the goal. See Playwright’s emulation guide.
Decide which content you are testing, too: launch Chrome for a website, or attach to an app’s exposed WebView for its embedded web content.
#1 Best Overall
- 【Strong Adsorption】The inspiration of the silicone phone suction case comes from the adhesive force of the octopus. Each suction cup phone mount is 3.15 inches long and 2.17 inches wide, with 24 independent suction cups providing a stronger and more stable suction force, so you don't have to worry about your phone falling during use.
- 【Back of Phone Suction Grip】Remove the adhesive film on the phone suction cup and stick it on the phone case. You can then fix the phone on any smooth surface, which is very convenient. (The phone suction cup cannot be removed and reused after being attached to the phone case. It is recommended to attach it to a regular phone case, not a valuable one.)
- 【Widely Used】Our non-slip silicone phone sticky grip mount attaches to almost any flat phone case and make it compatible with common mobile phones such as iPhone and Android.You can shoot, watch videos or video calls in the kitchen, gym, dance studio, bathroom and other places.
- 【Capture the Wonderful Picture】Whether you are a TikTok creator or just like to share videos and photos, this phone suction cup can help you hands-free capture wonderful videos and photos for sharing with friends.
- 【Note】You can fix the phone suction cup on a smooth surface such as a mirror or glass. If necessary, wipe the suction cup with a damp cloth to obtain stronger suction. Before releasing your hand, make sure the phone is firmly fixed. (Not applicable to rough walls, wooden surfaces, and other uneven surfaces)
Prepare the Android target
- Install or make available a physical Android device or AVD emulator, then enable developer access as needed for your setup.
- Install ADB and start its daemon. Connect the device and authenticate the host when prompted. Confirm that ADB can see it by running
adb devices; the device should appear as authorized, notunauthorized. - For the documented Chrome workflow, install Chrome 87 or newer on the target and enable Enable command line on non-rooted devices in
chrome://flags. - Keep the device awake during screenshot capture. Playwright’s Android guide says a device must be awake to produce screenshots.
Playwright’s published prerequisites include Chrome 87 or newer and that Chrome flag. These are documentation-specific requirements that may change; confirm the current Android guide before setting up a new project.
Run a Playwright test in Chrome for Android
The example below uses Node.js and Playwright’s documented underscored _android export. It discovers attached targets, selects the first, launches Chrome, opens a page, checks the title, captures a page screenshot, and closes the context and device. Install Playwright in your project first and adapt the assertion to your test runner and project version.
const { _android: android } = require('playwright');
(async () => {
const devices = await android.devices();
if (devices.length === 0) {
throw new Error('No Android devices found. Check ADB connection and authorization.');
}
const device = devices[0];
let context;
try {
context = await device.launchBrowser();
const page = await context.newPage();
await page.goto('https://example.com');
const title = await page.title();
console.log({ title, model: device.model(), serial: device.serial() });
await page.screenshot({ path: 'android-page.png' });
} finally {
if (context) await context.close();
await device.close();
}
})();
The first-device selection is convenient for a single target. If several devices are attached, inspect the discovered devices’ model and serial and select the intended one rather than assuming the first entry is correct. The Android API also documents device selection by serial for its Android server/client workflow.
launchBrowser() returns a persistent browser context, so create pages from that context and close it when the run is finished. This example is an implementation pattern based on the documented API, not a claim that a particular test was run.
Rank #2
- SUPERIOR COMFORT — Unlike traditional circular ear buds, the design of EarPods is defined by the geometry of the ear. Which makes them more comfortable for more people than any other ear bud–style headphones.
- HIGH-QUALITY AUDIO — The speakers inside EarPods have been engineered to maximize sound output and minimize sound loss, which means you get high-quality audio.
- BUILT-IN REMOTE — EarPods with USB-C plug also include a built-in remote that lets you adjust the volume, control the playback of music and video, and answer or end calls with a pinch of the cord.
- COMPATIBILITY — Works with all devices that have a USB-C port.
- INTEGRATED MICROPHONE — A built-in microphone precisely captures your voice while you’re on the phone, taking a FaceTime call, or summoning Siri — so you’re always heard loud and clear.
Automate an app’s Android WebView
Enable WebView debugging in the app
The app must enable WebView debugging in code for Chrome DevTools connections. Android Developers documents WebView.setWebContentsDebuggingEnabled(true) and recommends restricting it to development builds. Do not assume a manifest debuggable setting enables WebView debugging; Android says it is not affected by that flag. See Android Developers’ WebView debugging guide.
if (BuildConfig.DEBUG) {
WebView.setWebContentsDebuggingEnabled(true);
}
Use the equivalent development-only condition for your app’s build setup. Avoid enabling WebView debugging in production builds.
Connect to the running WebView
Start the app on the ADB-connected device and ensure the WebView you want to test is open. Then request that WebView by the app’s package name and use its page with Playwright. The package name below is an example placeholder; replace it with your app’s actual package name.
const { _android: android } = require('playwright');
(async () => {
const devices = await android.devices();
if (devices.length === 0) {
throw new Error('No Android devices found. Check ADB connection and authorization.');
}
const device = devices[0];
try {
const webView = await device.webView({ pkg: 'your.package' });
const page = await webView.page();
await page.goto('https://example.com');
console.log(await page.title());
} finally {
await device.close();
}
})();
Use the navigation operation only when it fits your test: an app may load its own URL or state as it starts. You can instead inspect and interact with the page already presented by the WebView. Android’s chrome://inspect can also show debuggable WebViews while the app runs on a physical device or Android Emulator.
Recommended Free Tools
Rank #3
- Secure Hold: Our PopSockets adhesive phone grip gives your cell phone a secure, comfortable hold in hand to help prevent drops while texting, taking photos, or scrolling on the go. Designed to stick firmly to most phone cases and devices.
- Hands-Free Made Easy: Easily turn your PopSocket into a phone stand to prop up your phone anywhere, perfect for watching videos, video calls, or following recipes. A must-have phone holder that keeps your device secure and ready for anything.
- Compatibility: Works with all phones, tablets, and Kindles. Sticks best to smooth, hard plastic cases and may not adhere to silicone or textured cases. Easily swap your PopTop to change up your style.
- Black PopSockets: Simple, refined, and endlessly versatile. A timeless essential for any phone.
- Travel Must-Have for People On the Go: A must-have travel accessory for flights, flying, airports, air travel, airplanes, planes, international trips, cruises, and long travel days. Key gadget for your airport haul, travel accessories and must-haves.
Understand setup limitations and operational trade-offs
- ADB is required: The Playwright Android workflow does not support raw USB operation directly; connect through ADB.
- Experimental support: Playwright labels Android automation experimental, and its guide cautions that not all tests have been run against the device. Validate the behavior your own test depends on.
- Device state affects screenshots: The device must be awake for screenshots to be produced.
- WebView access depends on app configuration: The app must expose WebView debugging for the DevTools inspection workflow, and Android recommends enabling it only in development builds.
- Multiple attached targets need deliberate selection: Identify the intended device by its reported model or serial instead of relying on array order.
The Android API also documents launching an Android server and connecting a client to its WebSocket endpoint. That is useful infrastructure for arranging access to a target, but the documentation does not establish compatibility with any particular hosted-device service.
Troubleshoot common failures
No Android devices are discovered
Run adb devices. If the target is absent, check the ADB connection and daemon. If it appears as unauthorized, unlock the device and accept its debugging authorization prompt, then check again. Playwright’s Android API relies on an ADB daemon running and authenticated with the device.
Chrome does not launch or cannot be controlled
Check that Chrome is installed and meets the documented Chrome 87-or-newer requirement, and that Enable command line on non-rooted devices is enabled in chrome://flags. Because these requirements can change, compare your setup with the current Playwright Android guide.
A WebView cannot be found or inspected
Confirm the app is running and the intended WebView is open. Verify that the package name passed to device.webView({ pkg: ... }) is the app’s package name. Confirm the app enables WebView.setWebContentsDebuggingEnabled(true) in the development build. A manifest debuggable flag alone does not enable WebView debugging.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #4
- [360 ° Flexible Rotation Design] Comes with a rotatable lanyard ring that supports 360 ° free rotation, effectively solving the problem of twisted and tangled lanyards
- [Wide compatibility] The ultra-thin 0.02-inch design does not block the charging port at all, and both wired and wireless charging can be used directly without removing the pad. Compatible with most smartphones such as iPhone, compatible with various wristbands, lanyards, crossbody straps, and keychains
- [Durable and Portable Material] Premium rust-resistant stainless steel material with good flexibility, which not only avoids scratching the phone case, but also has excellent anti rust and anti fading performance
- [Multi scenario Practical] Paired with a lanyard or wristband, hands-free use can be achieved. The phone is within reach and not easily dropped, ideal for daily commuting and outdoor activities. Suitable for full coverage phone cases, does not support half coverage phone cases
- [Quality Service] If you find any damage or other issues with the product upon receipt, please contact us immediately. We will handle it quickly
A device screenshot is missing
Wake the device and keep it awake during capture. The Android guide specifically lists an awake device as a screenshot requirement.
The test selects the wrong target
When more than one device is attached, enumerate targets and inspect their model or serial before launching a browser or attaching to a WebView. Select by identity rather than assuming the first discovered device is the intended one.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If your goal is a screenshot of a website rather than an Android-device test, ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. It does not replace Playwright’s Android-device workflow; it can capture a URL without setting up a browser on an Android target.
One GET request returns a screenshot. See the ScreenshotNeo documentation for options and response details.
Best Value
- 【PKYAA Double Sided Silicone Suction Phone Case Mount】PKYAA With Double Sided 40 Strong and Reliable individual suction cups, PKYAA provides a thicken and upgraded universal silicon suction mount for your phone.
- 【Friendly to Content Creators】If you are a content creator or an online influencer, you can create videos anywhere with this suction mount completely hands free with this silicone cell phone mount for cases.
- 【HANDS-FREE & Adhere to Mirrors】This Double Sided silicone suction phone case mount allows you to stick your phone to the mirror easily. No longer holding your phone in one hand to watch video tutorials while making up.
- 【Strong Grip on the Smooth Surface】You can easily hang your phone anywhere with a smooth surface. All you do is you clean off your phone and smooth surface. It is STURDY and it not only sticks to mirrors, it also sticks to windows, it sticks to refrigerators, tiles and other clean, flat surfaces.
- 【Press Down Firmly Every 30 Minutes】Use your palm or fingers to press the phone down firmly and check it's secure before letting go. Apply even pressure for a few seconds to allow the suction cup to adhere properly. To maintain the grip and prevent accidental falls, it's a good practice to periodically reapply pressure to the suction cup.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Before capture, it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and whether the request was billed. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
Frequently Asked Questions
Can Playwright automate every native Android app screen?
No. The documented Android targets are Chrome for Android and Android WebView; this workflow does not claim general native Android UI automation.
Can I use an emulator instead of a physical Android phone?
Yes. Playwright’s Android API supports a connected AVD emulator as well as real hardware.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Is Playwright Android automation stable and fully supported?
Playwright currently describes Android automation as experimental, so validate the behavior your tests rely on.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

