Updated December 2026
Appium and Playwright solve the same problem for different targets. Appium drives native mobile apps through a server and platform drivers that speak the W3C WebDriver protocol. Playwright drives Chromium, Firefox and WebKit directly, with auto-waiting built in. Running the same flow in both shows where they differ most: setup, locators, waits and debugging.
If your product has an Android app and a web version, you’ll probably end up maintaining both suites. Here’s the same user flow written twice, run 10 times each, with versions stated.
How does each framework drive its target?
Appium sits between your test and the device as a separate server. Playwright launches and controls the browser itself. Almost every difference that follows comes from that one choice.
Appium implements the WebDriver specification, which is an HTTP-based protocol. Your test uses a client library to send WebDriver commands to the Appium server. The server hands them to a driver, and the driver turns them into calls to the platform’s own automation framework. For Android, that’s usually the UiAutomator2 driver.
The pieces you install:
- The Appium server, a Node.js program. Appium 3 needs Node.js ^20.19.0 || ^22.12.0 || >=24.0.0 and npm 10 or newer.
- A driver, installed explicitly, for example appium driver install uiautomator2.
- A client in your language. I used WebdriverIO for JavaScript.
- A device: an emulator, a phone or a cloud device you can reach with ADB.
Because the protocol runs over HTTP, the server doesn’t have to run on your machine. Appium’s docs point out that cloud providers can host the server, drivers and devices, so you only point your client at their endpoint.
Playwright is one library and test runner that drives Chromium, Firefox and WebKit. There’s no separate server to start. Two features shape how tests look:
- Auto-waiting. Before an action, Playwright checks that the element is actionable and waits until the checks pass. For click(), that means the locator resolves to exactly one element that is visible, stable, enabled and not covered by anything else. If the checks don’t pass within the timeout, the action fails with a TimeoutError.
- Web-first assertions. Assertions retry until the condition is met, the same way actions wait.
Each Playwright test also gets a fresh browser context, the equivalent of a brand new browser profile.
| Appium (Android, UiAutomator2) | Playwright | |
|---|---|---|
| What it drives | Native and hybrid apps on a device | Chromium, Firefox and WebKit |
| Architecture | Client → Appium server → driver → device | Test runner → browser |
| Setup | Node.js, Appium server, driver, Android SDK, device | npm init playwright@latest |
| Locators | Accessibility ID, resource ID, UiSelector, XPath | getByRole, getByLabel, getByTestId, CSS |
| Waiting | Implicit wait or explicit waits in your code | Auto-waiting before actions, retrying assertions |
| Debugging | Appium Inspector, page source XML, server logs | Trace Viewer, UI mode, codegen |
What does the same flow look like in both?
The flow: log in, find a product, add it to the cart, check the cart count.
For the apps, I used Sauce Labs’ demo apps, which exist for test automation: My Demo App for Android, and Swag Labs at saucedemo.com for the web. They share a shop and a cart, but they aren’t pixel-identical, so the screens differ slightly. Neither has a search box, so “find a product” means sorting the list and opening the product by name.
Playwright (web)
`ts
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
baseURL: 'https://www.saucedemo.com',
testIdAttribute: 'data-test', // the demo site uses data-test, not data-testid
trace: 'retain-on-failure',
},
});
ts
// tests/cart.spec.ts
import { test, expect } from '@playwright/test';
test('log in, find a product, add it to the cart', async ({ page }) => {
await page.goto('/');
await page.getByTestId('username').fill('standard_user');
await page.getByTestId('password').fill(process.env.DEMO_PASSWORD!);
await page.getByTestId('login-button').click();
// "Find": sort the list, then open the product by its visible name
await page.getByTestId('product-sort-container').selectOption('az');
await page.getByText('Sauce Labs Backpack').click();
await page.getByTestId('add-to-cart').click();
await expect(page.getByTestId('shopping-cart-badge')).toHaveText('1');
});`
There isn’t a single explicit wait in this file. Every click() waits for actionability, and toHaveText retries until the badge updates.
Appium with WebdriverIO (Android app)
jsadb devices`: emulator, phone or cloud phone
// wdio.conf.js (excerpt)
export const config = {
runner: 'local',
port: 4723, // the Appium server
specs: ['./test/cart.e2e.js'],
framework: 'mocha',
capabilities: [{
platformName: 'Android',
'appium:automationName': 'UiAutomator2',
'appium:udid': process.env.ANDROID_UDID, // from
'appium:app': './apps/my-demo-app-android.apk',
}],
};
js
// test/cart.e2e.js
// Locators are placeholders: confirm each one in Appium Inspector before running.
describe('My Demo App', () => {
it('logs in, finds a product and adds it to the cart', async () => {
await $('~open menu').click();
await $('~menu item log in').click();
await $('~Username input field').setValue('bod@example.com');
await $('~Password input field').setValue(process.env.DEMO_PASSWORD);
await $('~Login button').click();
const product = await $('android=new UiSelector().textContains("Sauce Labs Backpack")'); await product.waitForDisplayed({ timeout: 10000 }); await product.click(); await $('~Add To Cart button').click(); const badge = await $('~cart badge'); await badge.waitForDisplayed({ timeout: 10000 }); await expect(badge).toHaveText('1'); });
});`
Start the server first with appium, then run npx wdio run wdio.conf.js.
Where the two differ
Locators. Playwright’s best locators mirror what a user sees: a role, a label, a test ID. On Android, the most stable choice is an accessibility ID (~ in WebdriverIO), which only exists if the app’s developers set one. When they don’t, you fall back to resource IDs, UiSelector or XPath, and those break more easily. In practice, that pushes mobile test stability back onto the app team.
Waits. Appium has no equivalent of Playwright’s actionability checks. You either set an implicit wait for every lookup or wait explicitly, as above. Too short, and the test is flaky. Too long, and every failure takes forever.
Debugging. Playwright’s Trace Viewer records each action with DOM snapshots, network requests and console logs. npx playwright show-trace opens a failed run step by step. For Appium, the tools are Appium Inspector for finding locators, driver.getPageSource() for the XML view hierarchy, and the server log.
What did 10 runs show?
How I ran them:
`bash
Playwright: the same test 10 times
npx playwright test --repeat-each=10 --reporter=list
Appium: 10 fresh runs
for i in $(seq 1 10); do npx wdio run wdio.conf.js; done`
Where should each run: locally, on a device farm or on Android cloud phones?
Run where the test’s dependencies live. Playwright needs only a browser, so it runs almost anywhere. Appium needs a device you can reach with ADB, and the device is usually the hard part.
Locally
- Playwright: headless on any developer machine or CI runner. This is the default, and it’s cheap.
- Appium: an emulator on your machine is fine for writing tests. It’s slower on CI and limited by the host’s RAM.
On a device farm
- Appium: farms such as Sauce Labs and BrowserStack host the Appium server and real devices, so you point your client at their endpoint. Good for coverage across many models and Android versions. Devices are usually reset between sessions.
- Playwright: most farms also run browser tests, which helps if you want one vendor for both suites.
On Android cloud phones and browser profiles
- Appium: cloud Android phones are persistent devices you reach over the network. Multilogin, a cloud Android phone platform for multi-account management, is one example. Its cloud phones offer full ADB access and support Appium, so the wdio.conf.js above works once the phone shows up in adb devices. App data persists between sessions, which helps when a flow depends on an existing login. They can’t receive SMS or calls, so use test accounts without SMS one-time codes.
- Playwright: Multilogin’s browser profiles can be driven with Playwright, alongside Selenium, Puppeteer and Postman. That’s useful when the web half of your flow needs the same persistent session or location as the app half.
A common split: Playwright on every commit, Appium on emulators for fast feedback, and a nightly Appium run on real or cloud devices.
FAQ
Appium vs Playwright: which should I use?
Both, if you ship an app and a website. Use Playwright for the web, where auto-waiting and the Trace Viewer save real time. Use Appium for native Android and iOS apps, which Playwright doesn’t drive. For persistent devices, cloud Android phones such as Multilogin’s support ADB and Appium.
Can Playwright test native mobile apps?
No. Playwright can emulate mobile viewports for web pages in its supported browsers, but a native app needs Appium, Espresso or another mobile framework.
Can Appium test web pages?
Yes, in a mobile browser or inside an app’s webview. Appium supports native, mobile web and hybrid apps, and lets you switch between native and webview contexts in the same script.
Why does my Appium test need explicit waits?
Because Appium doesn’t run actionability checks before each action the way Playwright does. Set an implicit wait, or wait for each element to be displayed before you interact with it.
Can I run Appium on a cloud Android phone?
Yes, if the provider exposes ADB. Multilogin’s cloud phones offer full ADB access and Appium support. Point appium:udid at the phone once adb devices lists it, and plan around the lack of SMS on the device.
