- Browsers: Chrome running in its own Windows machine. The Python API follows Playwright’s, so most browser scripts move over by changing the import.
- Phones: real Android phones. You find things by text, accessibility role or a plain description, then tap, swipe and type.
- Computers: a whole Windows desktop. The real mouse and keyboard anywhere on screen, plus its windows, processes, files and clipboard.
Two layers, one protocol
| Layer | What it is | Reach for it when |
|---|---|---|
| Python driver | Browser, Page, Locator and expect for browsers; Phone and its Locator for phones; Computer for a desktop. | You write Python. Most code should start here. |
| DCP | The raw wire: {"id", "method", "params"} frames over the session’s control_url. | You work in another language, or want the exact frames with nothing in between. |
What makes it different
- Real input. Browser clicks and keystrokes go through the machine’s own input system, and phone taps are real touches, so pages and apps see ordinary input.
- Waiting happens in the session. An action finds its target, waits until it is ready, then acts, all in one round trip.
- Finding works without markup. On a phone, a locator can match the accessibility tree, read the screen with OCR, or have a vision model find what you describe.
- Browser scripts run in an isolated world.
evaluateshares the page’s DOM but not its JavaScript, so the page can’t see or interfere with your scripts. Passworld="main"to reach page globals.
Next steps
Browser quickstart
Connect to a browser and drive a page.
Phone quickstart
Find things on a phone, tap and type.
Computer quickstart
Start a Windows desktop and work in it.
Porting from Playwright
What carries over, what differs, and the compatibility table.
Page reference
Every method on
Page.DCP overview
The wire underneath the driver.